Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/sys
Date: Fri, 28 Aug 2026 23:47:09 +0200
From: Roland Illig <roland.illig%gmx.de@localhost>
Message-ID: <d820f720-07b9-421a-87e5-250bdc6cb967%gmx.de@localhost>
| Or is the infix "only" even more ambiguous in that it may refer to
| either its left-hand operand or its right-hand operand?
That could be fixed, if desired, by rewriting the sentence to be
Only the super-user may set or unset the ..... flags.
But a bigger issue in chflags(2), if someone would like to fix it,
is the sentence that follows that one:
These flags may be set at any time, but normally may only be
unset when the system is in single-user mode. (See init(8)
for details.)
So naturally I looked to init(8) to find out under what conditions
the flags may "normally" be only unset in single user mode, and when
they can be unset in some other mode.
No great surprise, init(8) says nothing at all about setting or unsetting
flags on files. The "see init(8)" is really just to discover what
"single-user mode" might mean, I believe, and it isn't really even very
good at that. It is fine for what needs to be in init(8), but not for
someone who has no idea what single user mode might be - anyone who
already knows won't need to bother with init(8) just for that information.
This text could do with expansion to explain just what "normally" means
there - my guess, but I haven't even attempted to confirm it - is that
it means those flags cannot be reset when the securelevel > 0 (but since
a large fraction of NetBSD systems run X, which doesn't work with that,
or didn't last time I wanted to know about it, I'm not sure that
really equates to "normally"). Any Xr to init(8) should say just what
referring to that page would be useful for.
That is most probably for how to get to single user mode to reset one of
these flags, in the event that getting to single user mode to do it is
required. This turns out to be more complicated than perhaps it should
be, as chflags(1) is in /usr/bin which isn't necessarily mounted in
single user mode .. so anyone who is needing assistance with getting to
single user mode, and needs to be referred to init(8) for instructions
(possibly boot(8) & shutdown(8) might help more than init(8)) on how to
do that, is unlikely to be amused when, once they achieve that state,
they try:
chflags noschg /path/to/my-file
only to be told that
sh: chflags: not found
and even when they fix that, once they work out how,
chflags: /path/to/my-file: No such file or directory
because their home directory isn't mounted either.
kre
ps: I agree that the changed text (moved "only") is slightly better
than it was previously.
Home |
Main Index |
Thread Index |
Old Index