Bug 119935 - mail/qmail port user
Summary: mail/qmail port user
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
Depends on:
Reported: 2008-01-24 03:50 UTC by Simon Shapiro
Modified: 2008-01-24 16:40 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Simon Shapiro 2008-01-24 03:50:01 UTC

The new pkg-install script, which switched from csh to sh, updated two days ago, broke the port.

Specifically, use of the $USER environment variable in order to determine effective uid is wrong, this variable is the login user, so if one logs in as their own user, and su's to root, the pkg-install script comes up with the login-user's userid, not root, and the port configure will fail.


the hack i used is to set $user env to 'root'. how stupid is that?

I'm not sure why they used the method they did, i am not sure what the best practice is. it seems like there must be other ports that require root!
How-To-Repeat: login as non-root user
# su
# cd /usr/ports/mail/qmail
# make configure
Comment 1 Edwin Groothuis freebsd_committer 2008-01-24 09:02:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2008-01-24 16:33:35 UTC
garga       2008-01-24 16:33:20 UTC

  FreeBSD ports repository

  Modified files:
    mail/qmail/files     pkg-install.in 
  - Fix pkg-install's user detection
  PR:             ports/119935
  Submitted by:   Simon Shapiro <simon@niftywerks.com>
  Revision  Changes    Path
  1.6       +2 -2      ports/mail/qmail/files/pkg-install.in
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Renato Botelho freebsd_committer 2008-01-24 16:33:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!