diff options
author | Stefan Metzmacher <metze@samba.org> | 2018-05-24 16:34:04 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2018-06-14 20:52:21 +0200 |
commit | 96ac5a80cbedaf8bd6edc5ba7634aa9622eaef6d (patch) | |
tree | 46e77d455a21d01ff91e30e070fe71b805deb88d /source3/smbd/posix_acls.c | |
parent | 1566766f38e3cdf84d45285c709236eedcfaa167 (diff) | |
download | samba-96ac5a80cbedaf8bd6edc5ba7634aa9622eaef6d.tar.gz |
smbd: make use of create_conn_struct_tos() in get_nt_acl_no_snum()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r-- | source3/smbd/posix_acls.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index fb074772134..70834d5fc7d 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4570,7 +4570,7 @@ NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname, struct security_descriptor **sd) { TALLOC_CTX *frame = talloc_stackframe(); - connection_struct *conn; + struct conn_struct_tos *c = NULL; NTSTATUS status = NT_STATUS_OK; struct smb_filename *smb_fname = synthetic_smb_fname(talloc_tos(), fname, @@ -4588,14 +4588,11 @@ NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname, return NT_STATUS_NO_MEMORY; } - status = create_conn_struct(ctx, - server_event_context(), - server_messaging_context(), - &conn, - -1, - "/", - NULL); - + status = create_conn_struct_tos(server_messaging_context(), + -1, + "/", + NULL, + &c); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("create_conn_struct returned %s.\n", nt_errstr(status))); @@ -4603,7 +4600,7 @@ NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname, return status; } - status = SMB_VFS_GET_NT_ACL(conn, + status = SMB_VFS_GET_NT_ACL(c->conn, smb_fname, security_info_wanted, ctx, @@ -4613,7 +4610,6 @@ NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname, nt_errstr(status))); } - conn_free(conn); TALLOC_FREE(frame); return status; |