Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
8761dbe1 by Thomas Guillem at 2022-07-07T13:16:16+02:00
Revert "smb2: fix anonymous login"

This reverts commit 205963ad09401ab3cbe5bf92c7f9b109092f87f4.

According to git blame on libsmb2, anonymous login was always enabled
with a NULL password.

I don't know what happened when I tested this reverted commit, I may
have mix up VLC or/and smb/smb2/dsm builds.

For future reference, see libsmb2/lib/ntlmssp.c:
...
encode_ntlm_auth(...)
{
...
    if (auth_data->password == NULL) {
            anonymous = 1;
            goto encode;
    }
...
}

Fixes #27113

- - - - -


1 changed file:

- modules/access/smb2.c


Changes:

=====================================
modules/access/smb2.c
=====================================
@@ -691,8 +691,8 @@ vlc_smb2_connect_open_share(stream_t *access, const char 
*url,
     if (!username)
     {
         username = "Guest";
-        /* An empty password enable ntlmssp anonymous login */
-        password = "";
+        /* A NULL password enable ntlmssp anonymous login */
+        password = NULL;
     }
 
     smb2_set_security_mode(sys->smb2, SMB2_NEGOTIATE_SIGNING_ENABLED);



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/8761dbe132bcd6f8b4bc9a5c29672f9937eeedae

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/8761dbe132bcd6f8b4bc9a5c29672f9937eeedae
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to