summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Blank <bastian.blank@credativ.de>2015-11-18 08:07:09 +0000
committerBalint Reczey <balint@balintreczey.hu>2017-02-24 00:16:58 +0100
commita784e094c4827412389e414e70ff12daa184246e (patch)
treeffa621b998c4e6dc59ccf6d09b1953111b9816e2
parent1f9119ef49a1bc5707340d0b9e98e0c40582d73f (diff)
downloadshadow-a784e094c4827412389e414e70ff12daa184246e.tar.gz
Imported Debian patch 1:4.2-3+deb8u1debian/1%4.2-3+deb8u1
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/1020_fix_user_busy_errors38
-rw-r--r--debian/patches/series1
3 files changed, 46 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 9b85842c..5b0c13ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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> Wed, 18 Nov 2015 08:07:09 +0000
+
shadow (1:4.2-3) unstable; urgency=low
* Enforce hardened builds to workaround cdbs sometimes not building
diff --git a/debian/patches/1020_fix_user_busy_errors b/debian/patches/1020_fix_user_busy_errors
new file mode 100644
index 00000000..2a141cad
--- /dev/null
+++ b/debian/patches/1020_fix_user_busy_errors
@@ -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 --git a/debian/patches/series b/debian/patches/series
index 9be43fcc..44a06f30 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -34,3 +34,4 @@
#userns/16_add-argument-sanity-checking.patch
1000_configure_userns
1010_vietnamese_translation
+1020_fix_user_busy_errors