Subject: pkg/18383: OWN_DIRS can cause dirs to be removed when they shouldn't be
To: None <gnats-bugs@gnats.netbsd.org>
From: None <grant@netbsd.org>
List: netbsd-bugs
Date: 09/24/2002 13:15:00
>Number: 18383
>Category: pkg
>Synopsis: OWN_DIRS can cause dirs to be removed when they shouldn't be
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 23 00:15:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: grant beattie
>Release: NetBSD 1.6H
>Organization:
>Environment:
System: NetBSD mofo 1.6H NetBSD 1.6H (MOFO.PROF) #0: Thu Sep 19 00:54:25 EST 2002 grant@mofo:/raid0/netbsd/current/src/sys/arch/i386/compile/MOFO.PROF i386
Architecture: i386
Machine: i386
>Description:
OWN_DIRS can cause empty directories to be removed when they shouldn't
be. This was found while installing security/openssh on a Solaris system
which already had an empty /var/chroot/sshd.
Upon package de-installation the directory was removed, causing the
running sshd to fail because the directory did not exist.
>How-To-Repeat:
Install and then deinstall a package which uses OWN_DIRS set to a
directory which already exists and is empty.
>Fix:
Only register creation of directories if they do not already exist
and on package deinstall, do not attempt to remove a directory which
already existed when the package was installed.
>Release-Note:
>Audit-Trail:
>Unformatted: