Signed-off-by: Pelle Johnsen <redacted>
#
-# Copyright (C) 2008-2014 OpenWrt.org
+# Copyright (C) 2008-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=shadow
PKG_VERSION:=4.2.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
--- /dev/null
+--- a/src/su.c
++++ b/src/su.c
+@@ -1090,8 +1090,12 @@
+
+ if (fd >= 0) {
+ err = ioctl (fd, TIOCNOTTY, (char *) 0);
++ if (-1 == err && ENOTTY == errno) {
++ /* There are no controlling terminal already */
++ err = 0;
++ }
+ (void) close (fd);
+- } else if (ENXIO == errno) {
++ } else if (ENXIO == errno || EACCES == errno) {
+ /* There are no controlling terminal already */
+ err = 0;
+ }