diff options
author | Jeremy Allison <jra@samba.org> | 2017-05-09 16:10:03 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-05-11 20:30:13 +0200 |
commit | b2de5a81bf2e5a79b101859c738fc057af7308ed (patch) | |
tree | 439e0d660e3ab059deb4b0108170f3a31a9a8d70 /source4/torture/unix | |
parent | dd4a3ce92792c4687f92d4b9e88f7bbee6cad593 (diff) | |
download | samba-b2de5a81bf2e5a79b101859c738fc057af7308ed.tar.gz |
s4: popt: Global replace of cmdline_credentials -> popt_get_cmdline_credentials().
Add one use of popt_set_cmdline_credentials().
Fix 80 column limits when cmdline_credentials changes
to popt_get_cmdline_credentials().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/torture/unix')
-rw-r--r-- | source4/torture/unix/unix_info2.c | 2 | ||||
-rw-r--r-- | source4/torture/unix/whoami.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source4/torture/unix/unix_info2.c b/source4/torture/unix/unix_info2.c index 821c8df5099..14f6d776081 100644 --- a/source4/torture/unix/unix_info2.c +++ b/source4/torture/unix/unix_info2.c @@ -60,7 +60,7 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx) status = smbcli_full_connection(tctx, &cli, host, lpcfg_smb_ports(tctx->lp_ctx), share, NULL, lpcfg_socket_options(tctx->lp_ctx), - cmdline_credentials, + popt_get_cmdline_credentials(), lpcfg_resolve_context(tctx->lp_ctx), tctx->ev, &options, &session_options, lpcfg_gensec_settings(tctx, tctx->lp_ctx)); diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c index 53921d49201..bb70e4781ae 100644 --- a/source4/torture/unix/whoami.c +++ b/source4/torture/unix/whoami.c @@ -360,7 +360,7 @@ bool torture_unix_whoami(struct torture_context *torture) struct ldb_context *ldb; const char *addc, *host; - cli = connect_to_server(torture, cmdline_credentials); + cli = connect_to_server(torture, popt_get_cmdline_credentials()); torture_assert(torture, cli, "connecting to server with authenticated credentials"); /* Test basic authenticated mapping. */ @@ -375,7 +375,9 @@ bool torture_unix_whoami(struct torture_context *torture) bool guest = whoami.mapping_flags & SMB_WHOAMI_GUEST; torture_comment(torture, "checking whether we were logged in as guest... %s\n", guest ? "YES" : "NO"); - torture_assert(torture, cli_credentials_is_anonymous(cmdline_credentials) == guest, + torture_assert(torture, + cli_credentials_is_anonymous( + popt_get_cmdline_credentials()) == guest, "login did not credentials map to guest"); } else { torture_comment(torture, "server does not support SMB_WHOAMI_GUEST flag\n"); @@ -386,7 +388,7 @@ bool torture_unix_whoami(struct torture_context *torture) if (addc) { ldb = ldb_wrap_connect(torture, torture->ev, torture->lp_ctx, talloc_asprintf(torture, "ldap://%s", addc), - NULL, cmdline_credentials, 0); + NULL, popt_get_cmdline_credentials(), 0); torture_assert(torture, ldb, "ldb connect failed"); /* We skip this testing if we could not contact the LDAP server */ |