Changeset 149 for trunk/samba/source/auth
- Timestamp:
- Aug 20, 2008, 9:10:33 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/auth/auth_util.c
r138 r149 26 26 #undef DBGC_CLASS 27 27 #define DBGC_CLASS DBGC_AUTH 28 29 /**************************************************************************** 30 Ensure primary group SID is always at position 0 in a 31 auth_serversupplied_info struct. 32 ****************************************************************************/ 33 34 static void sort_sid_array_for_smbd(auth_serversupplied_info *result, 35 const DOM_SID *pgroup_sid) 36 { 37 unsigned int i; 38 39 if (!result->sids) { 40 return; 41 } 42 43 if (sid_compare(&result->sids[0], pgroup_sid)==0) { 44 return; 45 } 46 47 for (i = 1; i < result->num_sids; i++) { 48 if (sid_compare(pgroup_sid, 49 &result->sids[i]) == 0) { 50 sid_copy(&result->sids[i], &result->sids[0]); 51 sid_copy(&result->sids[0], pgroup_sid); 52 return; 53 } 54 } 55 } 28 56 29 57 /**************************************************************************** … … 1680 1708 } 1681 1709 1710 /* Ensure the primary group sid is at position 0. */ 1711 sort_sid_array_for_smbd(result, &group_sid); 1712 1682 1713 result->login_server = talloc_strdup(result, 1683 1714 info3->base.logon_server.string); … … 1915 1946 memcpy(&result->sids[i], &info->sids[i+2].sid, sizeof(result->sids[i])); 1916 1947 } 1948 1949 /* Ensure the primary group sid is at position 0. */ 1950 sort_sid_array_for_smbd(result, &group_sid); 1917 1951 1918 1952 /* ensure we are never given NULL session keys */
Note:
See TracChangeset
for help on using the changeset viewer.