s3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 14:38:33 +0000 (16:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 14:44:17 +0000 (16:44 +0200)
commitf2806cca536de82739b5e03d8f98c03cdcf14103
treea152580506b9c309a3e2914ceb7636a9575e0820
parent42251d06631eb5cbac1c23f46bf8796247cf692e
s3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()

For all requests which don't operate on a tcon, we should call
change_to_root_user(), to match the SMB1 behavior.

For SMB1 we do the following operations without AS_USER:

/* 0x70 */ { "SMBtcon",reply_tcon,0},
/* 0x71 */ { "SMBtdis",reply_tdis,DO_CHDIR},
/* 0x72 */ { "SMBnegprot",reply_negprot,0},
/* 0x73 */ { "SMBsesssetupX",reply_sesssetup_and_X,0},
/* 0x74 */ { "SMBulogoffX",reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */
/* 0x75 */ { "SMBtconX",reply_tcon_and_X,0},
...
/* 0x2b */ { "SMBecho",reply_echo,0},
...
/* 0xa4 */ { "SMBntcancel",reply_ntcancel, 0 },

For SMB2tdis we still call smbd_smb2_request_check_tcon()
as close_cnum() calls change_to_root_user() when needed.

metze
source3/smbd/smb2_server.c