summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-05 00:50:03 -0800
committerJeremy Allison <jra@samba.org>2008-01-05 00:50:03 -0800
commita41972e8012d5028ff19721a869a3c2322c48158 (patch)
tree1b2360381b0cae05235bf4e51c45d6687dafff6c /source3/utils
parent722d288d211de98d3fc55a9ce4521296d7fb6f77 (diff)
downloadsamba-a41972e8012d5028ff19721a869a3c2322c48158.tar.gz
samba-a41972e8012d5028ff19721a869a3c2322c48158.tar.bz2
samba-a41972e8012d5028ff19721a869a3c2322c48158.zip
Fix -e for smbcquotas.
Jeremy. (This used to be commit f97b1247c1053f47aef64be95ab9b3c3d8702c8a)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcquotas.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index e6aa5e86cf..508a2dc8ca 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -380,20 +380,33 @@ static struct cli_state *connect_one(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(),
+ 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);
+ return NULL;
+ }
+ }
+
+ return c;
}
/****************************************************************************