summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-12-16 15:48:03 -0800
committerJeremy Allison <jra@samba.org>2011-12-17 01:10:41 +0100
commit1dfa3ee986820154f0908093a0e82ee8e6d84414 (patch)
treef186ddc5ac6119ce6b47cfb6f5ad675b8e723ccc /source3
parent714954c16f2da11dcf2abda584dc3d7eca8361bb (diff)
downloadsamba-1dfa3ee986820154f0908093a0e82ee8e6d84414.tar.gz
samba-1dfa3ee986820154f0908093a0e82ee8e6d84414.tar.bz2
samba-1dfa3ee986820154f0908093a0e82ee8e6d84414.zip
Ensure VALID_STAT before accessing fields.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 86291ae714..19a13cde60 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -99,7 +99,9 @@ NTSTATUS smbd_check_access_rights(struct connection_struct *conn,
return NT_STATUS_OK;
}
- if (access_mask == DELETE_ACCESS && S_ISLNK(smb_fname->st.st_ex_mode)) {
+ if (access_mask == DELETE_ACCESS &&
+ VALID_STAT(smb_fname->st) &&
+ S_ISLNK(smb_fname->st.st_ex_mode)) {
/* We can always delete a symlink. */
DEBUG(10,("smbd_check_access_rights: not checking ACL "
"on DELETE_ACCESS on symlink %s.\n",