diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-27 23:51:03 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-27 23:51:03 -0800 |
commit | afce2b245a8ff137a4ecea547c3cfb65ab58dc15 (patch) | |
tree | 56c8f1258e0f042977b2f0defef53f96b9f6bfe8 /source3/client | |
parent | 33f01360e0a40f6d1fa03035979d816ff9198d85 (diff) | |
download | samba-afce2b245a8ff137a4ecea547c3cfb65ab58dc15.tar.gz samba-afce2b245a8ff137a4ecea547c3cfb65ab58dc15.tar.bz2 samba-afce2b245a8ff137a4ecea547c3cfb65ab58dc15.zip |
Add the capability to set "smb encrypt = required"
on a share (or global) and have the server reply with
ACCESS_DENIED for all non-encrypted traffic (except
that used to query encryption requirements and set
encryption state).
Jeremy.
(This used to be commit d241bfa57729bb934ada6beabf842a2ca7b4f8a2)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 665a051190..53669bc8d0 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2466,17 +2466,30 @@ static int cmd_posix(void) return 1; } } + if (caplow & CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP) { + caps = talloc_asprintf_append(caps, "posix_encrypt "); + if (!caps) { + return 1; + } + } + if (caplow & CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP) { + caps = talloc_asprintf_append(caps, "mandatory_posix_encrypt "); + if (!caps) { + return 1; + } + } if (*caps && caps[strlen(caps)-1] == ' ') { caps[strlen(caps)-1] = '\0'; } + + d_printf("Server supports CIFS capabilities %s\n", caps); + if (!cli_set_unix_extensions_capabilities(cli, major, minor, caplow, caphigh)) { d_printf("Can't set UNIX CIFS extensions capabilities. %s.\n", cli_errstr(cli)); return 1; } - d_printf("Selecting server supported CIFS capabilities %s\n", caps); - if (caplow & CIFS_UNIX_POSIX_PATHNAMES_CAP) { CLI_DIRSEP_CHAR = '/'; *CLI_DIRSEP_STR = '/'; |