- if (DEBUGLEVEL >= 10) {
- DEBUG(10,("inherit_new_acl: parent acl is:\n"));
- NDR_PRINT_DEBUG(security_descriptor, parent_desc);
- }
-
- status = se_create_child_secdesc(ctx,
- &psd,
- &size,
- parent_desc,
- &handle->conn->server_info->ptok->user_sids[PRIMARY_USER_SID_INDEX],
- &handle->conn->server_info->ptok->user_sids[PRIMARY_GROUP_SID_INDEX],
- container);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- if (DEBUGLEVEL >= 10) {
- DEBUG(10,("inherit_new_acl: child acl is:\n"));
- NDR_PRINT_DEBUG(security_descriptor, psd);
- }
-
- } else {
- DEBUG(10,("inherit_new_acl: directory %s failed "
- "to get acl %s\n",
- parent_name,
- nt_errstr(status) ));
- }
-
- if (!psd || psd->dacl == NULL) {
-
- TALLOC_FREE(psd);
- if (fsp) {
- status = vfs_stat_fsp(fsp);
- smb_fname->st = fsp->fsp_name->st;
- } else {
- int ret;
- if (lp_posix_pathnames()) {
- ret = SMB_VFS_LSTAT(handle->conn, smb_fname);
- } else {
- ret = SMB_VFS_STAT(handle->conn, smb_fname);
- }
- if (ret == -1) {
- status = map_nt_error_from_unix(errno);
- }
- }