You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
execute command :chkconfig
then os will produce coredump file.
The text was updated successfully, but these errors were encountered:
fayeinseu
changed the title
while add a invalid service
while add a invalid service in the directory of /etc/chkconfig.d, execute chkconfig will coredump
May 11, 2020
int readServiceInfo(char *name, int type, struct service *service,
int honorHide) {...
asprintf(&filename, RUNLEVELS "/chkconfig.d/%s", name);
if ((fd = open(filename, O_RDONLY)) >= 0) {
parseret = parseServiceInfo(fd, name, &serv_overrides, honorHide, 1); //here
if (parseret >= 0) {
if (serv_overrides.name)
serv.name = serv_overrides.name;
...
and when level >6 , it will return 1 while the service name is random inited. if (serv.levels == -1) { if (!strcmp(levelbuf, "-")) serv.levels = 0; else serv.levels = parseLevels(levelbuf, 0); } if (serv.levels == -1) { if (serv.desc) free(serv.desc); free(bufstart); return 1; }
steps to reproduce:
1.add a service in /etc/chkconfig as below:
chkconfig
then os will produce coredump file.
The text was updated successfully, but these errors were encountered: