From 6c13a46732f61b596273e2bd7ff3c78a4b953195 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 11 Jun 2012 13:29:10 +0200 Subject: s3-libsmbclient: Add OptionUseNTHash Signed-off-by: Stefan Metzmacher --- source3/libsmb/libsmb_setget.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source3/libsmb/libsmb_setget.c') 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) -- cgit