Репозитории ALT
5.1: | 2.86-alt2 |
4.1: | 2.86-alt2 |
4.0: | 2.86-alt1 |
3.0: | 2.85-alt8 |
Группа :: Система/Настройка/Загрузка и инициализация
Пакет: SysVinit
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: sysvinit-2.86-deb-wall-ttyname.patch
Скачать
Скачать
#! /bin/sh /usr/share/dpatch/dpatch-run
## 70_wall_ttyname.dpatch by Petter Reinholdtsen
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Use UT_LINESIZE from <utmp.h> instead of hardcoded string
## DP: lengths. Patch from SuSe.
@DPATCH@
Index: sysvinit/src/dowall.c
===================================================================
--- sysvinit/src/dowall.c (revisjon 64)
+++ sysvinit/src/dowall.c (arbeidskopi)
@@ -65,7 +65,7 @@
uid_t uid;
char *tty;
static char uidbuf[32];
- static char ttynm[32];
+ static char ttynm[UT_LINESIZE + 4];
static int init = 0;
if (!init) {
@@ -180,7 +180,7 @@
utmp->ut_user[0] == 0) continue;
if (strncmp(utmp->ut_line, "/dev/", 5) == 0) {
term[0] = 0;
- strncat(term, utmp->ut_line, UT_LINESIZE);
+ strncat(term, utmp->ut_line, sizeof(term)-1);
} else
snprintf(term, sizeof(term), "/dev/%.*s",
UT_LINESIZE, utmp->ut_line);