Bug 274938 - executables in ZFS VM images have permission issues
Summary: executables in ZFS VM images have permission issues
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks: 14.0r
  Show dependency treegraph
 
Reported: 2023-11-06 13:46 UTC by Mark Johnston
Modified: 2023-11-09 16:30 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Johnston freebsd_committer freebsd_triage 2023-11-06 13:46:18 UTC
I haven't confirmed that this is specific to ZFS VM images, but I'm fairly sure it is:

markj@freebsd:~ $ whoami
markj
markj@freebsd:~ $ groups
markj
markj@freebsd:~ $ ls -la /sbin/shutdown
-r-sr-xr--  2 root operator 15968 Sep 21 07:47 /sbin/shutdown
markj@freebsd:~ $ shutdown -p now
Shutdown NOW!
shutdown: [pid 800]
markj@freebsd:~ $                                                                                
*** FINAL System shutdown message from markj@freebsd ***                     

System going down IMMEDIATELY
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2023-11-06 14:12:28 UTC
To be clear, this is very likely a makefs -t zfs bug, not a ZFS bug.  Read and write permission types appear to be honoured.
Comment 2 Mike Karels freebsd_committer freebsd_triage 2023-11-06 21:29:31 UTC
I tested this on an amd64 system installed by bsdinstall from iso.  It does not have the problem, so it must be makefs.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-11-08 12:32:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=50565cf514d32ee02a24f420551c7e65631b0716

commit 50565cf514d32ee02a24f420551c7e65631b0716
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-11-08 12:00:43 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-08 12:04:12 +0000

    makefs/zfs: Don't set ZFS_NO_EXECS_DENIED in file flags

    This flag was leftover from testing and should have been removed.

    PR:             274938
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation

 usr.sbin/makefs/zfs/fs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-11-09 14:42:14 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a8043cc0d49bec7bebc4afc43b8bf5f6ab730b23

commit a8043cc0d49bec7bebc4afc43b8bf5f6ab730b23
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-11-08 12:00:43 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-09 14:41:09 +0000

    makefs/zfs: Don't set ZFS_NO_EXECS_DENIED in file flags

    This flag was leftover from testing and should have been removed.

    PR:             274938
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 50565cf514d32ee02a24f420551c7e65631b0716)

 usr.sbin/makefs/zfs/fs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2023-11-09 14:43:44 UTC
I will merge to releng/14.0 later today.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-11-09 16:30:29 UTC
A commit in branch releng/14.0 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac3db6ea0e968338bbe68c0d89505242b246d66f

commit ac3db6ea0e968338bbe68c0d89505242b246d66f
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-11-08 12:00:43 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-09 16:26:33 +0000

    makefs/zfs: Don't set ZFS_NO_EXECS_DENIED in file flags

    This flag was leftover from testing and should have been removed.

    Approved by:    re (cperciva)
    PR:             274938
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 50565cf514d32ee02a24f420551c7e65631b0716)
    (cherry picked from commit a8043cc0d49bec7bebc4afc43b8bf5f6ab730b23)

 usr.sbin/makefs/zfs/fs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)