diff options
Diffstat (limited to 'source4/utils')
-rw-r--r-- | source4/utils/ad2oLschema.c | 2 | ||||
-rw-r--r-- | source4/utils/net/net_machinepw.c | 2 | ||||
-rw-r--r-- | source4/utils/ntlm_auth.c | 32 | ||||
-rw-r--r-- | source4/utils/oLschema2ldif.c | 2 | ||||
-rwxr-xr-x | source4/utils/tests/test_net.sh | 7 | ||||
-rwxr-xr-x | source4/utils/tests/test_nmblookup.sh | 15 |
6 files changed, 32 insertions, 28 deletions
diff --git a/source4/utils/ad2oLschema.c b/source4/utils/ad2oLschema.c index 29fda09f3c..236b1fa350 100644 --- a/source4/utils/ad2oLschema.c +++ b/source4/utils/ad2oLschema.c @@ -32,7 +32,7 @@ */ #include "includes.h" -#include "ldb_includes.h" +#include "ldb.h" #include "system/locale.h" #include "lib/ldb/tools/cmdline.h" #include "param/param.h" diff --git a/source4/utils/net/net_machinepw.c b/source4/utils/net/net_machinepw.c index 4e3165dbfd..390eb8df0b 100644 --- a/source4/utils/net/net_machinepw.c +++ b/source4/utils/net/net_machinepw.c @@ -19,12 +19,12 @@ */ #include "includes.h" +#include "lib/events/events.h" #include "utils/net/net.h" #include "libnet/libnet.h" #include "libcli/security/security.h" #include "param/secrets.h" #include "param/param.h" -#include "lib/events/events.h" #include "lib/util/util_ldb.h" int net_machinepw_usage(struct net_context *ctx, int argc, const char **argv) diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index 074ab698cf..bd262683d5 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -59,22 +59,22 @@ enum stdio_helper_mode { typedef void (*stdio_helper_function)(enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2); static void manage_squid_basic_request (enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2); static void manage_gensec_request (enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2); static void manage_ntlm_server_1_request (enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2); static void manage_squid_request(struct loadparm_context *lp_ctx, @@ -248,7 +248,7 @@ static NTSTATUS local_pw_check_specified(struct loadparm_context *lp_ctx, static void manage_squid_basic_request(enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2) { char *user, *pass; @@ -280,7 +280,7 @@ static void manage_squid_basic_request(enum stdio_helper_mode stdio_helper_mode, static void manage_gensec_get_pw_request(enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **password) { DATA_BLOB in; @@ -298,7 +298,7 @@ static void manage_gensec_get_pw_request(enum stdio_helper_mode stdio_helper_mod if (strncmp(buf, "PW ", 3) == 0) { - *password = talloc_strndup(*private /* hopefully the right gensec context, useful to use for talloc */, + *password = talloc_strndup(*private1 /* hopefully the right gensec context, useful to use for talloc */, (const char *)in.data, in.length); if (*password == NULL) { @@ -380,7 +380,7 @@ static void gensec_want_feature_list(struct gensec_security *state, char* featur static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2) { DATA_BLOB in; @@ -405,15 +405,15 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, TALLOC_CTX *mem_ctx; - if (*private) { - state = (struct gensec_ntlm_state *)*private; + if (*private1) { + state = (struct gensec_ntlm_state *)*private1; } else { state = talloc_zero(NULL, struct gensec_ntlm_state); if (!state) { mux_printf(mux_id, "BH No Memory\n"); exit(1); } - *private = state; + *private1 = state; if (opt_password) { state->set_password = opt_password; } @@ -714,7 +714,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mode, struct loadparm_context *lp_ctx, - char *buf, int length, void **private, + char *buf, int length, void **private1, unsigned int mux_id, void **private2) { char *request, *parameter; @@ -922,7 +922,7 @@ static void manage_squid_request(struct loadparm_context *lp_ctx, enum stdio_hel static struct mux_private *mux_private; static void *normal_private; - void **private; + void **private1; buf = talloc_strdup(NULL, ""); @@ -1004,13 +1004,13 @@ static void manage_squid_request(struct loadparm_context *lp_ctx, enum stdio_hel (sizeof(*mux_private->private_pointers) * (mux_private->max_mux - prev_max))); }; - private = &mux_private->private_pointers[mux_id]; + private1 = &mux_private->private_pointers[mux_id]; } else { c = buf; - private = &normal_private; + private1 = &normal_private; } - fn(helper_mode, lp_ctx, c, length, private, mux_id, private2); + fn(helper_mode, lp_ctx, c, length, private1, mux_id, private2); talloc_free(buf); } diff --git a/source4/utils/oLschema2ldif.c b/source4/utils/oLschema2ldif.c index 6c4e6a9c80..701d221046 100644 --- a/source4/utils/oLschema2ldif.c +++ b/source4/utils/oLschema2ldif.c @@ -32,7 +32,7 @@ */ #include "includes.h" -#include "ldb_includes.h" +#include "ldb.h" #include "tools/cmdline.h" #include "dsdb/samdb/samdb.h" diff --git a/source4/utils/tests/test_net.sh b/source4/utils/tests/test_net.sh index 3406c87cda..eb598bf5e1 100755 --- a/source4/utils/tests/test_net.sh +++ b/source4/utils/tests/test_net.sh @@ -9,8 +9,9 @@ shift 4 failed=0 -samba4bindir=`dirname $0`/../../bin -smbclient=$samba4bindir/smbclient +samba4bindir="$BUILDDIR/bin" +smbclient="$samba4bindir/smbclient$EXEEXT" +net="$samba4bindir/net$EXEEXT" testit() { name="$1" @@ -28,7 +29,7 @@ testit() { return $status } -testit "domain join" $VALGRIND bin/net join $DOMAIN $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1` +testit "domain join" $VALGRIND $net join $DOMAIN $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1` testit "Test login with --machine-pass without kerberos" $VALGRIND $smbclient -c 'ls' $CONFIGURATION //$SERVER/tmp --machine-pass -k no || failed=`expr $failed + 1` diff --git a/source4/utils/tests/test_nmblookup.sh b/source4/utils/tests/test_nmblookup.sh index ad9b3ba799..e2230e162f 100755 --- a/source4/utils/tests/test_nmblookup.sh +++ b/source4/utils/tests/test_nmblookup.sh @@ -26,11 +26,14 @@ testit() { return $status } -testit "nmblookup -U \$SERVER_IP \$SERVER" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER -testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME -testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS -testit "nmblookup \$SERVER" bin/nmblookup $TORTURE_OPTIONS $SERVER -testit "nmblookup \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS $NETBIOSNAME -testit "nmblookup \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS $NETBIOSALIAS +samba4bindir="$BUILDDIR/bin" +nmblookup="$samba4bindir/nmblookup$EXEEXT" + +testit "nmblookup -U \$SERVER_IP \$SERVER" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER +testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME +testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS +testit "nmblookup \$SERVER" $nmblookup $TORTURE_OPTIONS $SERVER +testit "nmblookup \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS $NETBIOSNAME +testit "nmblookup \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS $NETBIOSALIAS exit $failed |