git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
714954c
)
Ensure VALID_STAT before accessing fields.
author
Jeremy Allison
<jra@samba.org>
Fri, 16 Dec 2011 23:48:03 +0000
(15:48 -0800)
committer
Jeremy Allison
<jra@samba.org>
Sat, 17 Dec 2011 00:10:41 +0000
(
01:10
+0100)
source3/smbd/open.c
patch
|
blob
|
history
diff --git
a/source3/smbd/open.c
b/source3/smbd/open.c
index 86291ae714e10d57a8c42995cd43d2772128b45d..19a13cde600f1c305b0fc56627be6448e15d2c8d 100644
(file)
--- 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",