Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45425 - incorrect directory creation on startup script
Summary: incorrect directory creation on startup script
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-22 12:23 UTC by roma1390
Modified: 2004-04-25 13:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roma1390 2004-03-22 12:23:01 UTC
/etc/init.d/sshd check that /var/empty exist, and tryes to create this on.

problem:
1. perfomance
  - every startup does unnecesary step
2. package system
  - this directory doesn't belong to sshd, and after sshd "uninstall" this directory will be left on disk. Garbage.

ssh version: openssh-3.7.1_p2-r2

Reproducible: Always
Steps to Reproduce:
Comment 1 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-30 05:32:28 UTC
1. I feel that by adding the additional check at the startup we'll ensure that the ssh server really starts and not just chokes on not finding /var/empty.
2. Since openssh is part of system the dir will always be there.
Comment 2 roma1390 2004-04-01 19:25:18 UTC
Why it is only /var/empty checked? May be sshd is deleted?
or it's md5sum doesn't mach. Or maybe incorect settings on sshd_config?
or maybe this is winCE os and here gentoo startup script doens't work? Why thease
things arn't checked?

openssh isn't part of the system, it's normal package like kde, xpaint and glibc.
for me epm shows:
bash-2.05b$ epm -qf /var/empty/
openssh-3.7.1_p2-r2
bash-2.05b$ epm -ql openssh | grep empty
/var/empty/.keep

this means. That /var/empty is part of opensshd package. If it is a part of
opensshd package, then there is no reason to check && create this directory on startup.
Comment 3 Daniel Ahlberg (RETIRED) gentoo-dev 2004-04-25 13:46:34 UTC
There have been many bugreports (4545, 35360, 37977, 42936) about /var/empty being removed after an openssh upgrade. I have no idea why this is happening and many measures has been taken to make sure that /var/empty is kept. Since openssh is such an important package that if it would fail remote access would be hard if not impossible I decided to add a simple check in the beginning of the initscript to make sure that sshd would start normally. If you don't like it feel free to remove those three lines from the initscripts.

OpenSSH is part of the system, this is specified in /etc/make.profile/packages.