[81728] trunk/dports/security/checkpassword-pam/Portfile
jmr at macports.org
jmr at macports.org
Thu Aug 4 09:04:29 PDT 2011
Revision: 81728
http://trac.macports.org/changeset/81728
Author: jmr at 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 "-----------------------------------------------------------"
}
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110804/4527d45d/attachment.html>
More information about the macports-changes
mailing list