autofssrv.c revision fd25e68446ae86135489edb0823607b394f4ec40
/*
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 mon_cli_iface monitor_autofs_methods = {
{ &mon_cli_iface_meta, 0 },
.resetOffline = NULL,
.clearMemcache = NULL,
.sysbusReconnect = NULL,
};
static errno_t
struct confdb_ctx *cdb)
{
&actx->neg_timeout);
return ret;
}
static void
{
int ret;
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
/* Identify ourselves to the data provider */
/* all fine */
return;
}
}
/* Failed to reconnect */
}
{
struct autofs_ctx *actx =
return ret;
}
}
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;
"autofs",
NULL,
&rctx);
return ret;
}
if (!autofs_ctx) {
goto fail;
}
goto fail;
}
/* Enable automatic reconnection to the Data Provider */
3, &max_retries);
"Failed to set up automatic reconnection\n");
goto fail;
}
}
/* Create the lookup table for setautomntent results */
if (hret != HASH_SUCCESS) {
"Unable to initialize automount maps hash table\n");
goto fail;
}
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 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;
}