Changeset 745 for trunk/server/source3/lib/winbind_util.c
- 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/source3/lib/winbind_util.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "../libcli/security/security.h" 23 #include "../lib/util/util_pw.h" 24 #include "nsswitch/libwbclient/wbclient.h" 22 25 23 26 #if defined(WITH_WINBIND) 24 27 25 #include " nsswitch/libwbclient/wbclient.h"28 #include "lib/winbind_util.h" 26 29 27 30 struct passwd * winbind_getpwnam(const char * name) … … 42 45 } 43 46 44 struct passwd * winbind_getpwsid(const DOM_SID*sid)47 struct passwd * winbind_getpwsid(const struct dom_sid *sid) 45 48 { 46 49 wbcErr result; … … 64 67 /* Call winbindd to convert a name to a sid */ 65 68 66 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,69 bool winbind_lookup_name(const char *dom_name, const char *name, struct dom_sid *sid, 67 70 enum lsa_SidType *name_type) 68 71 { … … 75 78 return false; 76 79 77 memcpy(sid, &dom_sid, sizeof( DOM_SID));80 memcpy(sid, &dom_sid, sizeof(struct dom_sid)); 78 81 *name_type = (enum lsa_SidType)type; 79 82 … … 83 86 /* Call winbindd to convert sid to name */ 84 87 85 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,88 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, 86 89 const char **domain, const char **name, 87 90 enum lsa_SidType *name_type) … … 135 138 /* Call winbindd to convert SID to uid */ 136 139 137 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID*sid)140 bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid) 138 141 { 139 142 struct wbcDomainSid dom_sid; … … 149 152 /* Call winbindd to convert uid to sid */ 150 153 151 bool winbind_uid_to_sid( DOM_SID*sid, uid_t uid)154 bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid) 152 155 { 153 156 struct wbcDomainSid dom_sid; … … 156 159 result = wbcUidToSid(uid, &dom_sid); 157 160 if (result == WBC_ERR_SUCCESS) { 158 memcpy(sid, &dom_sid, sizeof( DOM_SID));161 memcpy(sid, &dom_sid, sizeof(struct dom_sid)); 159 162 } else { 160 163 sid_copy(sid, &global_sid_NULL); … … 166 169 /* Call winbindd to convert SID to gid */ 167 170 168 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID*sid)171 bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid) 169 172 { 170 173 struct wbcDomainSid dom_sid; … … 180 183 /* Call winbindd to convert gid to sid */ 181 184 182 bool winbind_gid_to_sid( DOM_SID*sid, gid_t gid)185 bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid) 183 186 { 184 187 struct wbcDomainSid dom_sid; … … 187 190 result = wbcGidToSid(gid, &dom_sid); 188 191 if (result == WBC_ERR_SUCCESS) { 189 memcpy(sid, &dom_sid, sizeof( DOM_SID));192 memcpy(sid, &dom_sid, sizeof(struct dom_sid)); 190 193 } else { 191 194 sid_copy(sid, &global_sid_NULL); … … 214 217 215 218 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx, 216 const DOM_SID*domain_sid,219 const struct dom_sid *domain_sid, 217 220 int num_rids, uint32 *rids, 218 221 const char **domain_name, … … 296 299 297 300 bool winbind_get_sid_aliases(TALLOC_CTX *mem_ctx, 298 const DOM_SID*dom_sid,299 const DOM_SID*members,301 const struct dom_sid *dom_sid, 302 const struct dom_sid *members, 300 303 size_t num_members, 301 304 uint32_t **pp_alias_rids, … … 347 350 } 348 351 349 struct passwd * winbind_getpwsid(const DOM_SID*sid)352 struct passwd * winbind_getpwsid(const struct dom_sid *sid) 350 353 { 351 354 return NULL; 352 355 } 353 356 354 bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,357 bool winbind_lookup_name(const char *dom_name, const char *name, struct dom_sid *sid, 355 358 enum lsa_SidType *name_type) 356 359 { … … 360 363 /* Call winbindd to convert sid to name */ 361 364 362 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,365 bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, 363 366 const char **domain, const char **name, 364 367 enum lsa_SidType *name_type) … … 376 379 /* Call winbindd to convert SID to uid */ 377 380 378 bool winbind_sid_to_uid(uid_t *puid, const DOM_SID*sid)381 bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid) 379 382 { 380 383 return false; … … 383 386 /* Call winbindd to convert uid to sid */ 384 387 385 bool winbind_uid_to_sid( DOM_SID*sid, uid_t uid)388 bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid) 386 389 { 387 390 return false; … … 390 393 /* Call winbindd to convert SID to gid */ 391 394 392 bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID*sid)395 bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid) 393 396 { 394 397 return false; … … 397 400 /* Call winbindd to convert gid to sid */ 398 401 399 bool winbind_gid_to_sid( DOM_SID*sid, gid_t gid)402 bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid) 400 403 { 401 404 return false; … … 412 415 413 416 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx, 414 const DOM_SID*domain_sid,417 const struct dom_sid *domain_sid, 415 418 int num_rids, uint32 *rids, 416 419 const char **domain_name, … … 440 443 441 444 bool winbind_get_sid_aliases(TALLOC_CTX *mem_ctx, 442 const DOM_SID*dom_sid,443 const DOM_SID*members,445 const struct dom_sid *dom_sid, 446 const struct dom_sid *members, 444 447 size_t num_members, 445 448 uint32_t **pp_alias_rids,
Note:
See TracChangeset
for help on using the changeset viewer.