Closed alejandro-colomar closed 7 months ago
The weird thing is that I would have suspected that this would be a leftover of some copy&paste from somewhere else, so that I would find a copy somewhere else in the project, but didn't:
$ git checkout 45c6603cc
HEAD is now at 45c6603c [svn-upgrade] Integrating new upstream version, shadow (19990709)
$ grep -rn 'execute .* command to interpret'
src/passwd.c:1000: * -g execute gpasswd command to interpret flags
src/passwd.c:1001: * -f execute chfn command to interpret flags
src/passwd.c:1002: * -s execute chsh command to interpret flags
$ grep -rn -- '-s '
src/passwd.c:1002: * -s execute chsh command to interpret flags
Maybe it has some relation to the -f
comment, but I don't know why it was added.
Anyway, I guess we can safely remove that line.
Oh, and that -f
comment also seems to refer to a non-existent flag. @hallyn , do you know some history that I don't?
And -g
too.
Oh, and that
-f
comment also seems to refer to a non-existent flag. @hallyn , do you know some history that I don't?And
-g
too.
No. Looks like passwd in other OSs had some flags like that. Someone with the old pre-git trees could spelunk if they like. But let's just document what's in the code now.
https://github.com/shadow-maint/shadow/blob/0f4e59fd00cf2c25548c1fb589d8aaf5955d3e8c/src/passwd.c#L685
Link: https://github.com/shadow-maint/shadow/pull/927#discussion_r1466633487 (Cc: @thalman)
The comment dates back to the second commit (shadow 19990709), which adds the file:
But there has never been such an option: