Skip to content

Commit

Permalink
builddeb: Fix rootless build in setuid/setgid directory
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Sven Joachim <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
zwenna authored and masahir0y committed Nov 2, 2020
1 parent d9b5665 commit d188958
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/package/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ create_package() {
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"

# Create the package
dpkg-gencontrol -p$pname -P"$pdir"
Expand Down

0 comments on commit d188958

Please sign in to comment.