summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/examples/netdomjoin/netdomjoin.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-04 15:18:42 +0100
committerGünther Deschner <gd@samba.org>2008-01-04 15:21:41 +0100
commitf78c318eb0b50862b2e6ed6783ee5279af91709c (patch)
treeaba6531c3eeb1bcdc8c7dba46a5f4b553f1bd5dc /source3/lib/netapi/examples/netdomjoin/netdomjoin.c
parent564a54aa168a0866dbd8fb3ef512b1836be11442 (diff)
downloadsamba-f78c318eb0b50862b2e6ed6783ee5279af91709c.tar.gz
samba-f78c318eb0b50862b2e6ed6783ee5279af91709c.tar.bz2
samba-f78c318eb0b50862b2e6ed6783ee5279af91709c.zip
Add debug switch to netdomjoin.
Guenther (This used to be commit 2b221708c07967bccd68e8c7983791b4628405bb)
Diffstat (limited to 'source3/lib/netapi/examples/netdomjoin/netdomjoin.c')
-rw-r--r--source3/lib/netapi/examples/netdomjoin/netdomjoin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin/netdomjoin.c b/source3/lib/netapi/examples/netdomjoin/netdomjoin.c
index e8b529927f..634d265597 100644
--- a/source3/lib/netapi/examples/netdomjoin/netdomjoin.c
+++ b/source3/lib/netapi/examples/netdomjoin/netdomjoin.c
@@ -1,7 +1,7 @@
/*
* Unix SMB/CIFS implementation.
* Join Support (cmdline + netapi)
- * Copyright (C) Guenther Deschner 2007
+ * Copyright (C) Guenther Deschner 2007-2008
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -56,7 +56,10 @@ int main(int argc, char **argv)
if (argc < 2) {
printf("usage: netdomjoin\n");
- printf("\t[hostname=HOSTNAME] [domain=DOMAIN] <ou=OU> <usero=USERO> <passwordo=PASSWORDO> <userd=USERD> <passwordd=PASSWORDD>\n");
+ printf("\t[hostname] [domain=DOMAIN] <ou=OU> "
+ "<usero=USERO> <passwordo=PASSWORDO> "
+ "<userd=USERD> <passwordd=PASSWORDD> "
+ "<debug=DEBUGLEVEL>\n");
return 0;
}
@@ -87,6 +90,11 @@ int main(int argc, char **argv)
str = get_string_param(argv[i]);
libnetapi_set_password(ctx, str);
}
+ if (strncasecmp(argv[i], "debug", strlen("debug"))== 0) {
+ const char *str = NULL;
+ str = get_string_param(argv[i]);
+ libnetapi_set_debuglevel(ctx, str);
+ }
}
status = NetJoinDomain(server_name,