summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-24 13:41:42 +0100
committerVolker Lendecke <vl@samba.org>2008-12-31 19:33:24 +0100
commit5f0b633c725238602dbd5ce8ae4aac8f7bbe6e8d (patch)
tree1010c9d5752f9137c373752d75b163e4a1409f84 /source3
parent8a507b1e7fa179c16c2dd6ddc2bdd345d00545f4 (diff)
downloadsamba-5f0b633c725238602dbd5ce8ae4aac8f7bbe6e8d.tar.gz
samba-5f0b633c725238602dbd5ce8ae4aac8f7bbe6e8d.tar.bz2
samba-5f0b633c725238602dbd5ce8ae4aac8f7bbe6e8d.zip
Use parent_dirname_talloc instead of parent_dirname in vfswrap_mkdir
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_default.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cfd3b1e818..3171d3c5ca 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -150,12 +150,17 @@ static int vfswrap_mkdir(vfs_handle_struct *handle, const char *path, mode_t mo
{
int result;
bool has_dacl = False;
+ char *parent = NULL;
START_PROFILE(syscall_mkdir);
- if (lp_inherit_acls(SNUM(handle->conn)) && (has_dacl = directory_has_default_acl(handle->conn, parent_dirname(path))))
+ if (lp_inherit_acls(SNUM(handle->conn))
+ && parent_dirname_talloc(talloc_tos(), path, &parent, NULL)
+ && (has_dacl = directory_has_default_acl(handle->conn, parent)))
mode = 0777;
+ TALLOC_FREE(parent);
+
result = mkdir(path, mode);
if (result == 0 && !has_dacl) {