[Bug 15186] New: Allow permissions to be preserved when running as non-root

bugzilla at busybox.net bugzilla at busybox.net
Sat Dec 17 22:10:47 UTC 2022


https://bugs.busybox.net/show_bug.cgi?id=15186

            Bug ID: 15186
           Summary: Allow permissions to be preserved when running as
                    non-root
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: taaparthur at disroot.org
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Created attachment 9421
  --> https://bugs.busybox.net/attachment.cgi?id=9421&action=edit
Patch to allow permissions to be preserved as non-root

Previously we explicitly checked our uid and if it wasn't 0, set
ARCHIVE_DONT_RESTORE_PERM flag. There wasn't a lot of info in the commit
message and this seems like a bug. 

This commit effectively reverts ebad0294c9 and adds a test.

For my usecase, I built and tar-ed a package and wanted to untar it into a
chroot as a non-root user. busybox tar removed the setuid bit so programs like
`su` broke.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list