Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7653 closed defect (fixed)

mksquashfs ignores and discards setuid and setgid bits -- patch available upstream

Reported by: ermo <rune.morling+openwrt@…> Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03
Keywords: squashfs setuid setgid Cc:


I'm building a squashfs image containing sudo and noticed that sudo is not setuid in the squashfs image, which effectively means that it doesn't work as advertised unless I copy it to jffs, which costs me 100+ kb of space.

root@OpenWrt:/usr/sbin# ls -l /rom/usr/bin/sudo
-rwxr-xr-x    1 root     root       114004 Jul 21 10:31 /rom/usr/bin/sudo

A little digging revealed that sudo-the-package installs sudo with its setuid bit set:

(508)$ grep -C 1 'install-binaries: install-dirs' Makefile

install-binaries: install-dirs $(PROGS)
        $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 sudo $(DESTDIR)$(sudodir)/sudo

According to this thread on squashfs-devel it was an oversight or a simple typo. The patch is included in the thread and has been included upstream in pseudo.c since version 1.11

Please consider including this patch in 10.03.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r22334, r22335

comment:2 Changed 8 years ago by nico

  • Milestone changed from Kamikaze to Backfire 10.03.1

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.