[Pkg-shadow-commits] r1048 - in trunk/debian: . patches
Christian Perrier
bubulle at costa.debian.org
Fri Jul 14 07:33:40 UTC 2006
Author: bubulle
Date: 2006-07-14 07:33:33 +0000 (Fri, 14 Jul 2006)
New Revision: 1048
Added:
trunk/debian/patches/496_login_init_session
Modified:
trunk/debian/changelog
trunk/debian/patches/series
Log:
Fix for #374547
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-07-14 07:28:17 UTC (rev 1047)
+++ trunk/debian/changelog 2006-07-14 07:33:33 UTC (rev 1048)
@@ -4,8 +4,11 @@
* Upstream bugs not yet fixed in upstream releases or CVS:
- 495_salt_stack_smash: chpasswd/chgpasswd does not break if compiled
with SSP. Closes: #377825
+ - 496_login_init_session: Make login initialize a session so that
+ ^C and ^Z work when used while booting with "init=/bin/login"
+ Closes: #374547
- -- Christian Perrier <bubulle at debian.org> Fri, 14 Jul 2006 09:25:26 +0200
+ -- Christian Perrier <bubulle at debian.org> Fri, 14 Jul 2006 09:32:09 +0200
shadow (1:4.0.17-1) unstable; urgency=low
Added: trunk/debian/patches/496_login_init_session
===================================================================
--- trunk/debian/patches/496_login_init_session 2006-07-14 07:28:17 UTC (rev 1047)
+++ trunk/debian/patches/496_login_init_session 2006-07-14 07:33:33 UTC (rev 1048)
@@ -0,0 +1,55 @@
+Goal: Make login initialize a session to allow ^C and ^Z to work when
+ booting with init=/bin/login
+
+Fix: #374547
+
+Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
+
+Status wrt upstream: reported, not applied yet
+
+Index: shadow-4.0.17/src/login.c
+===================================================================
+--- shadow-4.0.17.orig/src/login.c 2006-07-14 09:25:51.806234220 +0200
++++ shadow-4.0.17/src/login.c 2006-07-14 09:31:59.645240541 +0200
+@@ -41,6 +41,7 @@
+ #include <signal.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
++#include <sys/ioctl.h>
+ #include "defines.h"
+ #include "faillog.h"
+ #include "failure.h"
+@@ -1046,6 +1047,10 @@
+ }
+ /* child */
+ #endif
++ /* start new session */
++ setsid();
++ if (ioctl(0, TIOCSCTTY, 1))
++ fprintf(stderr,_("TIOCSCTTY failed on %s"),tty);
+
+ /* We call set_groups() above because this clobbers pam_groups.so */
+ #ifndef USE_PAM
+Index: shadow-4.0.17/src/sulogin.c
+===================================================================
+--- shadow-4.0.17.orig/src/sulogin.c 2006-05-13 01:13:10.000000000 +0200
++++ shadow-4.0.17/src/sulogin.c 2006-07-14 09:31:59.669240742 +0200
+@@ -35,6 +35,7 @@
+ #include <pwd.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <sys/ioctl.h>
+ #include "defines.h"
+ #include "getdef.h"
+ #include "prototypes.h"
+@@ -142,6 +143,10 @@
+ #endif
+ exit (1); /* must be a terminal */
+ }
++ /* start new session */
++ setsid();
++ if (ioctl(0, TIOCSCTTY, 1))
++ fprintf(stderr,_("TIOCSCTTY failed"));
+ while (*envp) /* add inherited environment, */
+ addenv (*envp++, NULL); /* some variables change later */
+
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2006-07-14 07:28:17 UTC (rev 1047)
+++ trunk/debian/patches/series 2006-07-14 07:33:33 UTC (rev 1048)
@@ -36,3 +36,4 @@
403_fix_PATH-MAX_hurd
508_nologin_in_usr_sbin
495_salt_stack_smash
+496_login_init_session
More information about the Pkg-shadow-commits
mailing list