Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 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:

Description

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:

<ermo@dante>:~/work/OpenWRT/backfire/build_dir/target-armeb_v5te_uClibc-0.9.30.1_eabi/sudo-1.7.2p6
(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 7 years ago by nbd

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

fixed in r22334, r22335

comment:2 Changed 7 years ago by nico

  • Milestone changed from Kamikaze to Backfire 10.03.1

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.