diff options
author | Volker Lendecke <vl@samba.org> | 2014-02-02 15:35:02 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-02-10 10:57:11 +0100 |
commit | d0932a1ae089fda0d41be21a9916caeca7c0c233 (patch) | |
tree | 0ec4db8b1f8c951c616ea4c87f0de7c334264548 | |
parent | f275ce4e4367478b488810491c7bcd993c37caf1 (diff) | |
download | samba-d0932a1ae089fda0d41be21a9916caeca7c0c233.tar.gz samba-d0932a1ae089fda0d41be21a9916caeca7c0c233.tar.xz samba-d0932a1ae089fda0d41be21a9916caeca7c0c233.zip |
source4: Use wbc_xids_to_sids
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 12 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl_nfs4.c | 5 | ||||
-rw-r--r-- | source4/rpc_server/unixinfo/dcesrv_unixinfo.c | 12 |
3 files changed, 5 insertions, 24 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 2070fd105c..3ef66e1a12 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -151,7 +151,6 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs, struct security_ace ace; mode_t mode; struct id_map *ids; - struct composite_context *ctx; *psd = security_descriptor_initialise(req); if (*psd == NULL) { @@ -170,10 +169,7 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs, ids[1].xid.type = ID_TYPE_GID; ids[1].sid = NULL; - ctx = wbc_xids_to_sids_send(pvfs->wbc_ctx, ids, 2, ids); - NT_STATUS_HAVE_NO_MEMORY(ctx); - - status = wbc_xids_to_sids_recv(ctx, &ids); + status = wbc_xids_to_sids(pvfs->wbc_ctx->event_ctx, ids, 2); NT_STATUS_NOT_OK_RETURN(status); sd->owner_sid = talloc_steal(sd, ids[0].sid); @@ -925,7 +921,6 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs, NTSTATUS status; struct security_descriptor *parent_sd, *sd; struct id_map *ids; - struct composite_context *ctx; TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); *ret_sd = NULL; @@ -974,10 +969,7 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs, ids[1].sid = NULL; ids[1].status = ID_UNKNOWN; - ctx = wbc_xids_to_sids_send(pvfs->wbc_ctx, ids, 2, ids); - NT_STATUS_HAVE_NO_MEMORY_AND_FREE(ctx, tmp_ctx); - - status = wbc_xids_to_sids_recv(ctx, &ids); + status = wbc_xids_to_sids(pvfs->wbc_ctx->event_ctx, ids, 2); NT_STATUS_NOT_OK_RETURN_AND_FREE(status, tmp_ctx); sd->owner_sid = talloc_steal(sd, ids[0].sid); diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c index bf4d9c2721..272cdbc539 100644 --- a/source4/ntvfs/posix/pvfs_acl_nfs4.c +++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c @@ -42,7 +42,6 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename struct security_descriptor *sd; int i, num_ids; struct id_map *ids; - struct composite_context *ctx; acl = talloc_zero(mem_ctx, struct nfs4acl); NT_STATUS_HAVE_NO_MEMORY(acl); @@ -91,9 +90,7 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename /* Allocate memory for the sids from the security descriptor to be on * the safe side. */ - ctx = wbc_xids_to_sids_send(pvfs->wbc_ctx, sd, num_ids, ids); - NT_STATUS_HAVE_NO_MEMORY(ctx); - status = wbc_xids_to_sids_recv(ctx, &ids); + status = wbc_xids_to_sids(pvfs->wbc_ctx->event_ctx, ids, num_ids); NT_STATUS_NOT_OK_RETURN(status); sd->owner_sid = talloc_steal(sd, ids[0].sid); diff --git a/source4/rpc_server/unixinfo/dcesrv_unixinfo.c b/source4/rpc_server/unixinfo/dcesrv_unixinfo.c index 260d5abe92..821f53c495 100644 --- a/source4/rpc_server/unixinfo/dcesrv_unixinfo.c +++ b/source4/rpc_server/unixinfo/dcesrv_unixinfo.c @@ -79,7 +79,6 @@ static NTSTATUS dcesrv_unixinfo_UidToSid(struct dcesrv_call_state *dce_call, dce_call->context->private_data, struct wbc_context); struct id_map *ids; - struct composite_context *ctx; uint32_t uid; NTSTATUS status; @@ -100,10 +99,7 @@ static NTSTATUS dcesrv_unixinfo_UidToSid(struct dcesrv_call_state *dce_call, ids->xid.id = uid; ids->xid.type = ID_TYPE_UID; - ctx = wbc_xids_to_sids_send(wbc_ctx, ids, 1, ids); - NT_STATUS_HAVE_NO_MEMORY(ctx); - - status = wbc_xids_to_sids_recv(ctx, &ids); + status = wbc_xids_to_sids(wbc_ctx->event_ctx, ids, 1); NT_STATUS_NOT_OK_RETURN(status); r->out.sid = ids->sid; @@ -148,7 +144,6 @@ static NTSTATUS dcesrv_unixinfo_GidToSid(struct dcesrv_call_state *dce_call, dce_call->context->private_data, struct wbc_context); struct id_map *ids; - struct composite_context *ctx; uint32_t gid; NTSTATUS status; @@ -169,10 +164,7 @@ static NTSTATUS dcesrv_unixinfo_GidToSid(struct dcesrv_call_state *dce_call, ids->xid.id = gid; ids->xid.type = ID_TYPE_GID; - ctx = wbc_xids_to_sids_send(wbc_ctx, ids, 1, ids); - NT_STATUS_HAVE_NO_MEMORY(ctx); - - status = wbc_xids_to_sids_recv(ctx, &ids); + status = wbc_xids_to_sids(wbc_ctx->event_ctx, ids, 1); NT_STATUS_NOT_OK_RETURN(status); r->out.sid = ids->sid; |