From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 28 16:49:19 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A4E11065676 for ; Mon, 28 Jul 2008 16:49:19 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 3378E8FC1B for ; Mon, 28 Jul 2008 16:49:19 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1303031ywe.13 for ; Mon, 28 Jul 2008 09:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=2RHHkQESsZLb0VQjOqueoUpC/ilh6SQEllK/wTewRsE=; b=tM91KgohdzvunHIemhHHAea6nujfgkRsDJRkR7nimlGX4iULWQkwk3vhJUcM2vwspv swEICYKBXWe4rY5pi8+sPSOj8rpaIrmenD3aoUoGcW7ywxvPa+DUmaAbxTHAqUOpjY02 4L34NIhytaK1b7DhU67+Z/eXO6sjnznDQwkoY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=r0Dhwb8oWhxIb9dn03iQBSbZBScG6+YAG8+qlORWGndV1nh7Yrt3gf61UU9VPeoxDO Xj/log9Y5t6CSJZwayoqqgzi6ooZQENPG0VUCp5hLYMb58GDJBGBGhv/dWstc6mwLrp+ 0e9l8/0AS4fHgeWK8iepc/8yFaEg6N8QZ6I80= Received: by 10.114.133.1 with SMTP id g1mr5246307wad.123.1217263757491; Mon, 28 Jul 2008 09:49:17 -0700 (PDT) Received: from ?192.168.10.42? ( [99.147.150.179]) by mx.google.com with ESMTPS id m31sm18603035wag.21.2008.07.28.09.49.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 28 Jul 2008 09:49:16 -0700 (PDT) Message-Id: From: Garrett Cooper To: Garrett Cooper In-Reply-To: <200807241820.m6OIK7Gi065475@freefall.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Mon, 28 Jul 2008 09:50:30 -0700 References: <200807241820.m6OIK7Gi065475@freefall.freebsd.org> X-Mailer: Apple Mail (2.926) Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/125932: pkg_add(1) doesn't prompt for root credentials and then fails badly X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2008 16:49:19 -0000 On Jul 24, 2008, at 11:20 AM, Garrett Cooper wrote: > The following reply was made to PR bin/125932; it has been noted by > GNATS. > > From: "Garrett Cooper" > To: "Bruce Cran" > Cc: freebsd-gnats-submit@freebsd.org > Subject: Re: bin/125932: pkg_add(1) doesn't prompt for root > credentials and then fails badly > Date: Thu, 24 Jul 2008 11:18:31 -0700 > > On Thu, Jul 24, 2008 at 6:48 AM, Bruce Cran wrote: >> >>> Number: 125932 >>> Category: bin >>> Synopsis: pkg_add(1) doesn't prompt for root credentials and >>> then fails badly >>> 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: Thu Jul 24 13:50:06 UTC 2008 >>> Closed-Date: >>> Last-Modified: >>> Originator: Bruce Cran >>> Release: 7.0 >>> Organization: >>> Environment: >> FreeBSD bsdbox01 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Thu Feb 28 >> 16:53:28 GMT 2008 bruccran@bsdbox01:/usr/obj/usr/src/sys/ >> MYKERNEL i386 >>> Description: >> Running pkg_add as a normal user fails. It should check if it's >> being run under root credentials and if not either abort or prompt >> for the root password. The following errors are currently displayed: >> >>> pkg_add -r gkrellm >> Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/gkrellm.tbz >> ... Done. >> man/man8/gkrellmd.8.gz: Can't create 'man/man8/gkrellmd.8.gz': >> Permission denied >> include/gkrellm2/gkrellmd.h: Failed to create dir 'include/ >> gkrellm2': No such file or directoryCan't create 'include/gkrellm2/ >> gkrellmd.h': No such file or directory >> libdata/pkgconfig/gkrellmd.pc: Can't create 'libdata/pkgconfig/ >> gkrellmd.pc': Permission denied >> sbin/gkrellmd: Can't create 'sbin/gkrellmd': Permission denied >> tar: Error exit delayed from previous errors. >> pkg_add: extract_plist: can not invoke 156 byte tar pipeline: /usr/ >> bin/tar cf - man/man8/gkrellmd.8.gz include/gkrellm2/gkrellmd.h >> libdata/pkgconfig/gkrellmd.pc sbin/gkrellmd|/usr/bin/tar --unlink - >> xpPf - -C /usr/local >> >>> How-To-Repeat: >> Run pkg_add -r as a non-root user. >>> Fix: > > The issue isn't the fact that you're running as non-root; it's that > someone's not checking to see whether or not a fetch init succeeded > (filehandle's open, writing's being done) before continuing. > > I'll fix this later on tonight when I get back from San Jose. > > Cheers, > -Garrett For what it's worth, it appears that the SVN head version of pkg_add isn't afflicted by the same issue as the RELENG_7 copy. My hunch is that the above errors that you're seeing are due to a call to tar, so until libarchive is integrated into pkg_install, those errors will persist. -Garrett