Репозитории ALT
S: | 1.3.59-alt4 |
5.1: | 1.3.29-alt2 |
4.1: | 1.3.29-alt2 |
4.0: | 1.3.29-alt2 |
3.0: | 1.2.24-alt5 |
+backports: | 1.3.29-alt0.M30.1 |
Группа :: Система/Настройка/Загрузка и инициализация
Пакет: chkconfig
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: chkconfig-1.3.25-alt-S_IXUSR.patch
Скачать
Скачать
diff -upk.orig chkconfig-1.3.25.orig/chkconfig.c chkconfig-1.3.25/chkconfig.c
--- chkconfig-1.3.25.orig/chkconfig.c 2005-12-22 20:55:26 +0000
+++ chkconfig-1.3.25/chkconfig.c 2005-12-22 20:54:09 +0000
@@ -198,7 +198,7 @@ static void frobDependencies(struct serv
if (stat(fn, &sb)) {
continue;
}
- if (!S_ISREG(sb.st_mode)) continue;
+ if (!S_ISREG(sb.st_mode) || !(sb.st_mode & S_IXUSR)) continue;
if (!strcmp(ent->d_name, s->name)) continue;
servs = realloc(servs, (numservs+1) * sizeof(struct service));
if (!readServiceInfo(ent->d_name, servs + numservs, 0))
@@ -366,7 +366,7 @@ static int listService(char * item) {
ent->d_name, strerror(errno));
continue;
}
- if (!S_ISREG(sb.st_mode)) continue;
+ if (!S_ISREG(sb.st_mode) || !(sb.st_mode & S_IXUSR)) continue;
if (numServices == numServicesAlloced) {
numServicesAlloced += 10;
diff -upk.orig chkconfig-1.3.25.orig/leveldb.c chkconfig-1.3.25/leveldb.c
--- chkconfig-1.3.25.orig/leveldb.c 2005-12-22 20:55:26 +0000
+++ chkconfig-1.3.25/leveldb.c 2005-12-22 20:54:54 +0000
@@ -285,7 +285,7 @@ int readServiceInfo(char * name, struct
return readXinetdServiceInfo(name,service,honorHide);
}
- if (fstat(fd,&sb) || !S_ISREG(sb.st_mode)) {
+ if (fstat(fd,&sb) || !S_ISREG(sb.st_mode) || !(sb.st_mode & S_IXUSR)) {
close(fd);
return -1;
}