git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
052efa9
)
Fix potential orphaned open files.
author
Michael Adam
<obnox@samba.org>
Tue, 13 Nov 2007 22:26:38 +0000
(23:26 +0100)
committer
Michael Adam
<obnox@samba.org>
Tue, 13 Nov 2007 22:26:38 +0000
(23:26 +0100)
Calling can_access_file could lead to orphaned open files
when SMB_VFS_GET_NT_ACL returned ENOSYS (not implemented).
Michael
(This used to be commit
f4f700cf0c1657c36e801fab20fe7b1a4efcb714
)
source3/smbd/file_access.c
patch
|
blob
|
history
diff --git
a/source3/smbd/file_access.c
b/source3/smbd/file_access.c
index 46472665e5fec5683838b478f4640efb9e074a83..a58bcdd8915c361210e1d2f595090998b304a5ac 100644
(file)
--- a/
source3/smbd/file_access.c
+++ b/
source3/smbd/file_access.c
@@
-76,12
+76,14
@@
static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx,
&secdesc);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("Unable to get NT ACL for file %s\n", fname));
-
return status
;
+
goto done
;
}
*psd = talloc_move(mem_ctx, &secdesc);
+
+done:
close_file(fsp, NORMAL_CLOSE);
- return
NT_STATUS_OK
;
+ return
status
;
}
static bool can_access_file_acl(struct connection_struct *conn,