diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-05 23:09:38 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-05 23:09:38 +0100 |
commit | aaa27706664da2855c09da0691c3717b571edaba (patch) | |
tree | 17cc8a7475f7062eb664d0201d660c77bf415a7e /source3/utils/smbcacls.c | |
parent | 3ba8fbef29aabfcd78e1170fcbfcf7bc943af6f9 (diff) | |
parent | 4a413e4bd177402a1697cffac43d35e94cc55102 (diff) | |
download | samba-aaa27706664da2855c09da0691c3717b571edaba.tar.gz samba-aaa27706664da2855c09da0691c3717b571edaba.tar.bz2 samba-aaa27706664da2855c09da0691c3717b571edaba.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 5a30f6377d37d8a5cadce4fb9a2fc19b78fc1709)
Diffstat (limited to 'source3/utils/smbcacls.c')
-rw-r--r-- | source3/utils/smbcacls.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 958f8e255e..134f561760 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -822,7 +822,7 @@ static int cacl_set(struct cli_state *cli, char *filename, *******************************************************/ static struct cli_state *connect_one(const char *server, const char *share) { - struct cli_state *c; + struct cli_state *c = NULL; struct sockaddr_storage ss; NTSTATUS nt_status; zero_addr(&ss); @@ -834,20 +834,33 @@ static struct cli_state *connect_one(const char *server, const char *share) } } - if (NT_STATUS_IS_OK(nt_status = cli_full_connection(&c, global_myname(), server, - &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 { + nt_status = cli_full_connection(&c, global_myname(), server, + &ss, 0, + share, "?????", + get_cmdline_auth_info_username(), + lp_workgroup(), + 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,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status))); return NULL; } + + if (get_cmdline_auth_info_smb_encrypt()) { + nt_status = cli_cm_force_encryption(c, + get_cmdline_auth_info_username(), + get_cmdline_auth_info_password(), + lp_workgroup(), + share); + if (!NT_STATUS_IS_OK(nt_status)) { + cli_shutdown(c); + c = NULL; + } + } + + return c; } /**************************************************************************** |