Date: Fri, 13 Aug 1999 14:15:15 -0700 (PDT) From: Cy.Schubert@uumail.gov.bc.ca To: FreeBSD-gnats-submit@freebsd.org Subject: bin/13128: pkg_delete doesn't handle absolute pathnames correctly Message-ID: <199908132115.OAA38826@cwsys.cwsent.com>
next in thread | raw e-mail | index | archive | help
>Number: 13128 >Category: bin >Synopsis: pkg_delete doesn't handle absolute pathnames correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 13 16:40:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Cy Schubert >Release: FreeBSD 3.2-RELEASE i386 >Organization: ITSD, Provice of British Columbia >Environment: FreeBSD cwsys 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Wed Aug 11 17:35:40 PDT 1999 root@cwsys:/opt2/cvs-320/src/sys/compile/CWSYS i386 >Description: If /var/db/pkg/<package name>/+CONTENTS contains absolute pathnames, files are not deleted. >How-To-Repeat: Build a package using make MANPREFIX=/usr/local/somewhere install, then pkg_delete the package. The man files are not deleted because /usr/local//usr/local/somewhere/man/... cannot be found. >Fix: --- src/usr.sbin/pkg_install/lib/plist.c.orig Fri Sep 11 00:26:58 1998 +++ src/usr.sbin/pkg_install/lib/plist.c Fri Aug 13 14:05:43 1999 @@ -389,7 +389,10 @@ case PLIST_FILE: last_file = p->name; - sprintf(tmp, "%s/%s", Where, p->name); + if (*p->name == '/') + strcpy(tmp, p->name); + else + sprintf(tmp, "%s/%s", Where, p->name); if (isdir(tmp) && fexists(tmp)) { warnx("cannot delete specified file `%s' - it is a directory!\n" "this packing list is incorrect - ignoring delete request", tmp); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908132115.OAA38826>