diff options
Diffstat (limited to 'source4/ntvfs/posix/pvfs_acl_nfs4.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl_nfs4.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c index c6dbf79c57..8824602dea 100644 --- a/source4/ntvfs/posix/pvfs_acl_nfs4.c +++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c @@ -65,29 +65,23 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename ids = talloc_array(sd, struct id_map, num_ids); NT_STATUS_HAVE_NO_MEMORY(ids); - ids[0].unixid = talloc(ids, struct unixid); - NT_STATUS_HAVE_NO_MEMORY(ids[0].unixid); - ids[0].unixid->id = name->st.st_uid; - ids[0].unixid->type = ID_TYPE_UID; + ids[0].xid.id = name->st.st_uid; + ids[0].xid.type = ID_TYPE_UID; ids[0].sid = NULL; ids[0].status = ID_UNKNOWN; - ids[1].unixid = talloc(ids, struct unixid); - NT_STATUS_HAVE_NO_MEMORY(ids[1].unixid); - ids[1].unixid->id = name->st.st_gid; - ids[1].unixid->type = ID_TYPE_GID; + ids[1].xid.id = name->st.st_gid; + ids[1].xid.type = ID_TYPE_GID; ids[1].sid = NULL; ids[1].status = ID_UNKNOWN; for (i=0;i<acl->a_count;i++) { struct nfs4ace *a = &acl->ace[i]; - ids[i+2].unixid = talloc(ids, struct unixid); - NT_STATUS_HAVE_NO_MEMORY(ids[i+2].unixid); - ids[i+2].unixid->id = a->e_id; + ids[i+2].xid.id = a->e_id; if (a->e_flags & ACE4_IDENTIFIER_GROUP) { - ids[i+2].unixid->type = ID_TYPE_GID; + ids[i+2].xid.type = ID_TYPE_GID; } else { - ids[i+2].unixid->type = ID_TYPE_UID; + ids[i+2].xid.type = ID_TYPE_UID; } ids[i+2].sid = NULL; ids[i+2].status = ID_UNKNOWN; @@ -154,7 +148,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename for (i=0;i<acl.a_count;i++) { struct security_ace *ace = &sd->dacl->aces[i]; - ids[i].unixid = NULL; + ZERO_STRUCT(ids[i].xid); ids[i].sid = dom_sid_dup(ids, &ace->trustee); if (ids[i].sid == NULL) { talloc_free(tmp_ctx); @@ -180,10 +174,10 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename a->e_type = ace->type; a->e_flags = ace->flags; a->e_mask = ace->access_mask; - if (ids[i].unixid->type != ID_TYPE_UID) { + if (ids[i].xid.type != ID_TYPE_UID) { a->e_flags |= ACE4_IDENTIFIER_GROUP; } - a->e_id = ids[i].unixid->id; + a->e_id = ids[i].xid.id; a->e_who = ""; } |