diff options
-rw-r--r-- | source3/include/popt_common.h | 2 | ||||
-rw-r--r-- | source3/lib/popt_common.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index 040fae9b21..70d7278f01 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -29,6 +29,7 @@ extern struct poptOption popt_common_configfile[]; extern struct poptOption popt_common_version[]; extern struct poptOption popt_common_credentials[]; extern struct poptOption popt_common_debuglevel[]; +extern struct poptOption popt_common_option[]; extern const struct poptOption popt_common_dynconfig[]; #ifndef POPT_TABLEEND @@ -44,6 +45,7 @@ extern const struct poptOption popt_common_dynconfig[]; CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \ "Build-time configuration overrides:", NULL }, #define POPT_COMMON_DEBUGLEVEL { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debuglevel, 0, "Common samba debugging:", NULL }, +#define POPT_COMMON_OPTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_option, 0, "Common samba commandline config:", NULL }, struct user_auth_info { char *username; diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 32906432df..8ff2b8023b 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -193,6 +193,11 @@ struct poptOption popt_common_debuglevel[] = { POPT_TABLEEND }; +struct poptOption popt_common_option[] = { + { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_POST, (void *)popt_common_callback }, + { "option", 0, POPT_ARG_STRING, NULL, OPT_OPTION, "Set smb.conf option from command line", "name=value" }, + POPT_TABLEEND +}; /* Handle command line options: * --sbindir |