s3:auth: explicitly add BUILTIN\Guests to the guest token
authorRalph Boehme <slow@samba.org>
Mon, 13 May 2019 18:16:47 +0000 (20:16 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Jun 2019 16:55:26 +0000 (16:55 +0000)
commita66af4c96accba4ee64eeb1958458b69f3ccec1d
treebd1e81d2c013637d173cd39ec122cea503f05f59
parent0e88f98855e24cfddb55bef65c5910b8e662c630
s3:auth: explicitly add BUILTIN\Guests to the guest token

This changes ensures that smbd always adds BUILTIN\Guests to the guest token
which is required for guest authentication.

Currently the guest token depends on the on-disk configured group mappings. If
there's an existing group mapping for BUILTIN\Guests, but LOCALSAM\Guest is not
a member, the final guest token won't contain BUILTIN\Guests.

For SMB2 the flag SMB2_SESSION_FLAG_IS_GUEST will not be set in the final SMB2
SESSION_SETUP response, because smbd sets it based on the token containing the
BUILTIN\Guests SID S-1-5-32-546.

At the same time, the packet is not signed which causes Windows clients and
smbclient to reject the unsigned SMB2 SESSION_SETUP response.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13944

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun  5 16:55:26 UTC 2019 on sn-devel-184
selftest/knownfail.d/samba3.blackbox.guest [deleted file]
source3/auth/auth_util.c