summaryrefslogtreecommitdiff
path: root/source3/utils/pdbedit.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-03-24 21:29:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:53 -0500
commitfe962d2e487994f7969cda3743f2c812df8e1e24 (patch)
tree6aa58b3c6e12b24f7242b91dd2b9152b33f537c8 /source3/utils/pdbedit.c
parent9527f932721cb6bcd8275a4179347e747e92d0e2 (diff)
downloadsamba-fe962d2e487994f7969cda3743f2c812df8e1e24.tar.gz
r21962: Make pdbedit use the configfile specified by -s
(This used to be commit f540c18b2bbf1d3138aea6938c5313ca2e100215)
Diffstat (limited to 'source3/utils/pdbedit.c')
-rw-r--r--source3/utils/pdbedit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 0e8de82043c..534dd994fe0 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -761,6 +761,7 @@ int main (int argc, char **argv)
static char *pwd_time_format = NULL;
static BOOL pw_from_stdin = False;
struct pdb_methods *bin, *bout, *bdef;
+ char *configfile = NULL;
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -818,6 +819,9 @@ int main (int argc, char **argv)
case 'C':
account_policy_value_set = True;
break;
+ case 's':
+ configfile = optarg;
+ break;
}
}
@@ -826,7 +830,8 @@ int main (int argc, char **argv)
if (user_name == NULL)
user_name = poptGetArg(pc);
- if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
+ if (!lp_load(configfile?configfile:dyn_CONFIGFILE,
+ True,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
exit(1);
}