summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-01-08 14:17:51 -0800
committerAndrew Bartlett <abartlet@samba.org>2013-01-09 14:54:26 +1100
commita9730cb3909d8c8aea64b35342ac763b135e0b1f (patch)
tree0fbfa4815011833eaea5c9cf958d63a60b093125 /source3/smbd
parentb6fe9ec6835c322f6d2d6e831bece311100bf051 (diff)
downloadsamba-a9730cb3909d8c8aea64b35342ac763b135e0b1f.tar.gz
samba-a9730cb3909d8c8aea64b35342ac763b135e0b1f.tar.bz2
samba-a9730cb3909d8c8aea64b35342ac763b135e0b1f.zip
smbd/posix_acls.c: Use create_conn_struct(). Don't hand-create connection structs.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/smbd')
-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);