diff options
author | Volker Lendecke <vl@samba.org> | 2014-01-30 20:12:07 +0000 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-03-05 16:33:21 +0100 |
commit | 7289d1c30b23bbc8552820aad7ec7f6740c305b4 (patch) | |
tree | 2689b25f21ad4bf4d71e5db530ec54578ab361cd /source4/ntvfs | |
parent | 22dabda4c64b9b6704b5411c1fb943f09033e9ab (diff) | |
download | samba-7289d1c30b23bbc8552820aad7ec7f6740c305b4.tar.gz samba-7289d1c30b23bbc8552820aad7ec7f6740c305b4.tar.xz samba-7289d1c30b23bbc8552820aad7ec7f6740c305b4.zip |
source4: Use wbc_sids_to_xids
Signed-off-by: Volker Lendecke <vl@samba.org>
Change-Id: I86ea6587c436247ce66207c517f9c8d567ecac1d
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 11 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl_nfs4.c | 8 |
2 files changed, 5 insertions, 14 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 730ad484ce8..2070fd105c4 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -287,7 +287,6 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs, uid_t new_uid = -1; gid_t new_gid = -1; struct id_map *ids; - struct composite_context *ctx; if (pvfs->acl_ops != NULL) { status = pvfs->acl_ops->acl_load(pvfs, name, fd, req, &sd); @@ -318,9 +317,8 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs, } if (!dom_sid_equal(sd->owner_sid, new_sd->owner_sid)) { ids->sid = new_sd->owner_sid; - ctx = wbc_sids_to_xids_send(pvfs->wbc_ctx, ids, 1, ids); - NT_STATUS_HAVE_NO_MEMORY(ctx); - status = wbc_sids_to_xids_recv(ctx, &ids); + status = wbc_sids_to_xids(pvfs->wbc_ctx->event_ctx, + ids, 1); NT_STATUS_NOT_OK_RETURN(status); if (ids->xid.type == ID_TYPE_BOTH || @@ -337,9 +335,8 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs, } if (!dom_sid_equal(sd->group_sid, new_sd->group_sid)) { ids->sid = new_sd->group_sid; - ctx = wbc_sids_to_xids_send(pvfs->wbc_ctx, ids, 1, ids); - NT_STATUS_HAVE_NO_MEMORY(ctx); - status = wbc_sids_to_xids_recv(ctx, &ids); + status = wbc_sids_to_xids(pvfs->wbc_ctx->event_ctx, + ids, 1); NT_STATUS_NOT_OK_RETURN(status); if (ids->xid.type == ID_TYPE_BOTH || diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c index bb88cbc051e..bf4d9c27210 100644 --- a/source4/ntvfs/posix/pvfs_acl_nfs4.c +++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c @@ -124,7 +124,6 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename int i; TALLOC_CTX *tmp_ctx; struct id_map *ids; - struct composite_context *ctx; tmp_ctx = talloc_new(pvfs); NT_STATUS_HAVE_NO_MEMORY(tmp_ctx); @@ -159,12 +158,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename ids[i].status = ID_UNKNOWN; } - ctx = wbc_sids_to_xids_send(pvfs->wbc_ctx,ids, acl.a_count, ids); - if (ctx == NULL) { - talloc_free(tmp_ctx); - return NT_STATUS_NO_MEMORY; - } - status = wbc_sids_to_xids_recv(ctx, &ids); + status = wbc_sids_to_xids(pvfs->wbc_ctx->event_ctx, ids, acl.a_count); if (!NT_STATUS_IS_OK(status)) { talloc_free(tmp_ctx); return status; |