summaryrefslogtreecommitdiff
path: root/source4/lib/cmdline
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-10 19:17:40 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-11 15:13:16 +0000
commit837bcb9e0fe50acb11c4051fbd9b2d32abc8680e (patch)
tree53ffcc808796433d7bc4125307338a0f68ca8128 /source4/lib/cmdline
parentdf7523c79208cc374060787f726f9066007d88ea (diff)
downloadsamba-837bcb9e0fe50acb11c4051fbd9b2d32abc8680e.tar.gz
samba-837bcb9e0fe50acb11c4051fbd9b2d32abc8680e.tar.bz2
samba-837bcb9e0fe50acb11c4051fbd9b2d32abc8680e.zip
popt_credentials: Implement pending machine account manually, rather than through credentials.
Diffstat (limited to 'source4/lib/cmdline')
-rw-r--r--source4/lib/cmdline/popt_credentials.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/lib/cmdline/popt_credentials.c b/source4/lib/cmdline/popt_credentials.c
index 1776fb2f6f..11f4036e3f 100644
--- a/source4/lib/cmdline/popt_credentials.c
+++ b/source4/lib/cmdline/popt_credentials.c
@@ -31,13 +31,13 @@
* -k,--use-kerberos
* -N,--no-pass
* -S,--signing
- * -P --machine-pass
- * --simple-bind-dn
- * --password
+ * -P,--machine-pass
+ * --simple-bind-dn
+ * --password
*/
-
static bool dont_ask;
+static bool machine_account_pending;
enum opt { OPT_SIMPLE_BIND_DN, OPT_PASSWORD, OPT_KERBEROS, OPT_SIGN, OPT_ENCRYPT };
@@ -65,6 +65,11 @@ static void popt_common_credentials_callback(poptContext con,
if (!dont_ask) {
cli_credentials_set_cmdline_callbacks(cmdline_credentials);
}
+
+ if (machine_account_pending) {
+ cli_credentials_set_machine_account(cmdline_credentials, cmdline_lp_ctx);
+ }
+
return;
}
@@ -97,7 +102,7 @@ static void popt_common_credentials_callback(poptContext con,
case 'P':
/* Later, after this is all over, get the machine account details from the secrets.ldb */
- cli_credentials_set_machine_account_pending(cmdline_credentials, cmdline_lp_ctx);
+ machine_account_pending = true;
break;
case OPT_KERBEROS: