Skip to content

os/v3/puppy: the pre-pack chown strips every setuid bit, so the D-Bus launch helper, passwd and su cannot work #956

Closed

Description

@bong-water-water-bong

The c20 board reported (second cycle running): Activated service 'org.freedesktop.login1' failed: The permission of the setuid helper is not correct, same line for org.freedesktop.hostname1 and fi.w1.wpa_supplicant1. pi-release scanned for setuid bits and suggested looking at /usr/lib/dbus-1.0 staging. The cause is not staging, and it is our own build patch.

Measured, both sides of the pack:

tree setuid/setgid entries
built sandbox3/rootfs-complete 12 — dbus-daemon-launch-helper, passwd, chsh, chfn, gpasswd, sudo.ws, ssh-keysign, su-FULL, mount-FULL, umount-FULL, fusermount3, ntfs-3g
packed puppy_upup64r_26.04.sfs (the c20 image) 0

unsquashfs -ll on the shipped sfs prints -rwxr-xr-x for dbus-daemon-launch-helper and for passwd; there is not one s in a mode bit anywhere in the image.

Cause. os/v3/puppy/container-build.sh patches woof-CE's 3builddistro to run chown -R 0:0 rootfs-complete immediately before mksquashfs — the cycle-16 fix for the frugalpup docs that arrived owned by uid 6975. POSIX says chown() clears S_ISUID/S_ISGID on every file it touches, and chown -R touches all of them. So the ownership fix silently disarmed every setuid helper in the image, and the two facts were never connected: nothing in the boot path needs those helpers, so the image boots and serves fine and only D-Bus activation, passwd and su notice.

Effect on the appliance: no login1/hostname1/wpa_supplicant activation (the board's three error lines), no password change, no working su, no sudo setuid path, no ssh-keysign host-based auth, no fusermount3/ntfs-3g mounts for a non-root user.

Fix: /recipe/fix-ownership.sh records every setuid/setgid entry, chowns, restores the modes, and refuses a tree whose count changed; 3builddistro calls it instead of the bare chown -R. And container-build.sh asserts it on the packed sfs — a helper that lost its bit still looks present, so the tree is the wrong place to look.

Activity

  1. added a commit that references this issue on Nov 4, 2026
    cfb7dfe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions