diff options
author | Volker Lendecke <vl@samba.org> | 2011-07-04 17:02:34 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-05 13:28:03 +0200 |
commit | 1c022d2e414607633323e65abbc63bb3aeaaa6a4 (patch) | |
tree | 9ed522cee9c45097e7e96869b0b066eafbd025ce /source3/smbd | |
parent | fe8fe384f35fcf827630061ceda553ae8867f4ad (diff) | |
download | samba-1c022d2e414607633323e65abbc63bb3aeaaa6a4.tar.gz samba-1c022d2e414607633323e65abbc63bb3aeaaa6a4.tar.bz2 samba-1c022d2e414607633323e65abbc63bb3aeaaa6a4.zip |
s3: Return "granted" from share_access_check
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/service.c | 13 | ||||
-rw-r--r-- | source3/smbd/uid.c | 11 |
2 files changed, 14 insertions, 10 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 73c3c4f20c..c1d4dd1799 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -644,14 +644,15 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, { bool can_write = False; - can_write = share_access_check(conn->session_info->security_token, - lp_servicename(snum), - FILE_WRITE_DATA); + can_write = share_access_check( + conn->session_info->security_token, + lp_servicename(snum), FILE_WRITE_DATA, NULL); if (!can_write) { - if (!share_access_check(conn->session_info->security_token, - lp_servicename(snum), - FILE_READ_DATA)) { + if (!share_access_check( + conn->session_info->security_token, + lp_servicename(snum), FILE_READ_DATA, + NULL)) { /* No access, read or write. */ DEBUG(0,("make_connection: connection to %s " "denied due to security " diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 285b158a19..8114144574 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -121,8 +121,9 @@ static bool check_user_ok(connection_struct *conn, conn); if (!readonly_share && - !share_access_check(session_info->security_token, lp_servicename(snum), - FILE_WRITE_DATA)) { + !share_access_check(session_info->security_token, + lp_servicename(snum), FILE_WRITE_DATA, + NULL)) { /* smb.conf allows r/w, but the security descriptor denies * write. Fall back to looking at readonly. */ readonly_share = True; @@ -130,9 +131,11 @@ static bool check_user_ok(connection_struct *conn, "security descriptor\n")); } - if (!share_access_check(session_info->security_token, lp_servicename(snum), + if (!share_access_check(session_info->security_token, + lp_servicename(snum), readonly_share ? - FILE_READ_DATA : FILE_WRITE_DATA)) { + FILE_READ_DATA : FILE_WRITE_DATA, + NULL)) { return False; } |