[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#805383: jessie-pu: package shadow/1:4.2-3+deb8u1



Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

deluser -f does not really force the removal of users, as it contains
missing cleanups in error paths.  This problem is fixed in Stretch with
1:4.2-3.1.

diff -Nru shadow-4.2/debian/changelog shadow-4.2/debian/changelog
--- shadow-4.2/debian/changelog	2014-11-19 20:59:09.000000000 +0000
+++ shadow-4.2/debian/changelog	2015-11-17 15:23:03.000000000 +0000
@@ -1,3 +1,10 @@
+shadow (1:4.2-3+deb8u1) jessie; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix error handling in busy user detection. (Closes: #778287)
+
+ -- Bastian Blank <bastian.blank@credativ.de>  Thu, 12 Nov 2015 14:33:33 +0000
+
 shadow (1:4.2-3) unstable; urgency=low
 
   * Enforce hardened builds to workaround cdbs sometimes not building
diff -Nru shadow-4.2/debian/patches/1020_fix_user_busy_errors shadow-4.2/debian/patches/1020_fix_user_busy_errors
--- shadow-4.2/debian/patches/1020_fix_user_busy_errors	1970-01-01 00:00:00.000000000 +0000
+++ shadow-4.2/debian/patches/1020_fix_user_busy_errors	2015-11-17 15:20:08.000000000 +0000
@@ -0,0 +1,38 @@
+Description: Fix user_busy to not leave subuid open in case of error.
+Author: William Grant <wgrant@ubuntu.com>
+Bug: https://bugs.launchpad.net/ubuntu/vivid/+source/shadow/+bug/1436937
+
+Index: shadow-4.2/libmisc/user_busy.c
+===================================================================
+--- shadow-4.2.orig/libmisc/user_busy.c
++++ shadow-4.2/libmisc/user_busy.c
+@@ -175,6 +175,9 @@ static int user_busy_processes (const ch
+ 	if (stat ("/", &sbroot) != 0) {
+ 		perror ("stat (\"/\")");
+ 		(void) closedir (proc);
++#ifdef ENABLE_SUBIDS
++		sub_uid_close();
++#endif				/* ENABLE_SUBIDS */
+ 		return 0;
+ 	}
+ 
+@@ -212,6 +215,9 @@ static int user_busy_processes (const ch
+ 
+ 		if (check_status (name, tmp_d_name, uid) != 0) {
+ 			(void) closedir (proc);
++#ifdef ENABLE_SUBIDS
++			sub_uid_close();
++#endif				/* ENABLE_SUBIDS */
+ 			fprintf (stderr,
+ 			         _("%s: user %s is currently used by process %d\n"),
+ 			         Prog, name, pid);
+@@ -232,6 +238,9 @@ static int user_busy_processes (const ch
+ 				}
+ 				if (check_status (name, task_path+6, uid) != 0) {
+ 					(void) closedir (proc);
++#ifdef ENABLE_SUBIDS
++					sub_uid_close();
++#endif				/* ENABLE_SUBIDS */
+ 					fprintf (stderr,
+ 					         _("%s: user %s is currently used by process %d\n"),
+ 					         Prog, name, pid);
diff -Nru shadow-4.2/debian/patches/series shadow-4.2/debian/patches/series
--- shadow-4.2/debian/patches/series	2014-11-19 20:48:40.000000000 +0000
+++ shadow-4.2/debian/patches/series	2015-11-17 15:20:08.000000000 +0000
@@ -34,3 +34,4 @@
 #userns/16_add-argument-sanity-checking.patch
 1000_configure_userns
 1010_vietnamese_translation
+1020_fix_user_busy_errors

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


Reply to: