[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-655-g56251f7
Stefan Metzmacher
metze at samba.org
Fri Dec 14 18:40:44 GMT 2007
The branch, v3-2-test has been updated
via 56251f78524416435299e26fca405e77d0f42043 (commit)
via 33cbd6903e8b468a782fb5d6913eb82824d3b347 (commit)
via af3392cc20942158ac9e0a533799c5904ff23347 (commit)
from a8a74fc88cb6f4be1efdc1afab9b91defcd015ae (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 56251f78524416435299e26fca405e77d0f42043
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Dec 14 19:39:49 2007 +0100
selftest: reenable wbinfo tests and pass --configfile instead of -s
metze
commit 33cbd6903e8b468a782fb5d6913eb82824d3b347
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Dec 14 19:38:23 2007 +0100
wbinfo: use POPT_COMMON_CONFIGFILE
We can't use POPT_COMMON_SAMBA as the -s option is
already used by -s, --sid-to-name=SID.
Also load the config file after processing the cmdline options
metze
commit af3392cc20942158ac9e0a533799c5904ff23347
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Dec 14 19:36:14 2007 +0100
add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)
metze
-----------------------------------------------------------------------
Summary of changes:
source/include/popt_common.h | 2 ++
source/lib/popt_common.c | 6 ++++++
source/nsswitch/wbinfo.c | 22 ++++++++++++----------
source/script/tests/selftest.sh | 2 +-
source/script/tests/test_wbinfo_s3.sh | 2 +-
source/script/tests/tests_all.sh | 2 +-
6 files changed, 23 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/popt_common.h b/source/include/popt_common.h
index f77f69d..1d3cc57 100644
--- a/source/include/popt_common.h
+++ b/source/include/popt_common.h
@@ -25,6 +25,7 @@
/* Common popt structures */
extern struct poptOption popt_common_samba[];
extern struct poptOption popt_common_connection[];
+extern struct poptOption popt_common_configfile[];
extern struct poptOption popt_common_version[];
extern struct poptOption popt_common_credentials[];
extern const struct poptOption popt_common_dynconfig[];
@@ -36,6 +37,7 @@ extern const struct poptOption popt_common_dynconfig[];
#define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_samba, 0, "Common samba options:", NULL },
#define POPT_COMMON_CONNECTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_connection, 0, "Connection options:", NULL },
#define POPT_COMMON_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version, 0, "Common samba options:", NULL },
+#define POPT_COMMON_CONFIGFILE { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile, 0, "Common samba config:", NULL },
#define POPT_COMMON_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL },
#define POPT_COMMON_DYNCONFIG { NULL, 0, POPT_ARG_INCLUDE_TABLE, \
CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \
diff --git a/source/lib/popt_common.c b/source/lib/popt_common.c
index bc67a0f..b3a84a6 100644
--- a/source/lib/popt_common.c
+++ b/source/lib/popt_common.c
@@ -150,6 +150,12 @@ struct poptOption popt_common_samba[] = {
POPT_TABLEEND
};
+struct poptOption popt_common_configfile[] = {
+ { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *)popt_common_callback },
+ { "configfile", 0, POPT_ARG_STRING, NULL, 's', "Use alternate configuration file", "CONFIGFILE" },
+ POPT_TABLEEND
+};
+
struct poptOption popt_common_version[] = {
{ NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback },
{ "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" },
diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c
index 2466af1..37ff8a7 100644
--- a/source/nsswitch/wbinfo.c
+++ b/source/nsswitch/wbinfo.c
@@ -1340,6 +1340,7 @@ int main(int argc, char **argv, char **envp)
/* "user%password,DOM\\user%password,user at EXAMPLE.COM,EXAMPLE.COM\\user%password" }, */
#endif
{ "separator", 0, POPT_ARG_NONE, 0, OPT_SEPARATOR, "Get the active winbind separator", NULL },
+ POPT_COMMON_CONFIGFILE
POPT_COMMON_VERSION
POPT_TABLEEND
};
@@ -1347,16 +1348,6 @@ int main(int argc, char **argv, char **envp)
/* Samba client initialisation */
load_case_tables();
- if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
- d_fprintf(stderr, "wbinfo: error opening config file %s. Error was %s\n",
- get_dyn_CONFIGFILE(), strerror(errno));
- exit(1);
- }
-
- if (!init_names())
- return 1;
-
- load_interfaces();
/* Parse options */
@@ -1375,6 +1366,17 @@ int main(int argc, char **argv, char **envp)
poptFreeContext(pc);
+ if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
+ d_fprintf(stderr, "wbinfo: error opening config file %s. Error was %s\n",
+ get_dyn_CONFIGFILE(), strerror(errno));
+ exit(1);
+ }
+
+ if (!init_names())
+ return 1;
+
+ load_interfaces();
+
pc = poptGetContext(NULL, argc, (const char **)argv, long_options,
POPT_CONTEXT_KEEP_FIRST);
diff --git a/source/script/tests/selftest.sh b/source/script/tests/selftest.sh
index 6810ec1..2250a81 100755
--- a/source/script/tests/selftest.sh
+++ b/source/script/tests/selftest.sh
@@ -49,7 +49,7 @@ PRIVATEDIR=$PREFIX_ABS/private
LOCKDIR=$PREFIX_ABS/lockdir
LOGDIR=$PREFIX_ABS/logs
SOCKET_WRAPPER_DIR=$PREFIX/sw
-CONFIGURATION="-s $CONFFILE"
+CONFIGURATION="--configfile $CONFFILE"
SAMBA4CONFIGURATION="-s $SAMBA4CONFFILE"
NSS_WRAPPER_PASSWD="$PRIVATEDIR/passwd"
NSS_WRAPPER_GROUP="$PRIVATEDIR/group"
diff --git a/source/script/tests/test_wbinfo_s3.sh b/source/script/tests/test_wbinfo_s3.sh
index abd6146..6a8faa1 100755
--- a/source/script/tests/test_wbinfo_s3.sh
+++ b/source/script/tests/test_wbinfo_s3.sh
@@ -40,7 +40,7 @@ NEWIFS=$':'
IFS=$NEWIFS
for t in $tests; do
IFS=$OLDIFS
- testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $ADDARGS $t || failed=`expr $failed + 1`
+ testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $CONFIGURATION $ADDARGS $t || failed=`expr $failed + 1`
IFS=$NEWIFS
done
IFS=$OLDIFS
diff --git a/source/script/tests/tests_all.sh b/source/script/tests/tests_all.sh
index a110d60..12789aa 100755
--- a/source/script/tests/tests_all.sh
+++ b/source/script/tests/tests_all.sh
@@ -2,7 +2,7 @@
$SCRIPTDIR/test_local_s3.sh || failed=`expr $failed + $?`
$SCRIPTDIR/test_smbtorture_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
$SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP || failed=`expr $failed + $?`
-#$SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?`
+$SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?`
SMBTORTURE4VERSION=`$SMBTORTURE4 --version`
if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
--
Samba Shared Repository
More information about the samba-cvs
mailing list