Changeset 989 for vendor/current/source3/auth
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- Location:
- vendor/current/source3/auth
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/auth/auth_generic.c
r988 r989 29 29 #ifdef HAVE_KRB5 30 30 #include "auth/kerberos/pac_utils.h" 31 #include "nsswitch/libwbclient/wbclient.h" 31 32 #endif 32 33 #include "librpc/crypto/gse.h" … … 64 65 if (pac_blob) { 65 66 #ifdef HAVE_KRB5 67 struct wbcAuthUserParams params = {}; 68 struct wbcAuthUserInfo *info = NULL; 69 struct wbcAuthErrorInfo *err = NULL; 70 wbcErr wbc_err; 71 72 /* 73 * Let winbind decode the PAC. 74 * This will also store the user 75 * data in the netsamlogon cache. 76 * 77 * We need to do this *before* we 78 * call get_user_from_kerberos_info() 79 * as that does a user lookup that 80 * expects info in the netsamlogon cache. 81 * 82 * See BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259 83 */ 84 params.level = WBC_AUTH_USER_LEVEL_PAC; 85 params.password.pac.data = pac_blob->data; 86 params.password.pac.length = pac_blob->length; 87 88 become_root(); 89 wbc_err = wbcAuthenticateUserEx(¶ms, &info, &err); 90 unbecome_root(); 91 92 /* 93 * As this is merely a cache prime 94 * WBC_ERR_WINBIND_NOT_AVAILABLE 95 * is not a fatal error, treat it 96 * as success. 97 */ 98 99 switch (wbc_err) { 100 case WBC_ERR_WINBIND_NOT_AVAILABLE: 101 case WBC_ERR_SUCCESS: 102 break; 103 case WBC_ERR_AUTH_ERROR: 104 status = NT_STATUS(err->nt_status); 105 wbcFreeMemory(err); 106 goto done; 107 default: 108 status = NT_STATUS_LOGON_FAILURE; 109 goto done; 110 } 111 66 112 status = kerberos_pac_logon_info(tmp_ctx, *pac_blob, NULL, NULL, 67 113 NULL, NULL, 0, &logon_info); … … 102 148 } 103 149 104 /* savethe PAC data if we have it */150 /* Get the info3 from the PAC data if we have it */ 105 151 if (logon_info) { 106 152 status = create_info3_from_pac_logon_info(tmp_ctx, … … 110 156 goto done; 111 157 } 112 netsamlogon_cache_store(ntuser, info3_copy);113 158 } 114 159 -
vendor/current/source3/auth/token_util.c
r988 r989 673 673 gid_t *gids; 674 674 struct dom_sid *group_sids; 675 struct dom_sid tmp_sid; 675 676 uint32_t num_group_sids; 676 677 uint32_t num_gids; … … 754 755 755 756 } else if (sid_check_is_in_unix_users(user_sid)) { 756 struct dom_sid tmp_sid;757 757 uint32_t getgroups_num_group_sids; 758 758 /* This is a unix user not in passdb. We need to ask nss
Note:
See TracChangeset
for help on using the changeset viewer.