diff options
author | Volker Lendecke <vl@samba.org> | 2008-12-24 13:46:22 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-12-31 19:33:25 +0100 |
commit | 70002c1667ee9ea4fc716f9b8134c8dcd22ec409 (patch) | |
tree | aebab31c9d3b0f405d5f184d5713a7174e703a18 /source3/smbd | |
parent | 4a9a569600cbcddffcfbeca97587de516259e939 (diff) | |
download | samba-70002c1667ee9ea4fc716f9b8134c8dcd22ec409.tar.gz samba-70002c1667ee9ea4fc716f9b8134c8dcd22ec409.tar.bz2 samba-70002c1667ee9ea4fc716f9b8134c8dcd22ec409.zip |
Use parent_dirname_talloc instead of parent_dirname in smb_unix_mknod
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 10 |
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) { |