]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: Use cli_credentials directly
authorAndreas Schneider <asn@samba.org>
Wed, 13 Jan 2021 14:46:22 +0000 (15:46 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 13 Jan 2021 21:32:52 +0000 (21:32 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 13 21:32:52 UTC 2021 on sn-devel-184

source3/libsmb/libsmb_dir.c

index 3c42071ae1bc078949c988c62d6d272fbad678eb..eb12a6c2ebefa3c30e2a7be7fe38cf4d4af819c9 100644 (file)
@@ -564,7 +564,6 @@ SMBC_opendir_ctx(SMBCCTX *context,
                 size_t max_lmb_count;
                 struct sockaddr_storage *ip_list;
                 struct sockaddr_storage server_addr;
-                struct user_auth_info *u_info;
                struct cli_credentials *creds = NULL;
                NTSTATUS status;
 
@@ -584,8 +583,8 @@ SMBC_opendir_ctx(SMBCCTX *context,
                                  ? INT_MAX
                                  : smbc_getOptionBrowseMaxLmbCount(context));
 
-               u_info = user_auth_info_init(frame);
-               if (u_info == NULL) {
+               creds = cli_credentials_init(frame);
+               if (creds == NULL) {
                        if (dir) {
                                SAFE_FREE(dir->fname);
                                SAFE_FREE(dir);
@@ -594,10 +593,9 @@ SMBC_opendir_ctx(SMBCCTX *context,
                        errno = ENOMEM;
                        return NULL;
                }
-               set_cmdline_auth_info_username(u_info, user);
-               set_cmdline_auth_info_password(u_info, password);
 
-               creds = get_cmdline_auth_info_creds(u_info);
+               (void)cli_credentials_set_username(creds, user, CRED_SPECIFIED);
+               (void)cli_credentials_set_password(creds, password, CRED_SPECIFIED);
 
                /*
                  * We have server and share and path empty but options