autofssrv.c revision 9e2c64c6d4f5560e27207193efea6536a566865e
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2012 Red Hat
Autofs responder: the responder server
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 "providers/data_provider.h"
#include "responder/autofs/autofs_private.h"
struct sbus_method monitor_autofs_methods[] = {
};
struct sbus_interface monitor_autofs_interface = {
};
static struct sbus_method autofs_dp_methods[] = {
};
struct sbus_interface autofs_dp_interface = {
};
static errno_t
struct confdb_ctx *cdb)
{
&actx->neg_timeout);
return ret;
}
return EOK;
}
static void
{
int ret;
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
/* Identify ourselves to the data provider */
"autofs");
/* all fine */
return;
}
}
/* Failed to reconnect */
}
static int
struct tevent_context *ev,
struct confdb_ctx *cdb)
{
struct sss_cmd_table *autofs_cmds;
struct autofs_ctx *autofs_ctx;
int ret;
int hret;
int max_retries;
if (!autofs_ctx) {
return ENOMEM;
}
return ret;
}
"autofs",
&autofs_ctx->rctx);
return ret;
}
/* Enable automatic reconnection to the Data Provider */
3, &max_retries);
("Failed to set up automatic reconnection\n"));
return ret;
}
}
/* Create the lookup table for setautomntent results */
if (hret != HASH_SUCCESS) {
("Unable to initialize automount maps hash table\n"));
return EIO;
}
return EOK;
}
{
int opt;
struct main_context *main_ctx;
int ret;
struct poptOption long_options[] = {
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
/* set up things like debug, signals, daemonization, etc... */
debug_log_file = "sssd_autofs";
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;
}