[Pkg-shadow-commits] r3183 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Tue Mar 23 13:05:15 UTC 2010
Author: nekral-guest
Date: 2010-03-23 13:05:06 +0000 (Tue, 23 Mar 2010)
New Revision: 3183
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/newgrp.c
upstream/trunk/src/su.c
upstream/trunk/src/vipw.c
Log:
* src/su.c, src/vipw.c, src/newgrp.c: When the child is
interrupted, stop ourself with a SIGSTOP signal.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2010-03-23 11:26:34 UTC (rev 3182)
+++ upstream/trunk/ChangeLog 2010-03-23 13:05:06 UTC (rev 3183)
@@ -1,5 +1,10 @@
2010-03-23 Nicolas François <nicolas.francois at centraliens.net>
+ * src/su.c, src/vipw.c, src/newgrp.c: When the child is
+ interrupted, stop ourself with a SIGSTOP signal.
+
+2010-03-23 Nicolas François <nicolas.francois at centraliens.net>
+
* src/newgrp.c: Limit the scope of variable pid.
* src/login_nopam.c: Limit the scope of variables end, lineno, i,
str_len.
Modified: upstream/trunk/src/newgrp.c
===================================================================
--- upstream/trunk/src/newgrp.c 2010-03-23 11:26:34 UTC (rev 3182)
+++ upstream/trunk/src/newgrp.c 2010-03-23 13:05:06 UTC (rev 3183)
@@ -322,8 +322,9 @@
errno = 0;
pid = waitpid (child, &cst, WUNTRACED);
if ((pid == child) && (WIFSTOPPED (cst) != 0)) {
- /* stop when child stops */
- kill (getpid (), WSTOPSIG(cst));
+ /* The child (shell) was suspended.
+ * Suspend sg/newgrp. */
+ kill (getpid (), SIGSTOP);
/* wake child when resumed */
kill (child, SIGCONT);
}
Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c 2010-03-23 11:26:34 UTC (rev 3182)
+++ upstream/trunk/src/su.c 2010-03-23 13:05:06 UTC (rev 3183)
@@ -313,7 +313,7 @@
if (((pid_t)-1 != pid) && (0 != WIFSTOPPED (status))) {
/* The child (shell) was suspended.
* Suspend su. */
- kill (getpid (), WSTOPSIG(status));
+ kill (getpid (), SIGSTOP);
/* wake child when resumed */
kill (pid, SIGCONT);
}
Modified: upstream/trunk/src/vipw.c
===================================================================
--- upstream/trunk/src/vipw.c 2010-03-23 11:26:34 UTC (rev 3182)
+++ upstream/trunk/src/vipw.c 2010-03-23 13:05:06 UTC (rev 3183)
@@ -310,7 +310,7 @@
if ((pid != -1) && (WIFSTOPPED (status) != 0)) {
/* The child (editor) was suspended.
* Suspend vipw. */
- kill (getpid (), WSTOPSIG (status));
+ kill (getpid (), SIGSTOP);
/* wake child when resumed */
kill (pid, SIGCONT);
} else {
More information about the Pkg-shadow-commits
mailing list