FS#15668 - [openntpd] 3.9p1-7 uninstall removes /var/empty
Attached to Project:
Community Packages
Opened by Kleborp (kleborp) - Friday, 24 July 2009, 14:22 GMT
Last edited by Vesa Kaihlavirta (vegai) - Wednesday, 28 October 2009, 19:51 GMT
Opened by Kleborp (kleborp) - Friday, 24 July 2009, 14:22 GMT
Last edited by Vesa Kaihlavirta (vegai) - Wednesday, 28 October 2009, 19:51 GMT
|
Details
Description:
When uninstalling the openntpd package, /var/empty is removed upon uninstallation. This directory is required by OpenSSH to function correctly, resulting in sshd being unable to restart/start. '/etc/rc.d/sshd start' will fail with "Missing privilege separation directory: /var/empty" The problem is fixed when /var/empty is not empty, so I guess it's an uninstall script that deletes directories used by the package if they are empty. Additional info: * community/openntpd 3.9p1-7 * core/openssh 5.2p1-1 Steps to reproduce: 1. Install openntpd (pacman -Sy openntpd) 2. Uninstall openntpd (pacman -R openntdp) 3. Start sshd (/etc/rc.d/sshd start (or restart)) 4. sshd won't start, fails because /var/empty is gone 5. If the machine is headless, hope that your ssh session doesn't die while you recreate /var/empty ;) |
This task depends upon
The problem is if both packages installs the same dir, and this dir is empty, when removing one of these pkgs, pacman removes the empty dir.
I will ask to the mailing list...
I guess it usually makes sense to remove directories that are empty (and presumed to not be used anymore), but in this case it breaks another package.
I noticed on a gentoo box that I have that they solved it by keeping a file in /var/empty, like tinmrn suggested:
# ls -a /var/empty/
. .. .keep_net-misc_openssh-0
Thanks for reporting this.
http://www.archlinux.org/pipermail/pacman-dev/2009-July/009014.html
@Vesa: I think that openntpd acording to the ML should put a file like /var/empty/.openntpd.pacman or something like this.
Edit: ignore this comment. See below.
man from sshd says:
/var/empty
chroot(2) directory used by sshd during privilege separation in the pre-authentication phase. The directory should not contain any files
and must be owned by root and not group or world-writable.
/var/empty/ is installed by filesystem, so it has no bearing whether this package uses it.
If a directory is named empty, it is empty for good reason. Leave it that way and no hidden files; I covered this in my email.