Revision: 81728 http://trac.macports.org/changeset/81728 Author: jmr@macports.org Date: 2011-08-04 09:04:29 -0700 (Thu, 04 Aug 2011) Log Message: ----------- checkpassword-pam: fix root privileges check not to rely on env(USER) Modified Paths: -------------- trunk/dports/security/checkpassword-pam/Portfile Modified: trunk/dports/security/checkpassword-pam/Portfile =================================================================== --- trunk/dports/security/checkpassword-pam/Portfile 2011-08-04 16:01:22 UTC (rev 81727) +++ trunk/dports/security/checkpassword-pam/Portfile 2011-08-04 16:04:29 UTC (rev 81728) @@ -1,4 +1,5 @@ # $Id$ + PortSystem 1.0 name checkpassword-pam @@ -26,7 +27,7 @@ post-destroot { # Check if user is running as root - if {$env(USER) == "root"} { + if {[geteuid] == 0} { system "chmod 4511 ${destroot}${prefix}/bin/${name}" } else { ui_msg "-----------------------------------------------------------" @@ -48,4 +49,3 @@ ui_msg "is correct for ${name} usage." ui_msg "-----------------------------------------------------------" } -
participants (1)
-
jmr@macports.org