diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmb_server.c | 4 | ||||
-rw-r--r-- | source3/libsmb/libsmb_setget.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 7ec3eb5210..99aa74c67b 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -417,6 +417,10 @@ SMBC_server_internal(TALLOC_CTX *ctx, flags |= CLI_FULL_CONNECTION_USE_CCACHE; } + if (smbc_getOptionUseNTHash(context)) { + flags |= CLI_FULL_CONNECTION_USE_NT_HASH; + } + if (share == NULL || *share == '\0' || is_ipc) { /* * Try 139 first for IPC$ diff --git a/source3/libsmb/libsmb_setget.c b/source3/libsmb/libsmb_setget.c index 0a02346752..60bbc8bc5e 100644 --- a/source3/libsmb/libsmb_setget.c +++ b/source3/libsmb/libsmb_setget.c @@ -457,6 +457,24 @@ smbc_setOptionUseCCache(SMBCCTX *c, smbc_bool b) } } +/** Get whether to enable use of the winbind ccache */ +smbc_bool +smbc_getOptionUseNTHash(SMBCCTX *c) +{ + return (c->flags & SMB_CTX_FLAG_USE_NT_HASH) != 0; +} + +/** Set indication that the password supplied is the NT hash */ +void +smbc_setOptionUseNTHash(SMBCCTX *c, smbc_bool b) +{ + if (b) { + c->flags |= SMB_CTX_FLAG_USE_NT_HASH; + } else { + c->flags &= ~SMB_CTX_FLAG_USE_NT_HASH; + } +} + /** Get the function for obtaining authentication data */ smbc_get_auth_data_fn smbc_getFunctionAuthData(SMBCCTX *c) |