summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/posix_acls.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 0f3951f83a..fbeb66264c 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4610,27 +4610,19 @@ NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname,
return NT_STATUS_NO_MEMORY;
}
- conn = talloc_zero(frame, connection_struct);
- if (conn == NULL) {
- TALLOC_FREE(frame);
- DEBUG(0, ("talloc failed\n"));
- return NT_STATUS_NO_MEMORY;
- }
+ status = create_conn_struct(ctx,
+ server_event_context(),
+ server_messaging_context(),
+ &conn,
+ -1,
+ "/",
+ NULL);
- if (!(conn->params = talloc(conn, struct share_params))) {
- DEBUG(0, ("talloc failed\n"));
- TALLOC_FREE(frame);
- return NT_STATUS_NO_MEMORY;
- }
-
- conn->params->service = -1;
-
- set_conn_connectpath(conn, "/");
-
- if (!smbd_vfs_init(conn)) {
- DEBUG(0,("smbd_vfs_init() failed!\n"));
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("create_conn_struct returned %s.\n",
+ nt_errstr(status)));
TALLOC_FREE(frame);
- return NT_STATUS_INTERNAL_ERROR;
+ return status;
}
status = SMB_VFS_GET_NT_ACL(conn, fname, security_info_wanted, ctx, sd);