Compare commits

...

3 Commits

5 changed files with 58 additions and 0 deletions

16
debian/changelog vendored
View File

@@ -1,3 +1,19 @@
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
with hardening flags as in 1:4.2-2+b1
Thanks to Dr. Markus Waldeck for pointing the issue and Simon Ruderich
For providing a working patch.
-- Christian Perrier <bubulle@debian.org> Wed, 19 Nov 2014 21:59:09 +0100
shadow (1:4.2-2) unstable; urgency=low
* The "Soumaintrain" release

1
debian/control vendored
View File

@@ -5,6 +5,7 @@ Maintainer: Shadow package maintainers <pkg-shadow-devel@lists.alioth.debian.org
Standards-Version: 3.9.5
Uploaders: Christian Perrier <bubulle@debian.org>, Nicolas FRANCOIS (Nekral) <nicolas.francois@centraliens.net>
Build-Depends: dh-autoreconf, gettext, libpam0g-dev, debhelper (>= 6.0.7~), quilt, dpkg-dev (>= 1.13.5), xsltproc, docbook-xsl, docbook-xml, libxml2-utils, cdbs, libselinux1-dev [linux-any], libsemanage1-dev [linux-any], gnome-doc-utils (>= 0.4.3), bison, libaudit-dev [linux-any]
,hardening-wrapper
Vcs-Git: git://anonscm.debian.org/git/pkg-shadow/shadow.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-shadow/shadow.git;a=summary
Homepage: http://pkg-shadow.alioth.debian.org/

View File

@@ -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);

View File

@@ -34,3 +34,4 @@
#userns/16_add-argument-sanity-checking.patch
1000_configure_userns
1010_vietnamese_translation
1020_fix_user_busy_errors

2
debian/rules vendored
View File

@@ -3,6 +3,8 @@
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
export DEB_BUILD_HARDENING=1
# Enable PIE, BINDNOW, and possible future flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all