From 5f0b633c725238602dbd5ce8ae4aac8f7bbe6e8d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 24 Dec 2008 13:41:42 +0100 Subject: Use parent_dirname_talloc instead of parent_dirname in vfswrap_mkdir --- source3/modules/vfs_default.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/modules') 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) { -- cgit