Created attachment 244331 [details] Patch to set expected permissions of /root during "make installworld" According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but "make installworld" changes these to 0755. This is caused by the installation of configuration directories of "csh" and "sh". Small patch to correct this is attached.
Tagged emaste, gbe and cem - as they discussed and implemented review D23392 Imho the patch shouldn't be that static and should take in "BSD.root.dist" for setting the correct permission.
I can confirm that issue on head and releng/14.0 and that the attached patch fixes the issue. I would also recommend an MFC to releng/14.0 for people which are not tracking stable/14.
If anyone is fine with that patch, I would like to commit it, but I would need approval from a src committer. Anyone?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a6ed8c9593031abf6fa73661be55c226caa362d6 commit a6ed8c9593031abf6fa73661be55c226caa362d6 Author: Thomas Eberhardt <sneakywumpus@gmail.com> AuthorDate: 2023-11-16 09:59:38 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2023-11-16 09:59:38 +0000 Fix /root permissions after 'make installworld' According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but the build target 'make installworld' changes these to 0755. This is caused by the installation of the configuration files of sh(1) and csh(1). Correct this by specifying the correct default /root permissions. PR: 273342 Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D42395 bin/csh/Makefile | 1 + bin/sh/Makefile | 1 + 2 files changed, 2 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c9ceff3c1fa6854627427235db4e9c6a7c583965 commit c9ceff3c1fa6854627427235db4e9c6a7c583965 Author: Thomas Eberhardt <sneakywumpus@gmail.com> AuthorDate: 2023-11-16 09:59:38 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2023-12-01 07:15:25 +0000 Fix /root permissions after 'make installworld' According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but the build target 'make installworld' changes these to 0755. This is caused by the installation of the configuration files of sh(1) and csh(1). Correct this by specifying the correct default /root permissions. PR: 273342 Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D42395 (cherry picked from commit a6ed8c9593031abf6fa73661be55c226caa362d6) bin/csh/Makefile | 1 + bin/sh/Makefile | 1 + 2 files changed, 2 insertions(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1023abd5b60f82360ea9f09b9af06dd30d6d8c18 commit 1023abd5b60f82360ea9f09b9af06dd30d6d8c18 Author: Thomas Eberhardt <sneakywumpus@gmail.com> AuthorDate: 2023-11-16 09:59:38 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2023-12-01 07:16:38 +0000 Fix /root permissions after 'make installworld' According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but the build target 'make installworld' changes these to 0755. This is caused by the installation of the configuration files of sh(1) and csh(1). Correct this by specifying the correct default /root permissions. PR: 273342 Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D42395 (cherry picked from commit a6ed8c9593031abf6fa73661be55c226caa362d6) bin/csh/Makefile | 1 + bin/sh/Makefile | 1 + 2 files changed, 2 insertions(+)
Committed to HEAD, stable/13 and stable/14. Thanks for the patch!