45 lines
1.1 KiB
Diff
45 lines
1.1 KiB
Diff
|
Index: src/killall5.c
|
||
|
===================================================================
|
||
|
--- src/killall5.c (revision 116)
|
||
|
+++ src/killall5.c (working copy)
|
||
|
@@ -508,9 +508,11 @@
|
||
|
|
||
|
/* Read SID & statname from it. */
|
||
|
if ((fp = fopen(path, "r")) != NULL) {
|
||
|
- if (!fgets(buf, sizeof(buf), fp))
|
||
|
- buf[0] = '\0';
|
||
|
+ size_t len;
|
||
|
|
||
|
+ len = fread(buf, sizeof(char), sizeof(buf)-1, fp);
|
||
|
+ buf[len] = '\0';
|
||
|
+
|
||
|
if (buf[0] == '\0') {
|
||
|
nsyslog(LOG_ERR,
|
||
|
"can't read from %s\n", path);
|
||
|
Index: src/shutdown.c
|
||
|
===================================================================
|
||
|
--- src/shutdown.c (revision 116)
|
||
|
+++ src/shutdown.c (working copy)
|
||
|
@@ -76,7 +76,7 @@
|
||
|
|
||
|
char *clean_env[] = {
|
||
|
"HOME=/",
|
||
|
- "PATH=/bin:/usr/bin:/sbin:/usr/sbin",
|
||
|
+ "PATH=" PATH_DEFAULT,
|
||
|
"TERM=dumb",
|
||
|
"SHELL=/bin/sh",
|
||
|
NULL,
|
||
|
Index: src/sulogin.c
|
||
|
===================================================================
|
||
|
--- src/sulogin.c (revision 116)
|
||
|
+++ src/sulogin.c (working copy)
|
||
|
@@ -987,7 +998,7 @@
|
||
|
}
|
||
|
if (alarm_rised) {
|
||
|
tcfinal(con);
|
||
|
- printf("Timed out.\n\r");
|
||
|
+ fprintf(stderr, "Timed out.\n\r");
|
||
|
}
|
||
|
/*
|
||
|
* User may pressed Control-D.
|