Hello community, here is the log from the commit of package sysvinit for openSUSE:Factory checked in at Tue Oct 18 14:31:03 CEST 2011.
-------- --- openSUSE:Factory/sysvinit/sysvinit.changes 2011-10-11 18:00:01.000000000 +0200 +++ /mounts/work_src_done/STABLE/sysvinit/sysvinit.changes 2011-10-18 11:33:06.000000000 +0200 @@ -1,0 +2,13 @@ +Tue Oct 18 09:30:36 UTC 2011 - [email protected] + +- Add option -x to be able to identify scripts overwriting their + command line (bnc#723708) + +------------------------------------------------------------------- +Mon Oct 17 09:08:36 UTC 2011 - [email protected] + +- There was never a version 1.16 for showconsole +- Add some code to be able to detect programs even as user with + kernel 3.0 and above (bnc#723072) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- showconsole-1.16.dif showconsole-1.16.tar.gz New: ---- showconsole-1.15.dif showconsole-1.15.tar.bz2 sysvinit-2.88dsf-scripts2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysvinit.spec ++++++ --- /var/tmp/diff_new_pack.sMUCf4/_old 2011-10-18 14:30:59.000000000 +0200 +++ /var/tmp/diff_new_pack.sMUCf4/_new 2011-10-18 14:30:59.000000000 +0200 @@ -22,7 +22,7 @@ %define MGVER 0.9.6s %define PDVER 2.0.2 %define KPVER 2.20 -%define SCVER 1.16 +%define SCVER 1.15 %define SIVER 2.88+ %define START 0.57 License: GPLv2+ @@ -36,7 +36,7 @@ Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-%{SIVER}dsf.tar.bz2 Source2: killproc-%{KPVER}.tar.bz2 Source3: powerd-%{PDVER}.tar.bz2 -Source4: showconsole-%{SCVER}.tar.gz +Source4: showconsole-%{SCVER}.tar.bz2 Source5: startpar-%{START}.tar.bz2 Source6: rc.powerd Source7: %{name}-rpmlintrc @@ -46,12 +46,13 @@ Patch: %{name}-%{version}dsf.dif Patch1: %{name}-2.82-startstop.patch Patch2: %{name}-2.88dsf-suse.patch -Patch3: %{name}-2.88dsf-no-kill.patch +Patch3: %{name}-2.88dsf-scripts2.patch Patch4: notify-pam-dead.patch Patch5: %{name}-2.88dsf-multiple-sulogin.patch Patch6: %{name}-%{version}dsf-run.diff Patch7: %{name}-%{version}dsf-crypt.patch Patch8: %{name}-%{version}dsf-blowfish.dif +Patch9: %{name}-2.88dsf-no-kill.patch Patch20: powerd-%{PDVER}.dif Patch21: powerd-%{PDVER}-getaddrinfo.patch Patch30: killproc-%{KPVER}.dif @@ -96,12 +97,13 @@ %setup -n %{name}-%{SIVER}dsf -q -b 2 -b 3 -b 4 -b 5 %patch1 -p0 -b .startstop %patch2 -p0 -b .suse -%patch3 -p0 -b .no-kill +%patch3 -p0 -b .scripts2 %patch4 -p0 -b .pam %patch5 -p0 -b .sulogin %patch6 -p0 -b .run %patch7 -p0 -b .crypt %patch8 -p0 -b .blowfish +%patch9 -p0 -b .no-kill %patch pushd doc mkdir killproc powerd showconsole ++++++ killproc-2.20.dif ++++++ --- /var/tmp/diff_new_pack.sMUCf4/_old 2011-10-18 14:30:59.000000000 +0200 +++ /var/tmp/diff_new_pack.sMUCf4/_new 2011-10-18 14:30:59.000000000 +0200 @@ -1,4 +1,282 @@ ---- .#nothing -+++ .#nothing 2011-09-01 11:59:52.000000000 +0000 -@@ -0,0 +1 @@ -+Please remove if patched +--- checkproc.8 ++++ checkproc.8 2011-10-18 09:29:16.195166916 +0000 +@@ -17,6 +17,7 @@ Pidofproc \- Checks for a process by exe + .HP + .B checkproc + .RB [ \-vLkNz ] ++.RB [ \-x ] + .RB [ \-p\ \fIpid_file\fP ] + .RB [ \-i\ \fIingnore_file\fP ] + .RB [ \-c\ \fIroot\fP ] +@@ -30,10 +31,12 @@ Pidofproc \- Checks for a process by exe + .B checkproc + .B \ \ + .RB [ \-vk ] ++.RB [ \-x ] + .I basename_of_executable + .HP + .B pidofproc + .RB [ \-LkNz ] ++.RB [ \-x ] + .RB [ \-p\ \fIpid_file\fP ] + .RB [ \-i\ \fIingnore_file\fP ] + .RB [ \-c\ \fIroot\fP ] +@@ -47,6 +50,7 @@ Pidofproc \- Checks for a process by exe + .B pidofproc + .B \ \ + .RB [ \-k ] ++.RB [ \-x ] + .I basename_of_executable + .SH SYNOPSIS LSB 3.1 + .HP +@@ -250,6 +254,15 @@ are in the zombie state. Without this o + handled as not existent because such a process isn't + alive but listed in the process table and waits on its + parent process. ++.TP ++.B \-x ++Tells ++.B checkproc ++as well as ++.B pidofproc ++to use the upto 15 byte long filename name found in ++.I /proc/<pid>/stat ++to be able to identify scripts overwriting their command line. + .PP + .\" + .SH EXAMPLE +--- checkproc.c ++++ checkproc.c 2011-10-17 15:41:46.671646382 +0000 +@@ -60,7 +60,7 @@ int main(int argc, char **argv) + posixa = getenv("_POSIX_OPTION_ORDER"); unsetenv("_POSIX_OPTION_ORDER"); + posixb = getenv("POSIXLY_CORRECT"); unsetenv("POSIXLY_CORRECT"); + opterr = 0; +- while ((c = getopt(argc, argv, "c:kp:nNhqvzLi:")) != -1) { ++ while ((c = getopt(argc, argv, "c:kp:nNhqvzLi:x")) != -1) { + switch (c) { + case 'c': + if (optarg && optarg[0] != '-' && !root) { +@@ -86,6 +86,9 @@ int main(int argc, char **argv) + case 'N': + init_nfs(); + break; ++ case 'x': ++ flags |= STSCRPT; ++ break; + case 'z': + flags &= ~NZOMBIE; + break; +--- killproc.8 ++++ killproc.8 2011-10-18 09:27:22.403146549 +0000 +@@ -16,6 +16,7 @@ Killproc \- Send signals to processes by + .B killproc + .RB [ \-vqLN ] + .RB [ \-g | -G ] ++.RB [ \-x ] + .RB [ \-p\ \fIpid_file\fP ] + .RB [ \-i\ \fIingnore_file\fP ] + .RB [ \-c\ \fIroot\fP ] +@@ -269,6 +270,13 @@ Be more verbose. + This option list all available signals and some of their + synonyms by their number and signal names to standard out. + and exits. ++.TP ++.B \-x ++Tells ++.B killproc ++to use the upto 15 byte long filename name found in ++.I /proc/<pid>/stat ++to be able to identify scripts overwriting their command line. + .\" + .SH EXAMPLES + .TP +--- killproc.c ++++ killproc.c 2011-10-17 15:42:52.871147146 +0000 +@@ -96,7 +96,7 @@ int main(int argc, char **argv) + posixa = getenv("_POSIX_OPTION_ORDER"); unsetenv("_POSIX_OPTION_ORDER"); + posixb = getenv("POSIXLY_CORRECT"); unsetenv("POSIXLY_CORRECT"); + opterr = 0; +- while ((c = getopt(argc, argv, "c:p:gGnNhlvqt:Li:")) != -1) { ++ while ((c = getopt(argc, argv, "c:p:gGnNhlvqt:Li:x")) != -1) { + switch (c) { + case 'c': + if (optarg && optarg[0] != '-' && !root) { +@@ -135,6 +135,9 @@ int main(int argc, char **argv) + case 'N': + init_nfs(); + break; ++ case 'x': ++ flags |= STSCRPT; ++ break; + case 'p': /* Changed from -f to -p to fit startproc and LSB */ + /* Allocate here: address optarg (current *argv) isn't freeable */ + if (optarg && !pid_file) { +--- libinit.c ++++ libinit.c 2011-10-18 09:06:23.471646253 +0000 +@@ -570,13 +570,12 @@ static const char * checkscripts(char* e + */ + scrpt = (char *)memchr(scrpt, 0, cnt); + if (!scrpt || (cnt = len - (++scrpt - ent)) <= 0) +- goto out; ++ break; + if (*scrpt == '/') { + ret = scrpt; + goto out; + } + } while (scrpt && cnt > 0); +- + out: + if (scrpt && root) { + char *ptr = strdupa(scrpt); +@@ -877,8 +876,11 @@ int pidof (const char * inname, const ch + continue; + + /* Seek for a script not for a binary */ +- if (!(scrpt = checkscripts(entry, root, len, d->d_name))) ++ if (!(scrpt = checkscripts(entry, root, len, d->d_name))) { ++ if (flags & STSCRPT) ++ goto risky; + continue; ++ } + + /* Don't blame our boot scripts having the same name */ + if ( (flags & (KILL|DAEMON)) +@@ -1128,7 +1130,7 @@ risky: + return -1; + } + +- if (!(flags & (KTHREAD|KSHORT))&& isscrpt && ++ if (!(flags & (KTHREAD|KSHORT)) && isscrpt && + (fp = open(proc(buf, "cmdline"), O_PROCMODE)) != -1) { + + char entry[PATH_MAX+1]; +@@ -1142,15 +1144,18 @@ risky: + goto out; + + /* Seek for a script not for a binary */ +- if (!(scrpt = checkscripts(entry, root, len, buf))) ++ if (!(scrpt = checkscripts(entry, root, len, buf))) { ++ if (flags & STSCRPT) ++ goto nameonly; + goto out; /* Nothing found */ ++ } + + if (scrpt && strcmp(scrpt,fullname) == 0) { + do_list(pid,getsession(pid),ignore); + goto out; /* Done */ + } + } +- ++nameonly: + if ((fp = open(proc(buf, "stat"), O_PROCMODE)) != -1) { + + char entry[PATH_MAX+1]; +@@ -1313,7 +1318,7 @@ int check_pids (const char * inname, con + + skip = true; /* No stat entry check needed */ + } +-risky: ++ risky: + + if (!(flags & (KTHREAD|KSHORT)) && isscrpt && + (fp = open(proc(pid, "cmdline"), O_PROCMODE)) != -1) { +@@ -1332,7 +1337,8 @@ risky: + if ((scrpt = checkscripts(entry, root, len, pid))) { + if (strcmp(scrpt,fullname) == 0) + continue; /* Found */ +- skip = true; /* No stat entry check needed */ ++ if (!(flags & STSCRPT)) ++ skip = true; /* No stat entry check needed */ + } + } + +--- libinit.h ++++ libinit.h 2011-10-18 09:13:36.923145552 +0000 +@@ -106,6 +106,7 @@ + #define FLWLINK 0x0040 + #define KSTOP 0x0080 + #define KBASE 0x0100 ++#define STSCRPT 0x0200 + + #define MAXENV 20 + #define CMDLLEN MAXNAMLEN /* The string length of /proc/12345/cmdline\0\0 + 1 */ +@@ -116,6 +117,7 @@ + #endif + #define DEFPIDEXT ".pid" + #define DEFPIDLEN 14 /* The string length of /var/run/.pid + 1 */ ++#define COMM_LEN 15 /* The lenght of the task command name in /proc/<pid>/stat */ + + extern char **environ; + extern char * newenvp[]; +@@ -216,10 +218,12 @@ static inline char * base_name ( const c + + static inline char * swap_name ( const char * base ) + { +- size_t len = strlen(base) + 2 + 1; +- char *swap = (char*)xmalloc(len); +- +- return strcat(strcat(strcpy(swap,"("),base),")"); ++ size_t len = strlen(base); ++ char *swap; ++ if (len > COMM_LEN) ++ len = COMM_LEN; ++ swap = (char*)xmalloc(len + 2 + 1); ++ return strcat(strncat(strcpy(swap,"("),base, COMM_LEN),")"); + } + + extern void addnewenv ( const char * name, const char * entry ); +--- startproc.8 ++++ startproc.8 2011-10-18 09:28:45.875646247 +0000 +@@ -18,6 +18,7 @@ Start_daemon \- Start processes identifi + .HP + .B startproc + .RB [ \-fLves ] ++.RB [ \-x ] + .RB [[ \-n\ ] \fI+/\-<prio>\fP ] + .RB [ \- ( t | T )\ \fI<sec>\fP ] + .RB [ \-u\ \fIuser\fP ] +@@ -32,6 +33,7 @@ Start_daemon \- Start processes identifi + .HP + .B start_daemon + .RB [ \-fLve ] ++.RB [ \-x ] + .RB [ \-n\ \fI+/\-<prio>\fP ] + .RB [ \-u\ \fIuser\fP ] + .RB [ \-g\ \fIgroup\fP ] +@@ -249,6 +251,15 @@ Sets the user ID of the process to + .TP + .B \-v + Verbose output. ++.TP ++.B \-x ++Tells ++.B startproc ++as well as ++.B start_daemon ++to use the upto 15 byte long filename name found in ++.I /proc/<pid>/stat ++to be able to identify scripts overwriting their command line. + .\" + .SH EXAMPLE + .TP +--- startproc.c ++++ startproc.c 2011-10-17 15:43:02.443647315 +0000 +@@ -109,7 +109,7 @@ int main(int argc, char **argv) + } + + opterr = 0; +- while ((c = getopt(argc, argv, "+c:edp:l:hqvsu:g:t:n:fLi:T:wW:")) != -1) { /* `+' is POSIX correct */ ++ while ((c = getopt(argc, argv, "+c:edp:l:hqvsu:g:t:n:fLi:T:wW:x")) != -1) { /* `+' is POSIX correct */ + switch (c) { + case 'v': + quiet = 0; +@@ -127,6 +127,9 @@ int main(int argc, char **argv) + dialog = true; + seconds = 15; + break; ++ case 'x': ++ flags |= STSCRPT; ++ break; + case 'p': /* Former option -f */ + if (force) + warn("option -p does not work in force mode\n"); ++++++ showconsole-1.16.dif -> showconsole-1.15.dif ++++++ --- openSUSE:Factory/sysvinit/showconsole-1.16.dif 2011-10-02 11:16:21.000000000 +0200 +++ /mounts/work_src_done/STABLE/sysvinit/showconsole-1.15.dif 2011-10-17 14:36:21.000000000 +0200 @@ -1,4 +1,10 @@ ---- .#nothing -+++ .#nothing 2011-09-01 11:59:52.000000000 +0000 -@@ -0,0 +1 @@ -+Please remove if patched +--- showconsole.8 ++++ showconsole.8 2011-09-08 15:13:48.000000000 +0000 +@@ -8,7 +8,6 @@ + .\" + .TH SHOWCONSOLE 8 "Nov 10, 2000" "Version 1.16" "The SuSE boot concept" + .UC 8 +-.OS SuSE Linux + .SH NAME + Showconsole \- determines the real tty of stdin + .br ++++++ showconsole-1.16.tar.gz -> showconsole-1.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/.#nothing new/showconsole-1.15/.#nothing --- old/showconsole-1.16/.#nothing 2011-09-08 16:50:53.000000000 +0200 +++ new/showconsole-1.15/.#nothing 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Please remove if patched diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/blogd.8~ new/showconsole-1.15/blogd.8~ --- old/showconsole-1.16/blogd.8~ 2011-08-12 21:01:13.000000000 +0200 +++ new/showconsole-1.15/blogd.8~ 1970-01-01 01:00:00.000000000 +0100 @@ -1,114 +0,0 @@ -.\" -.\" Copyright 2000 Werner Fink, 2000 SuSE GmbH Nuernberg, Germany. -.\" -.\" This program is free software; you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation; either version 2 of the License, or -.\" (at your option) any later version. -.\" -.TH BLOGD 8 "Nov 10, 2000" "Version 1.16" "The SuSE boot concept" -.UC 8 -.OS SuSE Linux -.SH NAME -blogd \- boot logging on /dev/console -.SH SYNOPSIS -.\" -.B /sbin/blogd -.RI [ /dev/realtty ] -.SH DESCRIPTION -Without argument -.B blogd -determines the real underlying character device of -.IR /dev/console . -.B blogd -spawns a pty/tty pair to reconnect the current -.I /dev/console -with the slave of the pty/tty pair. During -writing information from this slave to the -real character device a ring buffer is used -to hold the information for writing it to an -.B existing -logging file. -.PP -To fetch the real tty of -.I /dev/console -the program -.BR showconsole (8) -can be used. This has the advantage that -.B blogd -will not hold the real character device of -.I /dev/console -as its controlling tty (would hangup any running -getty on that character device). -.\" -.SH SIGNALS -.B blogd -knows a few signal to contol its behavior. -.TP -.BR SIGQUIT ", " SIGINT ", and " SIGTERM -will cause -.B blogd -tries to write out the ring buffer and to exit. -.TP -.B SIGIO -says -.B blogd -that now it is able to write on -.I /var/log/boot.msg -which means that the file system is -mounted read/write and the kernel -messages are written to that file. -.TP -.B SIGSYS -says -.B blogd -that it should stop writing to disk but -continue to repeat messages to the old -devices of the system console. -\." -.SH BUGS -.B blogd -needs a mounted -.I /proc -and -.I /dev/pts -file system and tries to set the controlling -tty to -.B stdin -if the real character device of -.I /dev/console -is not given. After reading -.I /proc -.B blogd -tries to restore the status of the controlling tty -to avoid problems with getty processes. This can -fail because -.B blogd -forks to run in the background as a daemon. -.SH FILES -.TP -.I /proc/<pid of blogd>/stat -the stat file of the -.B blogd -process. -.TP -.I /dev/console -the system console. -.TP -.I /var/log/boot.msg -logging file which is created by -.BR klogd (8) -or -.BR dmesg (8). -.\" -.SH SEE ALSO -.BR showconsole (8), -.BR syslogd (8), -.BR klogd (8), -.BR dmesg (8), -.BR proc (5). -.SH COPYRIGHT -2000 Werner Fink, -2000 SuSE GmbH Nuernberg, Germany. -.SH AUTHOR -Werner Fink <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/blogger.8~ new/showconsole-1.15/blogger.8~ --- old/showconsole-1.16/blogger.8~ 2011-08-13 01:10:32.000000000 +0200 +++ new/showconsole-1.15/blogger.8~ 1970-01-01 01:00:00.000000000 +0100 @@ -1,68 +0,0 @@ -.\" -.\" Copyright 2001 Werner Fink, 2001 SuSE GmbH Nuernberg, Germany. -.\" -.\" This program is free software; you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation; either version 2 of the License, or -.\" (at your option) any later version. -.\" -.TH BLOGGER 8 "Jan 26, 2001" "Version 1.16" "The SuSE boot concept" -.UC 8 -.OS SuSE Linux -.SH NAME -Blogger \- writes messages to a running blogd process -.SH SYNOPSIS -.\" -.B blogger -.RB [ \-n | \-d | \-f | \-s | \-u ] -\fB"\fIa message here\fB"\fP -.SH DESCRIPTION -.B blogger -is used to send messages to the blogd process during -boot phase. These messages will only appear in the boot -logging file -.I /var/log/boot.msg -and not on -.IR /dev/console . -.SH OPTIONS -.TP -.B \-n -Declare the following message as a -.BR <notice> . -This is the default. -.TP -.B \-d -Use thist to add the leading string -.B <done> -to the message. -.TP -.B \-f -Use thist to add the leading string -.B <failed> -to the message. -.TP -.B \-s -Use thist to add the leading string -.B <skipped> -to the message. -.TP -.B \-u -Use thist to add the leading string -.B <unused> -to the message. -.\" -.SH FILES -.TP -.I /dev/blog -the named pipe (FIFO) used as message channel to the blogd process. -.\" -.SH SEE ALSO -.BR blogd (8), -.BR console (4), -.BR tty (4), -.BR proc (5). -.SH COPYRIGHT -2001 Werner Fink, -2001 SuSE GmbH Nuernberg, Germany. -.SH AUTHOR -Werner Fink <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/isserial.8~ new/showconsole-1.15/isserial.8~ --- old/showconsole-1.16/isserial.8~ 2011-08-13 01:02:19.000000000 +0200 +++ new/showconsole-1.15/isserial.8~ 1970-01-01 01:00:00.000000000 +0100 @@ -1,48 +0,0 @@ -.\" -.\" Copyright 2003 Werner Fink, 2003 SuSE Linux AG, Germany. -.\" -.\" This program is free software; you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation; either version 2 of the License, or -.\" (at your option) any later version. -.\" -.TH SHOWCONSOLE 8 "Sep 05, 2003" "Version 1.16" "The SuSE boot concept" -.UC 8 -.OS SuSE Linux -.SH NAME -Isserial \- determines if the underlying tty of stdin is a serial line -.br -.SH SYNOPSIS -.B isserial [< /dev/console] -.SH DESCRIPTION -.B iserial -determines if the underlying character device of -the current -.B stdin -is a serial line. -This can be used on -.I /dev/console -as current character device to -check if the console is a serial line. -.PP -The exit status of -.B iserial -is -.B 0 -if -.B stdin -is a serial line otherwise not. -\." -.SH FILES -.TP -.I /dev/console -the system console. -.\" -.SH SEE ALSO -.BR console (4), -.BR tty (4), -.SH COPYRIGHT -2003 Werner Fink, -2003 SuSE GmbH Nuernberg, Germany. -.SH AUTHOR -Werner Fink <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/showconsole-1.14.lsm new/showconsole-1.15/showconsole-1.14.lsm --- old/showconsole-1.16/showconsole-1.14.lsm 2011-03-25 18:55:24.000000000 +0100 +++ new/showconsole-1.15/showconsole-1.14.lsm 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -Begin3 -Title: console tools for boot scripts -Version: 1.14 -Entered-date: 25MAR11 -Description: Used for fetch the real device in boot scripts - running on /dev/console. -Keywords: boot control -Author: Werner Fink <[email protected]> -Maintained-by: Werner Fink <[email protected]> -Primary-site: sunsite.unc.edu /pub/Linux/system/daemons/init - @UNKNOWN showconsole-1.14.tar.gz -Alternate-site: ftp.suse.com /pub/projects/init -Platforms: Linux with System VR2 or higher boot scheme -Copying-policy: GPL -End diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/showconsole.8 new/showconsole-1.15/showconsole.8 --- old/showconsole-1.16/showconsole.8 2011-09-08 17:13:48.000000000 +0200 +++ new/showconsole-1.15/showconsole.8 2011-04-01 15:18:14.000000000 +0200 @@ -8,6 +8,7 @@ .\" .TH SHOWCONSOLE 8 "Nov 10, 2000" "Version 1.16" "The SuSE boot concept" .UC 8 +.OS SuSE Linux .SH NAME Showconsole \- determines the real tty of stdin .br diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/showconsole-1.16/showconsole.8~ new/showconsole-1.15/showconsole.8~ --- old/showconsole-1.16/showconsole.8~ 2011-09-08 17:13:48.000000000 +0200 +++ new/showconsole-1.15/showconsole.8~ 1970-01-01 01:00:00.000000000 +0100 @@ -1,84 +0,0 @@ -.\" -.\" Copyright 2000 Werner Fink, 2000 SuSE GmbH Nuernberg, Germany. -.\" -.\" This program is free software; you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation; either version 2 of the License, or -.\" (at your option) any later version. -.\" -.TH SHOWCONSOLE 8 "Nov 10, 2000" "Version 1.16" "The SuSE boot concept" -.UC 8 -.OS SuSE Linux -.SH NAME -Showconsole \- determines the real tty of stdin -.br -Setconsole \- redirect system console output to a tty -.SH SYNOPSIS -.\" -.B showconsole -.RI [ -n ] -.PP -.BR setconsole\ [ -r | /dev/tty<xy> ] -.SH DESCRIPTION -.B showconsole -determines the real character device of -the current system console. -This can be used on -.I /dev/console -as current character device to -get the real -character device back. -.PP -With an terminal device as argument -.B setconsole -redirects the output that would have gone to -.I /dev/console -or -.I /dev/tty0 -to the given terminal. -Without any argument or the option -.B -the -.B setconsole -undo any redirection. -.\" -.SH OPTIONS -.TP -.B \-n -Return the major and minor device numbers instead of -the device file name. This can be used to asked the -kernel for the major and minor device numbers of a not -existing device file in -.IR /dev . -.\" -.SH BUGS -.B showconsole -needs a mounted -.B /proc -file system and tries to set the controlling -tty to -.B stdin -if no controlling tty is found. After reading -.B /proc -the status of the controlling tty is restored -to avoid problems with getty processes. -.SH FILES -.TP -.I /proc/<pid of showconsole>/stat -the stat file of the -.B showconsole -process. -.TP -.I /dev/console -the system console. -.\" -.SH SEE ALSO -.BR blogd (8), -.BR console (4), -.BR tty (4), -.BR proc (5). -.SH COPYRIGHT -2000 Werner Fink, -2000 SuSE GmbH Nuernberg, Germany. -.SH AUTHOR -Werner Fink <[email protected]> ++++++ sysvinit-2.88dsf-no-kill.patch ++++++ --- /var/tmp/diff_new_pack.sMUCf4/_old 2011-10-18 14:30:59.000000000 +0200 +++ /var/tmp/diff_new_pack.sMUCf4/_new 2011-10-18 14:30:59.000000000 +0200 @@ -1,6 +1,6 @@ --- src/killall5.c -+++ src/killall5.c 2010-03-19 14:29:44.000000000 +0000 -@@ -444,6 +444,38 @@ int readarg(FILE *fp, char *buf, int sz) ++++ src/killall5.c 2011-10-17 12:11:32.000000000 +0000 +@@ -454,6 +454,38 @@ int readarg(FILE *fp, char *buf, int sz) } /* @@ -39,15 +39,7 @@ * Read the proc filesystem. * CWD must be /proc to avoid problems if / is affected by the killing (ie depend on fuse). */ -@@ -458,6 +490,7 @@ int readproc(int do_stat) - char buf[PATH_MAX+1]; - char *s, *q; - unsigned long startcode, endcode; -+ ssize_t len; - int pid, f; - - /* Open the /proc directory. */ -@@ -608,6 +641,26 @@ int readproc(int do_stat) +@@ -634,6 +666,26 @@ int readproc(int do_stat) p->nfs = 0; switch (do_stat) { @@ -73,4 +65,4 @@ + break; case DO_NETFS: if ((p->nfs = check4nfs(path, buf))) - break; + goto link; ++++++ sysvinit-2.88dsf-scripts2.patch ++++++ --- src/killall5.c +++ src/killall5.c 2011-10-17 12:18:06.455147132 +0000 @@ -469,6 +469,7 @@ int readproc(int do_stat) char *s, *q; unsigned long startcode, endcode; int pid, f; + ssize_t len; /* Open the /proc directory. */ if (chdir("/proc") == -1) { @@ -635,23 +636,22 @@ int readproc(int do_stat) switch (do_stat) { case DO_NETFS: if ((p->nfs = check4nfs(path, buf))) - break; + goto link; case DO_STAT: if (stat(path, &st) != 0) break; - else { - char buf[PATH_MAX]; - - f = readlink(path, buf, sizeof buf); - if (f > 0) { - p->pathname = (char *)xmalloc(f + 1); - memcpy(p->pathname, buf, f); - p->pathname[f] = '\0'; - } - } p->dev = st.st_dev; p->ino = st.st_ino; + + /* Fall through */ default: + link: + len = readlink(path, buf, PATH_MAX); + if (len > 0) { + p->pathname = (char *)xmalloc(len + 1); + memcpy(p->pathname, buf, len); + p->pathname[len] = '\0'; + } break; } @@ -722,6 +722,7 @@ PIDQ_HEAD *pidof(char *prog) int dostat = 0; int foundone = 0; int ok = 0; + const int root = (getuid() == 0); char real[PATH_MAX+1]; if (! prog) @@ -769,16 +770,11 @@ PIDQ_HEAD *pidof(char *prog) * network FS located binaries */ if (!foundone && nfs) { for (p = plist; p; p = p->next) { - char exe [PATH_MAX+1]; - char path[PATH_MAX+1]; - int len; + if (!p->pathname) + continue; if (!p->nfs) continue; - snprintf(exe, sizeof(exe), "/proc/%d/exe", p->pid); - if ((len = readlink(exe, path, PATH_MAX)) < 0) - continue; - path[len] = '\0'; - if (strcmp(prog, path) != 0) + if (strcmp(prog, p->pathname) != 0) continue; add_pid_to_q(q, p); foundone++; @@ -788,19 +784,31 @@ PIDQ_HEAD *pidof(char *prog) /* If we didn't find a match based on dev/ino, try the name. */ if (!foundone) for (p = plist; p; p = p->next) { if (prog[0] == '/') { - if (!p->pathname) - continue; + if (!p->pathname) { + if (root) + continue; + goto fallback; + } if (strcmp(prog, p->pathname)) { int len = strlen(prog); if (strncmp(prog, p->pathname, len)) + { + if (scripts_too) + goto fallback; continue; + } if (strcmp(" (deleted)", p->pathname + len)) + { + if (scripts_too) + goto fallback; continue; + } } add_pid_to_q(q, p); continue; } + fallback: ok = 0; /* matching nonmatching continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
