diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-09 06:36:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-09 06:36:38 +0000 |
commit | 9d6dd97624f50dec3edd3bb9a3c0f7f47f9ae071 (patch) | |
tree | 05a0e2b485478d21c599020f6ace7a6a74cee9d8 /source3/smbd/service.c | |
parent | 98560fa3944b1eb8cc01df05b93408753296b4a5 (diff) | |
download | samba-9d6dd97624f50dec3edd3bb9a3c0f7f47f9ae071.tar.gz samba-9d6dd97624f50dec3edd3bb9a3c0f7f47f9ae071.tar.xz samba-9d6dd97624f50dec3edd3bb9a3c0f7f47f9ae071.zip |
Added set/get SD's on shares. Check before tcon.
Jeremy.
(This used to be commit 036b1a8b09fe6a7cca83d631624145574acad7f2)
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r-- | source3/smbd/service.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index e20786595c..11ae11054a 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -343,6 +343,29 @@ connection_struct *make_connection(char *service,char *user,char *password, int conn->read_only = lp_readonly(snum); + /* + * New code to check if there's a share security descripter + * added from NT server manager. This is an additional check + * before the smb.conf checks are done. JRA. + */ + + { + BOOL can_write = share_access_check(snum, vuid, FILE_WRITE_DATA); + + if (!can_write) { + if (!share_access_check(snum, vuid, FILE_READ_DATA)) { + /* No access, read or write. */ + *ecode = ERRaccess; + DEBUG(0,( "make_connection: connection to %s denied due to security descriptor.\n", + service )); + conn_free(conn); + return NULL; + } else { + conn->read_only = True; + } + } + } + { pstring list; StrnCpy(list,lp_readlist(snum),sizeof(pstring)-1); |