NetBSD Problem Report #46231
From martin@aprisoft.de Tue Mar 20 15:00:34 2012
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id A334063B946
for <gnats-bugs@gnats.NetBSD.org>; Tue, 20 Mar 2012 15:00:34 +0000 (UTC)
Message-Id: <20120320150036.1C99BAF5825@emmas.aprisoft.de>
Date: Tue, 20 Mar 2012 16:00:36 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: root .login file disturbs pkgsrc su ?
X-Send-Pr-Version: 3.95
>Number: 46231
>Category: bin
>Synopsis: installing pkgs as unpriv. user (using su) causes errors from tset
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 20 15:05:00 +0000 2012
>Last-Modified: Sat Mar 24 17:30:02 +0000 2012
>Originator: Martin Husemann
>Release: NetBSD 6.99.4
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 6.99.4 NetBSD 6.99.4 (MODULAR) #159: Sun Mar 18 21:56:05 CET 2012 martin@whoever-brings-the-night.aprisoft.de:/usr/src/sys/arch/sparc64/compile/MODULAR sparc64
Architecture: sparc64
Machine: sparc64
>Description:
I installed a new machine from scratch and started building pkgs from pkgsrc
as an unprivileged user. Whenever pkgsrc requires root, it invokes su for
me. Fine, I enter the password, and then get an error from tset (which
is ignored, but still disturbing).
The only tset I could find is in /root/.login (!) and commenting that one
out removes the errors.
Now, if I am not halluzinating, this brings up two questions:
1) should that script be run during the su from pkgsrc at all?
2) should that tset be guarded by something like:
case $- in *i*) ?
>How-To-Repeat:
s/a
>Fix:
n/a
>Audit-Trail:
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/46231: root .login file disturbs pkgsrc su ?
Date: Tue, 20 Mar 2012 13:11:31 -0400
On Tue, 20 Mar 2012 15:05:01 +0000 (UTC)
martin@NetBSD.org wrote:
> The only tset I could find is in /root/.login (!) and commenting that one
> out removes the errors.
>
> Now, if I am not halluzinating, this brings up two questions:
> 1) should that script be run during the su from pkgsrc at all?
> 2) should that tset be guarded by something like:
> case $- in *i*) ?
I would think that tset could be in the interactive-case, but .profile
should only be loaded from login shells (i.e. su including the -). If
the script doesn't include the -, does .shrc or /etc/shrc
source .profile?
--
Matt
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/46231: root .login file disturbs pkgsrc su ?
Date: Tue, 20 Mar 2012 22:53:35 +0100
On Tue, Mar 20, 2012 at 05:15:05PM +0000, Matthew Mondor wrote:
> I would think that tset could be in the interactive-case, but .profile
> should only be loaded from login shells (i.e. su including the -). If
> the script doesn't include the -, does .shrc or /etc/shrc
> source .profile?
There is no (sym-)linking or sourcing going on, AFAICT. All scripts are
unmodified from a fresh install (i.e. can be found in src/etc/root as
dot.*).
Martin
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/46231: root .login file disturbs pkgsrc su ?
Date: Sat, 24 Mar 2012 17:28:55 +0000
On Tue, Mar 20, 2012 at 09:55:02PM +0000, Martin Husemann wrote:
>> I would think that tset could be in the interactive-case, but .profile
>> should only be loaded from login shells (i.e. su including the -). If
>> the script doesn't include the -, does .shrc or /etc/shrc
>> source .profile?
>
> There is no (sym-)linking or sourcing going on, AFAICT. All scripts are
> unmodified from a fresh install (i.e. can be found in src/etc/root as
> dot.*).
Well... the question is really whether pkgsrc is doing su - or su -l
to generate a login shell. It should not be doing that.
--
David A. Holland
dholland@netbsd.org
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.