From: Sven Joachim <svenjoac@gmx.de>
To: linux-kbuild@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>
Cc: linux-kernel@vger.kernel.org, Sven Joachim <svenjoac@gmx.de>
Subject: [PATCH] builddeb: Consolidate consecutive chmod calls into one
Date: Thu, 29 Oct 2020 16:39:10 +0100 [thread overview]
Message-ID: <20201029153910.7502-1-svenjoac@gmx.de> (raw)
In-Reply-To: <CAK7LNARFVy_2y883jig2_QrwTyGe=Xmu91z8LWuZuCeruWXa6A@mail.gmail.com>
No need to call chmod three times when it can do everything at once.
Signed-off-by: Sven Joachim <svenjoac@gmx.de>
---
scripts/package/builddeb | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 91a502bb97e8..6a100c449579 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -42,11 +42,9 @@ create_package() {
else
chown -R root:root "$pdir"
fi
- chmod -R go-w "$pdir"
- # in case we are in a restrictive umask environment like 0077
- chmod -R a+rX "$pdir"
- # in case we build in a setuid/setgid directory
- chmod -R ug-s "$pdir"
+ # a+rX in case we are in a restrictive umask environment like 0077
+ # ug-s in case we build in a setuid/setgid directory
+ chmod -R go-w,a+rX,ug-s "$pdir"
# Create the package
dpkg-gencontrol -p$pname -P"$pdir"
--
2.29.1
next prev parent reply other threads:[~2020-10-29 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 19:32 [PATCH 1/2] builddeb: Fix rootless build in setuid/setgid directory Sven Joachim
2020-10-26 19:32 ` [PATCH 2/2] builddeb: Consolidate consecutive chmod calls into one Sven Joachim
2020-10-28 6:52 ` Masahiro Yamada
2020-10-29 15:39 ` Sven Joachim [this message]
2020-10-28 6:00 ` [PATCH 1/2] builddeb: Fix rootless build in setuid/setgid directory Masahiro Yamada
2020-10-28 18:30 ` Sven Joachim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201029153910.7502-1-svenjoac@gmx.de \
--to=svenjoac@gmx.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).