diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-17 19:50:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:11 -0500 |
commit | 283b74fce595642fb2e2a2fad87c2de9c3bc5403 (patch) | |
tree | b2b6e7a77c5ac7646ce7374a9dffa9d9b1d892ba /source3/smbd/service.c | |
parent | 03f477b8a682a923472645e517711b80ac99d3a9 (diff) | |
download | samba-283b74fce595642fb2e2a2fad87c2de9c3bc5403.tar.gz samba-283b74fce595642fb2e2a2fad87c2de9c3bc5403.tar.xz samba-283b74fce595642fb2e2a2fad87c2de9c3bc5403.zip |
r17096: Simplify share_access_check a bit: It takes the sharename instead of the snum,
and the decision which token to use (conn or vuser) does not really belong
here, it is better done in the two places where this is called.
Volker
(This used to be commit 0a138888adf7a0f04a38cd911e797e1a379e908b)
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r-- | source3/smbd/service.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 9dcb8a354f4..395114592aa 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -767,11 +767,16 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, */ { - BOOL can_write = share_access_check(conn, snum, vuser, + NT_USER_TOKEN *token = conn->nt_user_token ? + conn->nt_user_token : vuser->nt_user_token; + + BOOL can_write = share_access_check(token, + lp_servicename(snum), FILE_WRITE_DATA); if (!can_write) { - if (!share_access_check(conn, snum, vuser, + if (!share_access_check(token, + lp_servicename(snum), FILE_READ_DATA)) { /* No access, read or write. */ DEBUG(0,("make_connection: connection to %s " |