Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 45425

Summary: incorrect directory creation on startup script
Product: Gentoo Linux Reporter: roma1390
Component: New packagesAssignee: Daniel Ahlberg (RETIRED) <aliz>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://bugs.gentoo.org/show_bug.cgi?id=42936
Whiteboard:
Package list:
Runtime testing required: ---

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.