[81558] trunk/base
jeremyhu at macports.org
jeremyhu at macports.org
Mon Aug 1 15:05:01 PDT 2011
Revision: 81558
http://trac.macports.org/changeset/81558
Author: jeremyhu at macports.org
Date: 2011-08-01 15:05:00 -0700 (Mon, 01 Aug 2011)
Log Message:
-----------
Lion: Hide new users from Users & Groups preference pane. #30168
Modified Paths:
--------------
trunk/base/portmgr/dmg/postflight
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight 2011-08-01 21:53:32 UTC (rev 81557)
+++ trunk/base/portmgr/dmg/postflight 2011-08-01 22:05:00 UTC (rev 81558)
@@ -147,6 +147,16 @@
let "NEXTUID=NEXTUID+1"
done
${DSCL} -q . -create /Users/${RUNUSR} UniqueID $NEXTUID
+
+ # These are implicitly added on Mac OSX Lion. AuthenticationAuthority
+ # causes the user to be visible in the Users & Groups Preference Pane,
+ # and the others are just noise, so delete them.
+ # https://trac.macports.org/ticket/30168
+ ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority
+ ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions
+ ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys
+ ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData
+
${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
${DSCL} -q . -create /Users/${RUNUSR} Password \*
${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2011-08-01 21:53:32 UTC (rev 81557)
+++ trunk/base/src/port1.0/portutil.tcl 2011-08-01 22:05:00 UTC (rev 81558)
@@ -2096,10 +2096,20 @@
if {${os.platform} eq "darwin"} {
set dscl [findBinary dscl $portutil::autoconf::dscl_path]
+ exec $dscl . -create /Users/${name} UniqueID ${uid}
+
+ # These are implicitly added on Mac OSX Lion. AuthenticationAuthority
+ # causes the user to be visible in the Users & Groups Preference Pane,
+ # and the others are just noise, so delete them.
+ # https://trac.macports.org/ticket/30168
+ exec $dscl . -delete /Users/${name} AuthenticationAuthority
+ exec $dscl . -delete /Users/${name} PasswordPolicyOptions
+ exec $dscl . -delete /Users/${name} dsAttrTypeNative:KerberosKeys
+ exec $dscl . -delete /Users/${name} dsAttrTypeNative:ShadowHashData
+
+ exec $dscl . -create /Users/${name} RealName ${realname}
exec $dscl . -create /Users/${name} Password ${passwd}
- exec $dscl . -create /Users/${name} UniqueID ${uid}
exec $dscl . -create /Users/${name} PrimaryGroupID ${gid}
- exec $dscl . -create /Users/${name} RealName ${realname}
exec $dscl . -create /Users/${name} NFSHomeDirectory ${home}
exec $dscl . -create /Users/${name} UserShell ${shell}
} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110801/f250fe1a/attachment.html>
More information about the macports-changes
mailing list