From patchwork Tue Nov 14 12:14:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 837830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YGIkfAXj"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EkEo0YU8"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybmgH6kJfz9rxm for ; Tue, 14 Nov 2017 23:15:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hMTS4vDRdx2+DumipwDlH+YiLsmzZTTHyLpNxd2xHos=; b=YGIkfAXjNOIQbW Mtn1dPyGDE69B2DjrlkBdh4iKZCWxTGQlKKoz7ot6O8rq7kfYnq3Hbkuba7vRBZ8ZHtlBKLyR+q8k LAswnRgpocqqw7ZztnaSAcY+MZZ9EHdH9BhyIJiC0mxDkpiFH7JUHZZ30fBuvQ8RJxUzvn31vWh5A 2u1AeEI4Csf1X05Sughc77A7Q3QZSnYeSJafUd9STV0eJ4XLX5amg96KCDBB2Gf3rgw0ovo3FDaT1 maDUWCo19wCczISgPAIwIP7XESsbw2RRu3U23XOmzRxWEKhRozL+tkLE6LBi3YB+fu1tX0VJIkAX8 NGxnP680CAiE0cBRd7UA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eEa7l-0003hJ-AA; Tue, 14 Nov 2017 12:15:29 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEa7M-0002Vo-6d for lede-dev@lists.infradead.org; Tue, 14 Nov 2017 12:15:08 +0000 Received: by mail-lf0-x244.google.com with SMTP id a132so22042947lfa.7 for ; Tue, 14 Nov 2017 04:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tc7G8StjQDjl6ME/vT3LBd5/4/J3XeXvYuL4S0zmfM0=; b=EkEo0YU8kK35wwr3LKxXKOK2dzGqnmw8OsNgsybdI7N8rNSALyfW/mWupVMav8hGs3 qsIdCTR3jYY5fYBsPFVKedUIrfbF2to/QqQnYV5j6p/4TJb/12HqfRC1vUlqndPWgl1u bDvANb+wOMjbyLwG5qpyITEt/UQ4mMWVzw5TVqkzmDCahDccPxWltwodoguEhzFKVmib CoPS+Glg3Yco02LQMgL9Wvv+5HIiGd7XIt28+1ZkBWoDGBiVaNn+UzIjL+WswFPuyBEM T//F4vjr1BFrHtTYFAmoe6ghLZ0Wp8AhWGITdXGTpNYqIRAdwb0LUXsKXQBYhz4h6ZdX pe0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tc7G8StjQDjl6ME/vT3LBd5/4/J3XeXvYuL4S0zmfM0=; b=PDyWQIRvnQdxxWzmhj5E3KmidqY6mpVslGgKt3/kaKB63Qwg/UNvjT2MQEbydDrwu6 wbO6qifBwCGZPOGNddz+M3IWOi6N0+hw+uKdKk21NsaEkGuiHoAvUEz33GeYUTyzh0WS Cje1eZqPJxv5wllgbQb2lW6+xjNJ7NM5HWj/mAWs81cQs2p0xMXWiOt0eYbTJJTO63fh RMgIhk2x0mAw1DdP+QXvDOrNRmp/KfrOwJ0QCueXYhNA8YDWTdp0WmsSk2KcUSZ6hliV 9iKbovpv80HlaHj0K8hJnkow+zMb2GwRW1LDT27b5r/9PpWJu11+hTm/XAoIl6LNXT7n UYWg== X-Gm-Message-State: AJaThX7GWLzLQZ5tO1L+fA2mkODURIx7PlnyFDjPP7S/Yom8zvoSscJO p8hhw3vycBzVTUKiSc559LI= X-Google-Smtp-Source: AGs4zMbBeVR2UeMX6TeNpYsFVw1c7gSsEBpPnsGWVUiIKkL9FG+BNBJR9LXkGNjGPq0WEDbNsHTDww== X-Received: by 10.46.23.85 with SMTP id l82mr4558141lje.178.1510661682092; Tue, 14 Nov 2017 04:14:42 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id k68sm3721278lje.8.2017.11.14.04.14.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2017 04:14:41 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: openwrt-devel@lists.openwrt.org, lede-dev@lists.infradead.org Date: Tue, 14 Nov 2017 13:14:24 +0100 Message-Id: <20171114121425.22676-1-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171114_041504_460596_CE7FDC45 X-CRM114-Status: GOOD ( 15.88 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4010:c07:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 2.0 LONGWORDS Long string of long words Subject: [LEDE-DEV] [PATCH packages 1/2] shadow: use proper fix for checking subordinate IDs support X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luka Perkov , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Steven Barth Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Rafał Miłecki During 4.2.1 version update support for subordinate IDs has been disabled. It was handled by: 1) Adding --disable-subordinate-ids to avoid: configure: error: cannot run test program while cross compiling 2) Adding patch 003-fix-disabling-subids.patch to avoid: usermod.c: In function 'process_flags': usermod.c:1364:10: error: 'vflg' undeclared (first use in this function) if ( (vflg || Vflg) ^ This commit adds a patch with a proper configure.in fix. We don't need to disable subordinate IDs anymore. Signed-off-by: Rafał Miłecki --- utils/shadow/Makefile | 5 ++-- ...-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch | 35 ++++++++++++++++++++++ .../shadow/patches/003-fix-disabling-subids.patch | 32 -------------------- .../patches/004-fix-su-controoling-term.patch | 2 +- 4 files changed, 38 insertions(+), 36 deletions(-) create mode 100644 utils/shadow/patches/003-Check-size-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch delete mode 100644 utils/shadow/patches/003-fix-disabling-subids.patch diff --git a/utils/shadow/Makefile b/utils/shadow/Makefile index db9f7fb6..2cefe8b0 100644 --- a/utils/shadow/Makefile +++ b/utils/shadow/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shadow PKG_VERSION:=4.2.1 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases @@ -37,8 +37,7 @@ CONFIGURE_ARGS += \ --without-acl \ --without-attr \ --without-tcb \ - --without-nscd \ - --disable-subordinate-ids \ + --without-nscd define Package/shadow/Default SECTION:=utils diff --git a/utils/shadow/patches/003-Check-size-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch b/utils/shadow/patches/003-Check-size-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch new file mode 100644 index 00000000..046523df --- /dev/null +++ b/utils/shadow/patches/003-Check-size-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch @@ -0,0 +1,35 @@ +From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 23 Aug 2014 09:46:39 +0100 +Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF + +This built-in check is simpler than the previous method and, most +importantly, works when cross-compiling. + +Signed-off-by: Serge Hallyn +--- + configure.in | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +--- a/configure.in ++++ b/configure.in +@@ -334,16 +334,10 @@ if test "$enable_subids" != "no"; then + dnl + dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc + dnl +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +-#include +-int main(void) { +- uid_t u; +- gid_t g; +- return (sizeof u < 4) || (sizeof g < 4); +-} +- ])], [id32bit="yes"], [id32bit="no"]) ++ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"]) ++ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"]) + +- if test "x$id32bit" = "xyes"; then ++ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then + AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.]) + enable_subids="yes" + else diff --git a/utils/shadow/patches/003-fix-disabling-subids.patch b/utils/shadow/patches/003-fix-disabling-subids.patch deleted file mode 100644 index bbc65c7d..00000000 --- a/utils/shadow/patches/003-fix-disabling-subids.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -1361,6 +1361,7 @@ static void process_flags (int argc, cha - exit (E_UID_IN_USE); - } - -+#ifdef ENABLE_SUBIDS - if ( (vflg || Vflg) - && !is_sub_uid) { - fprintf (stderr, -@@ -1376,6 +1377,7 @@ static void process_flags (int argc, cha - Prog, sub_gid_dbname (), "-w", "-W"); - exit (E_USAGE); - } -+#endif - } - - /* ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -52,7 +52,10 @@ usbin_PROGRAMS = \ - noinst_PROGRAMS = id sulogin - - suidbins = su --suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap -+suidubins = chage chfn chsh expiry gpasswd newgrp passwd -+if ENABLE_SUBIDS -+ suidubins += newuidmap newgidmap -+endif - if ACCT_TOOLS_SETUID - suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod - endif diff --git a/utils/shadow/patches/004-fix-su-controoling-term.patch b/utils/shadow/patches/004-fix-su-controoling-term.patch index 4c130c73..2f7a670b 100644 --- a/utils/shadow/patches/004-fix-su-controoling-term.patch +++ b/utils/shadow/patches/004-fix-su-controoling-term.patch @@ -1,6 +1,6 @@ --- a/src/su.c +++ b/src/su.c -@@ -1090,8 +1090,12 @@ +@@ -1090,8 +1090,12 @@ int main (int argc, char **argv) if (fd >= 0) { err = ioctl (fd, TIOCNOTTY, (char *) 0);