On 07/01/2011 01:52 PM, Lennart Poettering wrote: > On Fri, 01.07.11 13:30, Jeff Licquia ([email protected]) wrote: > >> - "It is valid to implement /var/run as a symlink to /run." True? >> Too bold? Too specific? > > On Fedora /var/run is now a symlink to /run. So it's definitely true... ;-) > >> - /var/run/utmp is explicitly mentioned in FHS 2.3. After looking at >> Fedora 15, I decided it should stay there, since there's no /run/utmp >> there. I figure that having /run/utmp via symlinking /var/run to /run >> is OK, even though not explicitly mentioned, so there should be no >> issues. OTOH, do we want to encourage people to move utmp? > > Hmm? On F15 there is a /run/utmp.
How odd. OTOH, the Fedora system I have has been upgraded; perhaps there are some weird upgrade scenarios where a separate /var/run is kept. It has other issues, too, so maybe it's time to redo it. Do you think there's a strong case to mandate /run/utmp, then? >> - I've added explicit rules forbidding use of both /run and /var/run >> by programs, to prevent confusion. My thought is that a program should >> either use /run or /var/run. Can anyone think of a good reason why a >> program would want to use both? > > Well, for example because they use /run for all its own uses but to > access utmp it uses _PATH_UTMPX, which will most likely still point to > /var/run/utmp. Such a use of both /run and /var/run should definitely be > acceptable. Yes; the specific wording is something like "except as allowed in the section on /var/tmp", which explicitly mentions utmp as one of those exceptions. > Other comments: > > "(removed or truncated as appropriate)" ← what do you mean by > "truncated"? Everything should just go, nothing should be truncated. I believe the truncation reference may be for utmp. At least at one time, the utmp routines weren't guaranteed to create utmp if it didn't exist. > "... should be unwritable for unprivileged users (root or users running > daemons)" ← that's easy to misunderstand? Tweaked. Here's the new wording: "...should not be writable for unprivileged users; it is a major security problem..." > "Process identifier (PID) files, which were originally placed in > <filename>/etc</filename>" ← /etc? Do you mean /var/run? A long, long time ago, these files were written to /etc. You sometimes still see references to things like /etc/named.pid in old docs. I considered expanding that statement to include /var/run, but thought it might be premature, since we're still allowing programs to use /var/run during the transition. > A bit later you then talk of /var/run/crond.pid which should be > /run/crond.pid. Oops! Fixed. > "System programs that maintain transient UNIX-domain sockets must place > them in this directory." ← Or in a subdirectory beneath it. "...or in a subdirectory as outlined above." Added. Thanks for the feedback. -- Jeff Licquia The Linux Foundation +1 (317) 915-7441 [email protected] Linux Foundation Events Schedule: events.linuxfoundation.org Linux Foundation Training Schedule: training.linuxfoundation.org Join us this year in celebrating the 20th Anniversary of Linux! Watch the "Story of Linux" here: http://www.youtube.com/watch?v=5ocq6_3-nEw See all of the 20th Anniversary activities here: http://www.linuxfoundation.org/20th _______________________________________________ fhs-discuss mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/fhs-discuss
