diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-06 18:58:01 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-06 18:58:01 -0800 |
commit | e2ae63bcf72ac6a98d3b74281cba514b2e53f306 (patch) | |
tree | ffb0f02eb9df8e1e1170c9ad815b6f9a8a49a871 | |
parent | 79c3aef7ea66b61a9df89ed40943586ca54c82ab (diff) | |
download | samba-e2ae63bcf72ac6a98d3b74281cba514b2e53f306.tar.gz samba-e2ae63bcf72ac6a98d3b74281cba514b2e53f306.tar.bz2 samba-e2ae63bcf72ac6a98d3b74281cba514b2e53f306.zip |
Make all the tools use the proper accessor functions.
Jeremy.
(This used to be commit 6d61bb87975839adb25c304e5e5041f91b12d236)
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 4 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.c | 12 | ||||
-rw-r--r-- | source3/utils/smbcacls.c | 7 | ||||
-rw-r--r-- | source3/utils/smbcquotas.c | 20 |
4 files changed, 22 insertions, 21 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 1566b95575..a7969bddd1 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -2674,8 +2674,8 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli, get_cmdline_auth_info_username(), lp_workgroup(), get_cmdline_auth_info_password(), - cmdline_auth_info.use_kerberos ? CLI_FULL_CONNECTION_USE_KERBEROS : 0, - cmdline_auth_info.signing_state, NULL); + get_cmdline_auth_info_use_kerberos() ? CLI_FULL_CONNECTION_USE_KERBEROS : 0, + get_cmdline_auth_info_signing_state(), NULL); if ( !NT_STATUS_IS_OK(nt_status) ) return WERR_GENERAL_FAILURE; diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 7b4589efa9..627c821baa 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -823,10 +823,10 @@ out_free: * from stdin if necessary */ - if (!cmdline_auth_info.got_pass) { + if (!get_cmdline_auth_info_got_pass()) { char *pass = getpass("Password:"); if (pass) { - pstrcpy(cmdline_auth_info.password, pass); + set_cmdline_auth_info_password(pass); } } @@ -838,11 +838,11 @@ out_free: nt_status = cli_full_connection(&cli, global_myname(), server, opt_ipaddr ? &server_ss : NULL, opt_port, "IPC$", "IPC", - cmdline_auth_info.username, + get_cmdline_auth_info_username(), lp_workgroup(), - cmdline_auth_info.password, - cmdline_auth_info.use_kerberos ? CLI_FULL_CONNECTION_USE_KERBEROS : 0, - cmdline_auth_info.signing_state,NULL); + get_cmdline_auth_info_password(), + get_cmdline_auth_info_use_kerberos() ? CLI_FULL_CONNECTION_USE_KERBEROS : 0, + get_cmdline_auth_info_signing_state(),NULL); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status))); diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index e3f94cd458..1057d35db3 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -816,11 +816,10 @@ static struct cli_state *connect_one(const char *server, const char *share) NTSTATUS nt_status; zero_addr(&ss); - if (!cmdline_auth_info.got_pass) { + if (!get_cmdline_auth_info_got_pass()) { char *pass = getpass("Password: "); if (pass) { - pstrcpy(cmdline_auth_info.password, pass); - cmdline_auth_info.got_pass = True; + set_cmdline_auth_info_password(pass); } } @@ -831,7 +830,7 @@ static struct cli_state *connect_one(const char *server, const char *share) lp_workgroup(), get_cmdline_auth_info_password(), 0, - get_cmdline_auth_info.signing_state(), + get_cmdline_auth_info_signing_state(), NULL))) { return c; } else { diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index 3aa9e76a14..34a547d404 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -373,20 +373,22 @@ static struct cli_state *connect_one(const char *share) NTSTATUS nt_status; zero_addr(&ss); - if (!cmdline_auth_info.got_pass) { + if (!get_cmdline_auth_info_got_pass()) { char *pass = getpass("Password: "); if (pass) { - pstrcpy(cmdline_auth_info.password, pass); - cmdline_auth_info.got_pass = True; + set_cmdline_auth_info_password(pass); } } if (NT_STATUS_IS_OK(nt_status = cli_full_connection(&c, global_myname(), server, - &ss, 0, - share, "?????", - cmdline_auth_info.username, lp_workgroup(), - cmdline_auth_info.password, 0, - cmdline_auth_info.signing_state, NULL))) { + &ss, 0, + share, "?????", + get_cmdline_auth_info_username(), + lp_workgroup(), + get_cmdline_auth_info_password(), + 0, + get_cmdline_auth_info_signing_state(), + NULL))) { return c; } else { DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status))); @@ -511,7 +513,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" }, todo = USER_QUOTA; if (!fix_user) { - username_str = talloc_strdup(frame, cmdline_auth_info.username); + username_str = talloc_strdup(frame, get_cmdline_auth_info_username()); if (!username_str) { exit(EXIT_PARSE_ERROR); } |