Bug 119935

Summary: mail/qmail port user
Product: Ports & Packages Reporter: Simon Shapiro <simon>
Component: Individual Port(s)Assignee: Renato Botelho <garga>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Simon Shapiro 2008-01-24 03:50:01 UTC
/usr/ports/mail/qmail

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.

Fix: 

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 freebsd_triage 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 freebsd_triage 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 
  Log:
  - 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
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Renato Botelho freebsd_committer freebsd_triage 2008-01-24 16:33:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!