FS#16886 - [openssh] sshd daemon does not start after openntpd update
Attached to Project:
Arch Linux
Opened by (N/A) (wantilles) - Wednesday, 28 October 2009, 17:14 GMT
Last edited by Dan Griffiths (Ghost1227) - Saturday, 27 February 2010, 01:49 GMT
Opened by (N/A) (wantilles) - Wednesday, 28 October 2009, 17:14 GMT
Last edited by Dan Griffiths (Ghost1227) - Saturday, 27 February 2010, 01:49 GMT
|
Details
Description:
sshd daemon does not start after openntpd update. Additional info: * package version(s) openntpd 3.9p1-8 Steps to reproduce: 1. Update openntpd to the above mentioned version. 2. Stop the sshd daemon by issuing: /etc/rc.d/sshd stop 3. Attempt to start again the sshd daemon: /etc/rc.d/sshd stop It will fail: :: Starting Secure Shell Daemon [BUSY] Missing privilege separation directory: /var/empty [FAIL] If you make the directory by hand: mkdir /var/empty The daemon will start. Apparently it has to do with the following line at the post_install section of the .install file of the openntpd package: /usr/sbin/useradd -g ntp -u 87 -d /var/empty -s /bin/false -c 'Network Time Protocol' ntp This bug is serious. Because a remote machine, accessible only via ssh, at the next reboot, it will become inaccessible, with no warning. As it happened here in this thread: http://bbs.archlinux.org/viewtopic.php?id=83425 |
This task depends upon
Closed by Dan Griffiths (Ghost1227)
Saturday, 27 February 2010, 01:49 GMT
Reason for closing: Fixed
Additional comments about closing: /var/empty is now included in the filesystem package
Saturday, 27 February 2010, 01:49 GMT
Reason for closing: Fixed
Additional comments about closing: /var/empty is now included in the filesystem package
I would recommend to move this directory to the filesystem package and remove them from the openssh package just like it was done with the openntp package. To make sure the directory exists, a check should be added to the post_install/post_upgrade of the packages that require this directory.
FS#15668- [openntpd] 3.9p1-7 uninstall removes /var/emptyThis directory has to be included in the "filesystem" package.
If openssh require /var/empty to exist but dont create any files in it i think the package should add a dummy file in /var/empty to make sure the directory is not removed.
But if possible i think it would be a better solution to make pacman do not remove empty directories if they belong to a package.
This was the only case with openssh. One posibility is create (if not exist) the "privilege separation directory" at rc.d/sshd.
Is it really that expensive in pacman to check if an empty dir can be removed ? Maybe its worth that extra time to avoid problems like this in the future.
But for the time being a banaid in the startup script will help, too.
However - as the /var/empty directory is that critical for sshd to work, it is generally a very good idea to create it in the init script. Package is in testing, see http://repos.archlinux.org/wsvn/packages/?compare[]=%2Fopenssh%2Ftrunk%2F%4056859&compare[]=%2Fopenssh%2Ftrunk%2F%4054385&op=comp
Thanks for your attention.
Another package can still remove /var/empty, e.g. :
- login to server via ssh
- maintain packages => /var/empty can be deleted
- logout => you can no longer login again
A better fix is needed.
I would prefer to have pacman do not remove empty directories owned by other packages, this should be a safe generic solution.
touch $pkgdir/var/empty/.keep.openssh
should do the trick. Opinions?
Who has privileges to do that?
Can this be closed now?