diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-08-06 10:04:48 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-08-07 11:16:36 +0200 |
commit | e01333242f149fcbdd9db3b2195c1543c3f0647f (patch) | |
tree | 21dc62ef261c02ff3e3989a7d8c0e3d7e943c468 /source3 | |
parent | f69ed57d0faff446f2c66591cef941dfc1675881 (diff) | |
download | samba-e01333242f149fcbdd9db3b2195c1543c3f0647f.tar.gz samba-e01333242f149fcbdd9db3b2195c1543c3f0647f.tar.bz2 samba-e01333242f149fcbdd9db3b2195c1543c3f0647f.zip |
s3:smb2_server: add .as_root to smbd_smb2_dispatch_table
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/smb2_server.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 6156370c25..5fcf03c51c 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -37,22 +37,35 @@ static const struct smbd_smb2_dispatch_table { const char *name; bool need_session; bool need_tcon; + bool as_root; } smbd_smb2_table[] = { #define _OP(o) .opcode = o, .name = #o { _OP(SMB2_OP_NEGPROT), + .as_root = true, },{ _OP(SMB2_OP_SESSSETUP), + .as_root = true, },{ _OP(SMB2_OP_LOGOFF), .need_session = true, + .as_root = true, },{ _OP(SMB2_OP_TCON), .need_session = true, + /* + * This call needs to be run as root. + * + * smbd_smb2_request_process_tcon() + * calls make_connection_snum(), which will call + * change_to_user(), when needed. + */ + .as_root = true, },{ _OP(SMB2_OP_TDIS), .need_session = true, .need_tcon = true, + .as_root = true, },{ _OP(SMB2_OP_CREATE), .need_session = true, @@ -83,8 +96,10 @@ static const struct smbd_smb2_dispatch_table { .need_tcon = true, },{ _OP(SMB2_OP_CANCEL), + .as_root = true, },{ _OP(SMB2_OP_KEEPALIVE), + .as_root = true, },{ _OP(SMB2_OP_FIND), .need_session = true, |