summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2009-04-23 16:37:11 +0200
committerKai Blin <kai@samba.org>2010-02-11 23:56:35 +0100
commitea055e8c7905ec5d229fd5b50ca9ec8f60073b53 (patch)
tree1fbb879a3bb2ff7b273c512dbec6e4b86b694521 /source4/ntvfs/posix
parent86d70ae94425c34fcb7cc7791a6e54b1a47f21cc (diff)
downloadsamba-ea055e8c7905ec5d229fd5b50ca9ec8f60073b53.tar.gz
samba-ea055e8c7905ec5d229fd5b50ca9ec8f60073b53.tar.bz2
samba-ea055e8c7905ec5d229fd5b50ca9ec8f60073b53.zip
s4: Switch to S3-style id mapping data types.
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c18
-rw-r--r--source4/ntvfs/posix/pvfs_acl_nfs4.c16
2 files changed, 17 insertions, 17 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index c100abe5e7..3336cd0462 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -156,7 +156,7 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs,
NTSTATUS status;
struct security_ace ace;
mode_t mode;
- struct id_mapping *ids;
+ struct id_map *ids;
struct composite_context *ctx;
*psd = security_descriptor_initialise(req);
@@ -165,7 +165,7 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs,
}
sd = *psd;
- ids = talloc_zero_array(sd, struct id_mapping, 2);
+ ids = talloc_zero_array(sd, struct id_map, 2);
NT_STATUS_HAVE_NO_MEMORY(ids);
ids[0].unixid = talloc(ids, struct unixid);
@@ -298,7 +298,7 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs,
gid_t old_gid = -1;
uid_t new_uid = -1;
gid_t new_gid = -1;
- struct id_mapping *ids;
+ struct id_map *ids;
struct composite_context *ctx;
if (pvfs->acl_ops != NULL) {
@@ -311,11 +311,11 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs,
return status;
}
- ids = talloc(req, struct id_mapping);
+ ids = talloc(req, struct id_map);
NT_STATUS_HAVE_NO_MEMORY(ids);
ids->unixid = NULL;
ids->sid = NULL;
- ids->status = NT_STATUS_NONE_MAPPED;
+ ids->status = ID_UNKNOWN;
new_sd = info->set_secdesc.in.sd;
orig_sd = *sd;
@@ -836,7 +836,7 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs,
struct xattr_NTACL *acl;
NTSTATUS status;
struct security_descriptor *parent_sd, *sd;
- struct id_mapping *ids;
+ struct id_map *ids;
struct composite_context *ctx;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
@@ -873,7 +873,7 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs,
sd = security_descriptor_initialise(req);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(sd, tmp_ctx);
- ids = talloc_array(sd, struct id_mapping, 2);
+ ids = talloc_array(sd, struct id_map, 2);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(ids, tmp_ctx);
ids[0].unixid = talloc(ids, struct unixid);
@@ -881,14 +881,14 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs,
ids[0].unixid->id = geteuid();
ids[0].unixid->type = ID_TYPE_UID;
ids[0].sid = NULL;
- ids[0].status = NT_STATUS_NONE_MAPPED;
+ ids[0].status = ID_UNKNOWN;
ids[1].unixid = talloc(ids, struct unixid);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(ids[1].unixid, tmp_ctx);
ids[1].unixid->id = getegid();
ids[1].unixid->type = ID_TYPE_GID;
ids[1].sid = NULL;
- ids[1].status = NT_STATUS_NONE_MAPPED;
+ 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);
diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c
index 02ed058af7..c6dbf79c57 100644
--- a/source4/ntvfs/posix/pvfs_acl_nfs4.c
+++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c
@@ -39,7 +39,7 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
struct nfs4acl *acl;
struct security_descriptor *sd;
int i, num_ids;
- struct id_mapping *ids;
+ struct id_map *ids;
struct composite_context *ctx;
acl = talloc_zero(mem_ctx, struct nfs4acl);
@@ -62,7 +62,7 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
/* the number of ids to map is the acl count plus uid and gid */
num_ids = acl->a_count +2;
- ids = talloc_array(sd, struct id_mapping, num_ids);
+ ids = talloc_array(sd, struct id_map, num_ids);
NT_STATUS_HAVE_NO_MEMORY(ids);
ids[0].unixid = talloc(ids, struct unixid);
@@ -70,14 +70,14 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
ids[0].unixid->id = name->st.st_uid;
ids[0].unixid->type = ID_TYPE_UID;
ids[0].sid = NULL;
- ids[0].status = NT_STATUS_NONE_MAPPED;
+ 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].sid = NULL;
- ids[1].status = NT_STATUS_NONE_MAPPED;
+ ids[1].status = ID_UNKNOWN;
for (i=0;i<acl->a_count;i++) {
struct nfs4ace *a = &acl->ace[i];
@@ -90,7 +90,7 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
ids[i+2].unixid->type = ID_TYPE_UID;
}
ids[i+2].sid = NULL;
- ids[i+2].status = NT_STATUS_NONE_MAPPED;
+ ids[i+2].status = ID_UNKNOWN;
}
/* Allocate memory for the sids from the security descriptor to be on
@@ -127,7 +127,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
struct nfs4acl acl;
int i;
TALLOC_CTX *tmp_ctx;
- struct id_mapping *ids;
+ struct id_map *ids;
struct composite_context *ctx;
tmp_ctx = talloc_new(pvfs);
@@ -146,7 +146,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
return NT_STATUS_NO_MEMORY;
}
- ids = talloc_array(tmp_ctx, struct id_mapping, acl.a_count);
+ ids = talloc_array(tmp_ctx, struct id_map, acl.a_count);
if (ids == NULL) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
@@ -160,7 +160,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
- ids[i].status = NT_STATUS_NONE_MAPPED;
+ ids[i].status = ID_UNKNOWN;
}
ctx = wbc_sids_to_xids_send(pvfs->wbc_ctx,ids, acl.a_count, ids);