Changeset 370 for branches/samba-3.3.x/source/nsswitch/pam_winbind.c
- Timestamp:
- Jan 15, 2010, 8:23:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/nsswitch/pam_winbind.c
r342 r370 977 977 int sid_list_buffer_size) 978 978 { 979 const char* sid_string; 979 const char* sid_string = NULL; 980 char *sid_str = NULL; 980 981 981 982 /* lookup name? */ … … 986 987 struct wbcDomainSid sid; 987 988 enum wbcSidType type; 988 char *sid_str;989 989 990 990 _pam_log_debug(ctx, LOG_DEBUG, … … 1003 1003 } 1004 1004 1005 wbcFreeMemory(sid_str);1006 1005 sid_string = sid_str; 1007 1006 } … … 1009 1008 if (!safe_append_string(sid_list_buffer, sid_string, 1010 1009 sid_list_buffer_size)) { 1010 wbcFreeMemory(sid_str); 1011 1011 return false; 1012 1012 } 1013 1013 1014 wbcFreeMemory(sid_str); 1014 1015 return true; 1015 1016 } … … 1053 1054 sid_list_buffer, 1054 1055 sid_list_buffer_size)) { 1055 goto out; 1056 /* 1057 * If one group name failed, we must not fail 1058 * the authentication totally, continue with 1059 * the following group names. If user belongs to 1060 * one of the valid groups, we must allow it 1061 * login. -- BoYang 1062 */ 1063 1064 _pam_log(ctx, LOG_INFO, "cannot convert group %s to sid, " 1065 "check if group %s is valid group.", current_name, 1066 current_name); 1067 _make_remark_format(ctx, PAM_TEXT_INFO, _("Cannot convert group %s " 1068 "to sid, please contact your administrator to see " 1069 "if group %s is valid."), current_name, current_name); 1070 SAFE_FREE(current_name); 1071 search_location = comma + 1; 1072 continue; 1056 1073 } 1057 1074 … … 1069 1086 sid_list_buffer, 1070 1087 sid_list_buffer_size)) { 1071 goto out; 1088 _pam_log(ctx, LOG_INFO, "cannot convert group %s to sid, " 1089 "check if group %s is valid group.", search_location, 1090 search_location); 1091 _make_remark_format(ctx, PAM_TEXT_INFO, _("Cannot convert group %s " 1092 "to sid, please contact your administrator to see " 1093 "if group %s is valid."), search_location, search_location); 1072 1094 } 1073 1095 … … 1763 1785 wbcFreeMemory(logon.blobs); 1764 1786 } 1765 if (info && info->blobs ) {1787 if (info && info->blobs && !p_info) { 1766 1788 wbcFreeMemory(info->blobs); 1767 1789 } … … 3117 3139 } 3118 3140 3119 wbcFreeMemory(info);3120 wbcFreeMemory(policy);3121 3141 } 3142 3143 if (info && info->blobs) { 3144 wbcFreeMemory(info->blobs); 3145 } 3146 wbcFreeMemory(info); 3147 wbcFreeMemory(policy); 3122 3148 3123 3149 goto out;
Note:
See TracChangeset
for help on using the changeset viewer.