summaryrefslogtreecommitdiffstats
path: root/source3/lib/popt_common.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-01-08 13:35:34 +1300
committerStefan Metzmacher <metze@samba.org>2014-02-12 16:42:14 +0100
commite02c94d13bab4fb4ad791b7c0dedd963c33804cb (patch)
tree2217be1665c29bf1f71365faffb148993c05070d /source3/lib/popt_common.c
parent276b233c0090d51b59dbe06ae66a14ee09cbb4c2 (diff)
downloadsamba-e02c94d13bab4fb4ad791b7c0dedd963c33804cb.tar.gz
samba-e02c94d13bab4fb4ad791b7c0dedd963c33804cb.tar.xz
samba-e02c94d13bab4fb4ad791b7c0dedd963c33804cb.zip
cmdline: Remove dynconfig hooks in command line processing
This removes the ability to set paths like the sbindir, bindir, and changes the tool for setting lockdir statedir etc to be via --option="lock dir=/var/lock". These were originally added by commit 90a6873b0570f2691ba8d8fd11154c856bdd4415 by James Peach <jpeach@samba.org> The important use case, qemu, does not use these options, but specifies these directories via an smb.conf. They are being removed to remove a layer from the loadparm system, now that options can be specified from the command line. It will also make it easier to generate the affected parameters from the XML documentation if this layer of indirection is removed. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 12 16:42:14 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/lib/popt_common.c')
-rw-r--r--source3/lib/popt_common.c145
1 files changed, 0 insertions, 145 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index e8eca57fae0..25558091c7d 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