* grp.cc (getgroups): Avoid crash if passwd field if /etc/group is
empty.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | ||||
| 2001-04-18  Egor Duda  <deo@logos-m.ru> | ||||
|  | ||||
| 	* grp.cc (getgroups): Avoid crash if passwd field if /etc/group is | ||||
| 	empty. | ||||
|  | ||||
| Tue Apr 17 19:05:44 2001  Christopher Faylor <cgf@cygnus.com> | ||||
|  | ||||
| 	* path.h (path_conv::add_ext_from_sym): Declare. | ||||
|   | ||||
| @@ -260,7 +260,8 @@ getgroups (int gidsetsize, gid_t *grouplist, gid_t gid, const char *username) | ||||
| 	  convert_sid_to_string_sid (groups->Groups[pg].Sid, ssid); | ||||
|           for (int gg = 0; gg < curr_lines; ++gg) | ||||
| 	    { | ||||
| 	      if (!strcmp (group_buf[gg].gr_passwd, ssid)) | ||||
| 	      if (group_buf[gg].gr_passwd && | ||||
| 	          !strcmp (group_buf[gg].gr_passwd, ssid)) | ||||
| 	        { | ||||
| 		  if (cnt < gidsetsize) | ||||
| 		    grouplist[cnt] = group_buf[gg].gr_gid; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user