Changeset 745 for trunk/server/source4/rpc_server/unixinfo
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source4/rpc_server/unixinfo/dcesrv_unixinfo.c
r414 r745 50 50 dce_call->context->private_data, 51 51 struct wbc_context); 52 struct id_map ping*ids;52 struct id_map *ids; 53 53 struct composite_context *ctx; 54 54 55 55 DEBUG(5, ("dcesrv_unixinfo_SidToUid called\n")); 56 56 57 ids = talloc(mem_ctx, struct id_mapping);57 ids = talloc(mem_ctx, struct id_map); 58 58 NT_STATUS_HAVE_NO_MEMORY(ids); 59 59 60 60 ids->sid = &r->in.sid; 61 ids->status = NT_STATUS_NONE_MAPPED;62 ids->unixid = NULL;61 ids->status = ID_UNKNOWN; 62 ZERO_STRUCT(ids->xid); 63 63 ctx = wbc_sids_to_xids_send(wbc_ctx, ids, 1, ids); 64 64 NT_STATUS_HAVE_NO_MEMORY(ctx); … … 67 67 NT_STATUS_NOT_OK_RETURN(status); 68 68 69 if (ids-> unixid->type == ID_TYPE_BOTH ||70 ids-> unixid->type == ID_TYPE_UID) {71 *r->out.uid = ids-> unixid->id;69 if (ids->xid.type == ID_TYPE_BOTH || 70 ids->xid.type == ID_TYPE_UID) { 71 *r->out.uid = ids->xid.id; 72 72 return NT_STATUS_OK; 73 73 } else { … … 83 83 dce_call->context->private_data, 84 84 struct wbc_context); 85 struct id_map ping*ids;85 struct id_map *ids; 86 86 struct composite_context *ctx; 87 87 uint32_t uid; … … 96 96 } 97 97 98 ids = talloc(mem_ctx, struct id_map ping);98 ids = talloc(mem_ctx, struct id_map); 99 99 NT_STATUS_HAVE_NO_MEMORY(ids); 100 100 101 101 ids->sid = NULL; 102 ids->status = NT_STATUS_NONE_MAPPED; 103 ids->unixid = talloc(ids, struct unixid); 104 NT_STATUS_HAVE_NO_MEMORY(ids->unixid); 105 106 ids->unixid->id = uid; 107 ids->unixid->type = ID_TYPE_UID; 102 ids->status = ID_UNKNOWN; 103 104 ids->xid.id = uid; 105 ids->xid.type = ID_TYPE_UID; 108 106 109 107 ctx = wbc_xids_to_sids_send(wbc_ctx, ids, 1, ids); … … 125 123 dce_call->context->private_data, 126 124 struct wbc_context); 127 struct id_map ping*ids;125 struct id_map *ids; 128 126 struct composite_context *ctx; 129 127 130 128 DEBUG(5, ("dcesrv_unixinfo_SidToGid called\n")); 131 129 132 ids = talloc(mem_ctx, struct id_mapping);130 ids = talloc(mem_ctx, struct id_map); 133 131 NT_STATUS_HAVE_NO_MEMORY(ids); 134 132 135 133 ids->sid = &r->in.sid; 136 ids->status = NT_STATUS_NONE_MAPPED;137 ids->unixid = NULL;134 ids->status = ID_UNKNOWN; 135 ZERO_STRUCT(ids->xid); 138 136 ctx = wbc_sids_to_xids_send(wbc_ctx, ids, 1, ids); 139 137 NT_STATUS_HAVE_NO_MEMORY(ctx); … … 142 140 NT_STATUS_NOT_OK_RETURN(status); 143 141 144 if (ids-> unixid->type == ID_TYPE_BOTH ||145 ids-> unixid->type == ID_TYPE_GID) {146 *r->out.gid = ids-> unixid->id;142 if (ids->xid.type == ID_TYPE_BOTH || 143 ids->xid.type == ID_TYPE_GID) { 144 *r->out.gid = ids->xid.id; 147 145 return NT_STATUS_OK; 148 146 } else { … … 158 156 dce_call->context->private_data, 159 157 struct wbc_context); 160 struct id_map ping*ids;158 struct id_map *ids; 161 159 struct composite_context *ctx; 162 160 uint32_t gid; … … 171 169 } 172 170 173 ids = talloc(mem_ctx, struct id_map ping);171 ids = talloc(mem_ctx, struct id_map); 174 172 NT_STATUS_HAVE_NO_MEMORY(ids); 175 173 176 174 ids->sid = NULL; 177 ids->status = NT_STATUS_NONE_MAPPED; 178 ids->unixid = talloc(ids, struct unixid); 179 NT_STATUS_HAVE_NO_MEMORY(ids->unixid); 180 181 ids->unixid->id = gid; 182 ids->unixid->type = ID_TYPE_GID; 175 ids->status = ID_UNKNOWN; 176 177 ids->xid.id = gid; 178 ids->xid.type = ID_TYPE_GID; 183 179 184 180 ctx = wbc_xids_to_sids_send(wbc_ctx, ids, 1, ids); … … 196 192 struct unixinfo_GetPWUid *r) 197 193 { 198 int i;194 unsigned int i; 199 195 200 196 *r->out.count = 0;
Note:
See TracChangeset
for help on using the changeset viewer.