diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmb_context.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index dd78bcee35..51948d1648 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -610,3 +610,23 @@ smbc_version(void) } +/* + * Set the credentials so DFS will work when following referrals. + */ +void +smbc_set_credentials(char *workgroup, + char *user, + char *password, + bool use_kerberos, + char *signing_state) +{ + + set_cmdline_auth_info_username(user); + set_cmdline_auth_info_password(password); + set_cmdline_auth_info_use_kerberos(use_kerberos); + if (! set_cmdline_auth_info_signing_state(signing_state)) { + DEBUG(0, ("Invalid signing state: %s", signing_state)); + } + set_global_myworkgroup(workgroup); + cli_cm_set_credentials(); +} |