svn commit: samba r21962 - in branches/SAMBA_3_0/source/utils: .

vlendec at samba.org vlendec at samba.org
Sat Mar 24 21:29:54 GMT 2007


Author: vlendec
Date: 2007-03-24 21:29:53 +0000 (Sat, 24 Mar 2007)
New Revision: 21962

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21962

Log:
Make pdbedit use the configfile specified by -s
Modified:
   branches/SAMBA_3_0/source/utils/pdbedit.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/pdbedit.c
===================================================================
--- branches/SAMBA_3_0/source/utils/pdbedit.c	2007-03-24 18:22:20 UTC (rev 21961)
+++ branches/SAMBA_3_0/source/utils/pdbedit.c	2007-03-24 21:29:53 UTC (rev 21962)
@@ -761,6 +761,7 @@
 	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 @@
 		case 'C':
 			account_policy_value_set = True;
 			break;
+		case 's':
+			configfile = optarg;
+			break;
 		}
 	}
 
@@ -826,7 +830,8 @@
 	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);
 	}



More information about the samba-cvs mailing list