Skip to content

Commit d188958

Browse files
zwennamasahir0y
authored andcommitted
builddeb: Fix rootless build in setuid/setgid directory
Building 5.10-rc1 in a setgid directory failed with the following error: dpkg-deb: error: control directory has bad permissions 2755 (must be >=0755 and <=0775) When building with fakeroot, the earlier chown call would have removed the setgid bits, but in a rootless build they remain. Fixes: 3e85418 ("builddeb: Enable rootless builds") Cc: Guillem Jover <guillem@hadrons.org> Signed-off-by: Sven Joachim <svenjoac@gmx.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent d9b5665 commit d188958

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/package/builddeb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ create_package() {
4545
chmod -R go-w "$pdir"
4646
# in case we are in a restrictive umask environment like 0077
4747
chmod -R a+rX "$pdir"
48+
# in case we build in a setuid/setgid directory
49+
chmod -R ug-s "$pdir"
4850

4951
# Create the package
5052
dpkg-gencontrol -p$pname -P"$pdir"

0 commit comments

Comments
 (0)