summaryrefslogtreecommitdiff
path: root/source4/rpc_server/unixinfo
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-24 10:16:34 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-05-24 23:08:56 +1000
commit285647664cf60baa9f8f1a52bea0c55aa01b4e85 (patch)
treeb86e569733a2c0fe8b56f675bd6acfc350d08b88 /source4/rpc_server/unixinfo
parent974ed9cf2c10ab3384c1070c22f5cd42908c95f1 (diff)
downloadsamba-285647664cf60baa9f8f1a52bea0c55aa01b4e85.tar.gz
samba-285647664cf60baa9f8f1a52bea0c55aa01b4e85.tar.bz2
samba-285647664cf60baa9f8f1a52bea0c55aa01b4e85.zip
s4:idmap Adjust code to new idmap structure names and layout.
Andrew Bartlett
Diffstat (limited to 'source4/rpc_server/unixinfo')
-rw-r--r--source4/rpc_server/unixinfo/dcesrv_unixinfo.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/source4/rpc_server/unixinfo/dcesrv_unixinfo.c b/source4/rpc_server/unixinfo/dcesrv_unixinfo.c
index 2ef34ce93a..b5b8a89c8b 100644
--- a/source4/rpc_server/unixinfo/dcesrv_unixinfo.c
+++ b/source4/rpc_server/unixinfo/dcesrv_unixinfo.c
@@ -59,16 +59,16 @@ static NTSTATUS dcesrv_unixinfo_SidToUid(struct dcesrv_call_state *dce_call,
ids->sid = &r->in.sid;
ids->status = ID_UNKNOWN;
- ids->unixid = NULL;
+ ZERO_STRUCT(ids->xid);
ctx = wbc_sids_to_xids_send(wbc_ctx, ids, 1, ids);
NT_STATUS_HAVE_NO_MEMORY(ctx);
status = wbc_sids_to_xids_recv(ctx, &ids);
NT_STATUS_NOT_OK_RETURN(status);
- if (ids->unixid->type == ID_TYPE_BOTH ||
- ids->unixid->type == ID_TYPE_UID) {
- *r->out.uid = ids->unixid->id;
+ if (ids->xid.type == ID_TYPE_BOTH ||
+ ids->xid.type == ID_TYPE_UID) {
+ *r->out.uid = ids->xid.id;
return NT_STATUS_OK;
} else {
return NT_STATUS_INVALID_SID;
@@ -100,11 +100,9 @@ static NTSTATUS dcesrv_unixinfo_UidToSid(struct dcesrv_call_state *dce_call,
ids->sid = NULL;
ids->status = ID_UNKNOWN;
- ids->unixid = talloc(ids, struct unixid);
- NT_STATUS_HAVE_NO_MEMORY(ids->unixid);
- ids->unixid->id = uid;
- ids->unixid->type = ID_TYPE_UID;
+ 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);
@@ -134,16 +132,16 @@ static NTSTATUS dcesrv_unixinfo_SidToGid(struct dcesrv_call_state *dce_call,
ids->sid = &r->in.sid;
ids->status = ID_UNKNOWN;
- ids->unixid = NULL;
+ ZERO_STRUCT(ids->xid);
ctx = wbc_sids_to_xids_send(wbc_ctx, ids, 1, ids);
NT_STATUS_HAVE_NO_MEMORY(ctx);
status = wbc_sids_to_xids_recv(ctx, &ids);
NT_STATUS_NOT_OK_RETURN(status);
- if (ids->unixid->type == ID_TYPE_BOTH ||
- ids->unixid->type == ID_TYPE_GID) {
- *r->out.gid = ids->unixid->id;
+ if (ids->xid.type == ID_TYPE_BOTH ||
+ ids->xid.type == ID_TYPE_GID) {
+ *r->out.gid = ids->xid.id;
return NT_STATUS_OK;
} else {
return NT_STATUS_INVALID_SID;
@@ -175,11 +173,9 @@ static NTSTATUS dcesrv_unixinfo_GidToSid(struct dcesrv_call_state *dce_call,
ids->sid = NULL;
ids->status = ID_UNKNOWN;
- ids->unixid = talloc(ids, struct unixid);
- NT_STATUS_HAVE_NO_MEMORY(ids->unixid);
- ids->unixid->id = gid;
- ids->unixid->type = ID_TYPE_GID;
+ 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);