mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3:utils: s3:utils: Correctly wire winbind ccache support for smbget
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
e22eccbe88
commit
960fe1ca27
@ -22,6 +22,7 @@
|
||||
#include "libsmbclient.h"
|
||||
#include "cmdline_contexts.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "auth/gensec/gensec.h"
|
||||
|
||||
static int columns = 0;
|
||||
|
||||
@ -864,6 +865,8 @@ int main(int argc, char **argv)
|
||||
enum credentials_use_kerberos use_kerberos = CRED_USE_KERBEROS_DESIRED;
|
||||
smbc_smb_encrypt_level encrypt_level = SMBC_ENCRYPTLEVEL_DEFAULT;
|
||||
bool is_nt_hash = false;
|
||||
uint32_t gensec_features;
|
||||
bool use_wbccache = false;
|
||||
SMBCCTX *smb_ctx = NULL;
|
||||
|
||||
smb_init_locale();
|
||||
@ -988,6 +991,11 @@ int main(int argc, char **argv)
|
||||
is_nt_hash = cli_credentials_is_password_nt_hash(creds);
|
||||
smbc_setOptionUseNTHash(smb_ctx, is_nt_hash);
|
||||
|
||||
/* Check if we should use the winbind ccache */
|
||||
gensec_features = cli_credentials_get_gensec_features(creds);
|
||||
use_wbccache = (gensec_features & GENSEC_FEATURE_NTLM_CCACHE);
|
||||
smbc_setOptionUseCCache(smb_ctx, use_wbccache);
|
||||
|
||||
columns = get_num_cols();
|
||||
|
||||
total_start_time = time_mono(NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user