summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 1d724bafd8..abc5888ba0 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5982,9 +5982,13 @@ static NTSTATUS smb_unix_mknod(connection_struct *conn,
*/
if (lp_inherit_perms(SNUM(conn))) {
- inherit_access_posix_acl(
- conn, parent_dirname(fname),
- fname, unixmode);
+ char *parent;
+ if (!parent_dirname_talloc(talloc_tos(), fname, &parent,
+ NULL)) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ inherit_access_posix_acl(conn, parent, fname, unixmode);
+ TALLOC_FREE(parent);
}
if (SMB_VFS_STAT(conn, fname, psbuf) != 0) {