diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/popt_common.c | 145 | ||||
-rw-r--r-- | source3/smbd/server.c | 1 |
2 files changed, 0 insertions, 146 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index e8eca57fae..25558091c7 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -200,151 +200,6 @@ struct poptOption popt_common_option[] = { POPT_TABLEEND }; -/* Handle command line options: - * --sbindir - * --bindir - * --lmhostsfile - * --libdir - * --modulesdir - * --shlibext - * --lockdir - * --statedir - * --cachedir - * --piddir - * --smb-passwd-file - * --private-dir - */ - -enum dyn_item{ - DYN_SBINDIR = 1, - DYN_BINDIR, - DYN_LMHOSTSFILE, - DYN_LIBDIR, - DYN_MODULESDIR, - DYN_SHLIBEXT, - DYN_LOCKDIR, - DYN_STATEDIR, - DYN_CACHEDIR, - DYN_PIDDIR, - DYN_SMB_PASSWD_FILE, - DYN_PRIVATE_DIR, -}; - - -static void popt_dynconfig_callback(poptContext con, - enum poptCallbackReason reason, - const struct poptOption *opt, - const char *arg, const void *data) -{ - - switch (opt->val) { - case DYN_SBINDIR: - if (arg) { - set_dyn_SBINDIR(arg); - } - break; - - case DYN_BINDIR: - if (arg) { - set_dyn_BINDIR(arg); - } - break; - - case DYN_LMHOSTSFILE: - if (arg) { - set_dyn_LMHOSTSFILE(arg); - } - break; - - case DYN_LIBDIR: - if (arg) { - set_dyn_LIBDIR(arg); - } - break; - - case DYN_MODULESDIR: - if (arg) { - set_dyn_MODULESDIR(arg); - } - break; - - case DYN_SHLIBEXT: - if (arg) { - set_dyn_SHLIBEXT(arg); - } - break; - - case DYN_LOCKDIR: - if (arg) { - set_dyn_LOCKDIR(arg); - } - break; - - case DYN_STATEDIR: - if (arg) { - set_dyn_STATEDIR(arg); - } - break; - - case DYN_CACHEDIR: - if (arg) { - set_dyn_CACHEDIR(arg); - } - break; - - case DYN_PIDDIR: - if (arg) { - set_dyn_PIDDIR(arg); - } - break; - - case DYN_SMB_PASSWD_FILE: - if (arg) { - set_dyn_SMB_PASSWD_FILE(arg); - } - break; - - case DYN_PRIVATE_DIR: - if (arg) { - set_dyn_PRIVATE_DIR(arg); - } - break; - - } -} - -const struct poptOption popt_common_dynconfig[] = { - - { NULL, '\0', POPT_ARG_CALLBACK, (void *)popt_dynconfig_callback }, - - { "sbindir", '\0' , POPT_ARG_STRING, NULL, DYN_SBINDIR, - "Path to sbin directory", "SBINDIR" }, - { "bindir", '\0' , POPT_ARG_STRING, NULL, DYN_BINDIR, - "Path to bin directory", "BINDIR" }, - { "lmhostsfile", '\0' , POPT_ARG_STRING, NULL, DYN_LMHOSTSFILE, - "Path to lmhosts file", "LMHOSTSFILE" }, - { "libdir", '\0' , POPT_ARG_STRING, NULL, DYN_LIBDIR, - "Path to shared library directory", "LIBDIR" }, - { "modulesdir", '\0' , POPT_ARG_STRING, NULL, DYN_MODULESDIR, - "Path to shared modules directory", "MODULESDIR" }, - { "shlibext", '\0' , POPT_ARG_STRING, NULL, DYN_SHLIBEXT, - "Shared library extension", "SHLIBEXT" }, - { "lockdir", '\0' , POPT_ARG_STRING, NULL, DYN_LOCKDIR, - "Path to lock file directory", "LOCKDIR" }, - { "statedir", '\0' , POPT_ARG_STRING, NULL, DYN_STATEDIR, - "Path to persistent state file directory", "STATEDIR" }, - { "cachedir", '\0' , POPT_ARG_STRING, NULL, DYN_CACHEDIR, - "Path to temporary cache file directory", "CACHEDIR" }, - { "piddir", '\0' , POPT_ARG_STRING, NULL, DYN_PIDDIR, - "Path to PID file directory", "PIDDIR" }, - { "smb-passwd-file", '\0' , POPT_ARG_STRING, NULL, DYN_SMB_PASSWD_FILE, - "Path to smbpasswd file", "SMB_PASSWD_FILE" }, - { "private-dir", '\0' , POPT_ARG_STRING, NULL, DYN_PRIVATE_DIR, - "Path to private data directory", "PRIVATE_DIR" }, - - POPT_TABLEEND -}; - /**************************************************************************** * get a password from a a file or file descriptor * exit on failure diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 412c9aab09..61ea17c825 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1071,7 +1071,6 @@ extern void build_options(bool screen); {"port", 'p', POPT_ARG_STRING, &ports, 0, "Listen on the specified ports"}, {"profiling-level", 'P', POPT_ARG_STRING, &profile_level, 0, "Set profiling level","PROFILE_LEVEL"}, POPT_COMMON_SAMBA - POPT_COMMON_DYNCONFIG POPT_TABLEEND }; struct smbd_parent_context *parent = NULL; |