sudosrv.c revision 7c9fe57ad82747a32721ca0a08c5569282f3e0c4
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2011 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <popt.h>
#include "monitor/monitor_interfaces.h"
#include "responder/common/responder.h"
#include "responder/common/responder_sbus.h"
#include "responder/sudo/sudosrv_private.h"
#include "providers/data_provider.h"
struct sbus_method monitor_sudo_methods[] = {
};
struct sbus_interface monitor_sudo_interface = {
};
static struct sbus_method sudo_dp_methods[] = {
};
struct sbus_interface sudo_dp_interface = {
};
int status,
void *pvt)
{
int ret;
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
/* Identify ourselves to the data provider */
"SUDO");
/* all fine */
return;
}
}
/* Failed to reconnect */
}
struct tevent_context *ev,
struct confdb_ctx *cdb)
{
struct sss_cmd_table *sudo_cmds;
int ret;
int max_retries;
sudo_cmds = get_sudo_cmds();
"SUDO",
&rctx);
return ret;
}
if (!sudo_ctx) {
goto fail;
}
/* Enable automatic reconnection to the Data Provider */
3, &max_retries);
("Failed to set up automatic reconnection\n"));
goto fail;
}
}
/* Get responder options */
/* Get sudo_timed option */
goto fail;
}
return EOK;
fail:
return ret;
}
{
int opt;
struct main_context *main_ctx;
int ret;
struct poptOption long_options[] = {
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
/* set up things like debug, signals, daemonization, etc... */
debug_log_file = "sssd_sudo";
return 2;
}
ret = die_if_parent_died();
/* This is not fatal, don't return */
"when parent process does\n"));
}
return 3;
}
/* loop on main */
return 0;
}