diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2012-09-26 01:10:42 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:51:55 +0200 |
commit | 9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch) | |
tree | b428a16618e36ed864a8d76ea3435e19a452bf90 /source/a/sysvinit/sysvinit.pidof.rhforkseverything.diff | |
parent | 75a4a592e5ccda30715f93563d741b83e0dcf39e (diff) | |
download | current-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz |
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012
Slackware 14.0 x86_64 stable is released!
We're perfectionists here at Slackware, so this release has been a long
time a-brewing. But we think you'll agree that it was worth the wait.
Slackware 14.0 combines modern components, ease of use, and flexible
configuration... our "KISS" philosophy demands it.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
Thanks to everyone who helped make this happen. The Slackware team, the
upstream developers, and (of course) the awesome Slackware user
community.
Have fun! :-)
Diffstat (limited to 'source/a/sysvinit/sysvinit.pidof.rhforkseverything.diff')
-rw-r--r-- | source/a/sysvinit/sysvinit.pidof.rhforkseverything.diff | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/source/a/sysvinit/sysvinit.pidof.rhforkseverything.diff b/source/a/sysvinit/sysvinit.pidof.rhforkseverything.diff deleted file mode 100644 index db94dcf1..00000000 --- a/source/a/sysvinit/sysvinit.pidof.rhforkseverything.diff +++ /dev/null @@ -1,81 +0,0 @@ ---- sysvinit-2.86/man/pidof.8.chroot 1998-09-02 08:49:33.000000000 -0400 -+++ sysvinit-2.86/man/pidof.8 2005-12-19 15:37:40.000000000 -0500 -@@ -4,6 +4,7 @@ - .SH SYNOPSIS - .B pidof - .RB [ \-s ] -+.RB [ \-c ] - .RB [ \-x ] - .RB [ \-o - .IR omitpid ] -@@ -24,6 +25,10 @@ - .SH OPTIONS - .IP -s - Single shot - this instructs the program to only return one \fIpid\fP. -+.IP -c -+Only return process ids that are running with the same root directory. -+This option does not make sense for non-root users, as they will be -+unable to check the current root directory of processes they do not own. - .IP -x - Scripts too - this causes the program to also return process id's of - shells running the named scripts. ---- sysvinit-2.86/src/killall5.c.chroot 2004-07-30 08:16:23.000000000 -0400 -+++ sysvinit-2.86/src/killall5.c 2005-12-19 15:38:47.000000000 -0500 -@@ -476,16 +476,22 @@ - int f; - int first = 1; - int i, oind, opt, flags = 0; -+ int chroot_check = 0; -+ struct stat st; -+ char tmp[512]; - - for (oind = PIDOF_OMITSZ-1; oind > 0; oind--) - opid[oind] = 0; - opterr = 0; - -- while ((opt = getopt(argc,argv,"ho:sx")) != EOF) switch (opt) { -+ while ((opt = getopt(argc,argv,"hco:sx")) != EOF) switch (opt) { - case '?': - nsyslog(LOG_ERR,"invalid options on command line!\n"); - closelog(); - exit(1); -+ case 'c': -+ chroot_check = 1; -+ break; - case 'o': - if (oind >= PIDOF_OMITSZ -1) { - nsyslog(LOG_ERR,"omit pid buffer size %d " -@@ -518,6 +524,16 @@ - argc -= optind; - argv += optind; - -+ /* Check if we are in a chroot */ -+ if (chroot_check) { -+ snprintf(tmp, 512, "/proc/%d/root", getpid()); -+ if (stat(tmp, &st) < 0) { -+ nsyslog(LOG_ERR, "stat failed for %s!\n", tmp); -+ closelog(); -+ exit(1); -+ } -+ } -+ - /* Print out process-ID's one by one. */ - readproc(); - for(f = 0; f < argc; f++) { -@@ -541,6 +557,16 @@ - else - spid = 1; - } -+ if (chroot_check) { -+ struct stat st2; -+ snprintf(tmp, 512, "/proc/%d/root", -+ p->pid); -+ if (stat(tmp, &st2) < 0 || -+ st.st_dev != st2.st_dev || -+ st.st_ino != st2.st_ino) { -+ continue; -+ } -+ } - if (!first) - printf(" "); - printf("%d", p->pid); |