Project

General

Profile

Actions

Feature #14861

open

remove compatibility links to programs from /etc

Added by Joshua M. Clulow 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

A small menagerie of compatibility symlinks exists in /etc for programs otherwise delivered in /sbin and /usr/sbin and /usr/lib/saf. There is little historical context I have been able to find about why these are in here, other than a general sense of organic/haphazard construction present in UNIX systems that have survived many decades of engineering effort.

Some relevant historical material from ARC cases and Sun bugs:

While the vast majority of these should be removed, there are at least a few special cases that need more careful consideration:

  • /etc/rmt ostensibly represents part of the remote magnetic tape protocol and likely needs to remain in place
  • /etc/prtconf may have been used by Java for something, but that may also have been fixed a decade ago; see JDK-7022473
  • /etc/telinit probably needs to become /sbin/telinit, but then we probably need to leave it in place for some amount of time as well because it had no /sbin analogue (or perhaps it doesn't matter; it's unclear to me when someone would actually use telinit)

There are likely references within the gate that use these paths which we would have to verify and clean up. It's possible that there are also other special cases that need to remain in place that don't appear in the list above. Delete, but with care!

Actions #1

Updated by Garrett D'Amore 2 months ago

Yes, /etc/rmt is used by legacy remote tape protocol, which is actually "rsh" style based. I suspect nobody uses it, as it's horribly insecure, but I recall deciding to leave it in place while at PSARC. Note that /etc/tar might fall into this category as well.

Once, very very long ago, there was no /sbin, or /usr/sbin... and instead people would put administrator programs in /etc, and /etc was commonly in sysadmin paths. This goes back to SunOS versions based on BSD. (SunOS 4 and earlier).

I think it's time to clean this up (and it was probably time two decades ago).

Actions #2

Updated by Garrett D'Amore 2 months ago

telinit maybe can become /usr/sbin or just /sbin. Or just retire it, as you can get the same functionality with just plain old init -- the idea here is to command init to change run-levels.

Actions #3

Updated by Peter Tribble 2 months ago

I tried to remove all the legacy /etc symlinks in Tribblix, and only got a small handful removed

etc/ff
etc/ncheck
etc/volcopy
etc/wall
etc/setmnt
etc/dcopy
etc/clri
etc/whodo
etc/sysdef
etc/fsdb
etc/prtconf
etc/prtvtoc
etc/fmthard
etc/format

although some of those were because the target itself is removed.

What I did find was that it's actually quite a lot of effort to conclusively prove that there's nothing out there that might still be using or referencing the legacy symlinks. Even within the gate:

umount is referenced in volmgt
telinit is documented in init.8
sulogin is used by init
mount is referenced by svr4pkg
labelit is used by getvol
grpck is documented as being in /etc

It soon became clear that for a general-purpose distro with a strong focus on legacy compatibility, the effort required to prove that any symlink was safe to remove in all circumstances vastly outweighed any benefit from its removal. Other distributions may legitimately decide that's not an interesting requirement.

Actions

Also available in: Atom PDF