Mailinglist Archive: opensuse-commit (1774 mails)

< Previous Next >
commit login for openSUSE:Factory

Hello community,

here is the log from the commit of package login for openSUSE:Factory
checked in at Fri Feb 18 13:14:11 CET 2011.



--------
--- login/login.changes 2011-02-01 14:47:33.000000000 +0100
+++ /mounts/work_src_done/STABLE/login/login.changes 2011-02-16
12:21:01.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Feb 16 11:18:25 UTC 2011 - werner@xxxxxxx
+
+- Add signal handler to forward SIGTERM as well as SIGHUP to the
+ login shells (bnc#652633)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
bnc652633.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ login.spec ++++++
--- /var/tmp/diff_new_pack.PMAek1/_old 2011-02-18 13:14:03.000000000 +0100
+++ /var/tmp/diff_new_pack.PMAek1/_new 2011-02-18 13:14:03.000000000 +0100
@@ -25,11 +25,12 @@
Group: System/Base
AutoReqProv: on
Version: 4.0
-Release: 1
+Release: 9
Summary: Login Program
Source: pam_login-%{version}.tar.bz2
Patch: bugzilla-148065.patch
Patch1: pam_login-3.35-pts.patch
+Patch2: bnc652633.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Recommends: %{name}-lang

@@ -41,6 +42,7 @@
%setup -q -n pam_login-%{version}
%patch -p0
%patch1 -p0
+%patch2 -p0

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure

++++++ bnc652633.patch ++++++
--- src/login.c
+++ src/login.c 2011-02-16 11:14:57.407927008 +0000
@@ -454,6 +454,22 @@ logaudit (const char *tty, const char *u
# define logaudit(tty, username, hostname, pwd, status)
#endif /* HAVE_LIBAUDIT */

+static pid_t childPid;
+static volatile sig_atomic_t signaled;
+
+static void
+sig_handler (int sig)
+{
+ if (childPid)
+ {
+ if (sig == SIGTERM)
+ kill(-childPid, SIGHUP);
+ kill(-childPid, sig);
+ }
+ else
+ signaled++;
+}
+
int
main (int argc, char **argv)
{
@@ -470,7 +486,6 @@ main (int argc, char **argv)
int retcode;
pam_handle_t *pamh = NULL;
struct pam_conv conv = { misc_conv, NULL };
- pid_t childPid;
const char *hushfile;
gid_t gid;
char *hostname;
@@ -1236,7 +1251,8 @@ main (int argc, char **argv)
closelog();
signal (SIGHUP, SIG_IGN);
ioctl(0, TIOCNOTTY, NULL);
- signal (SIGHUP, SIG_DFL);
+ signal (SIGHUP, sig_handler);
+ signal (SIGTERM, sig_handler);
#ifdef WITH_DEBUG
debug ("fork child process");
#endif
@@ -1276,6 +1292,13 @@ main (int argc, char **argv)
exit (0);
}
/* child */
+
+ signal (SIGHUP, SIG_DFL);
+ signal (SIGTERM, SIG_DFL);
+
+ if (signaled)
+ exit (1);
+
/* start new session */
setsid();
if (ioctl (0, TIOCSCTTY, (char *) 1) == -1)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread