Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/root /root: Install .cshrc and .profile links with the s...
details: https://anonhg.NetBSD.org/src/rev/e947eca246e5
branches: trunk
changeset: 369756:e947eca246e5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Aug 30 13:14:48 2022 +0000
description:
/root: Install .cshrc and .profile links with the same mode.
Previously we would:
1. Install /root/.cshrc and /root/.profile with mode FILESMODE=644 as
requested in src/etc/root/Makefile and as echoed in
/etc/mtree/special.
2. Create hard links at /.cshrc and /.profile through CONFIGLINKS.
3. Because LINKSMODE was unset and defaults to NOBINMODE=444, change
the mode to 444.
This scenario is confusing, and mtree objects to it, which is bad for
warning fatigue in a security-relevant mechanism. (There are also
several other files mtree objects to out of the box -- we should fix
those too.)
With this change we install the links with the same mode as the
original files, in agreement with the mtree. The files, .cshrc and
.profile, are intended to be editable configuration files, so 644
makes sense while 444 makes no sense and gets in the way of editors
like vi.
Discussed on tech-userlevel:
https://mail-index.netbsd.org/tech-userlevel/2022/08/29/msg013498.html
XXX pullup-8
XXX pullup-9
diffstat:
etc/root/Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 694734ee50cb -r e947eca246e5 etc/root/Makefile
--- a/etc/root/Makefile Tue Aug 30 11:45:28 2022 +0000
+++ b/etc/root/Makefile Tue Aug 30 13:14:48 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2012/11/17 23:08:38 uwe Exp $
+# $NetBSD: Makefile,v 1.5 2022/08/30 13:14:48 riastradh Exp $
CONFIGFILES= dot.cshrc dot.klogin dot.login dot.profile dot.shrc
@@ -12,5 +12,7 @@
CONFIGLINKS= /root/.cshrc /.cshrc \
/root/.profile /.profile
+LINKSMODE= ${FILESMODE}
+
.include <bsd.files.mk>
.include <bsd.links.mk>
Home |
Main Index |
Thread Index |
Old Index