[81414] trunk/base/Makefile.in
jmr at macports.org
jmr at macports.org
Fri Jul 29 22:44:05 PDT 2011
Revision: 81414
http://trac.macports.org/changeset/81414
Author: jmr at macports.org
Date: 2011-07-29 22:44:03 -0700 (Fri, 29 Jul 2011)
Log Message:
-----------
create run user with lowest available uid above 500, checking all data sources in the search path for existing users (#30464)
Modified Paths:
--------------
trunk/base/Makefile.in
Modified: trunk/base/Makefile.in
===================================================================
--- trunk/base/Makefile.in 2011-07-30 04:57:35 UTC (rev 81413)
+++ trunk/base/Makefile.in 2011-07-30 05:44:03 UTC (rev 81414)
@@ -50,8 +50,12 @@
if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
if test `id -u` -eq 0; then \
echo "Creating user \"${RUNUSR}\"" ; \
+ NEXTUID=501; \
+ while test -n "`dscl -q /Search -search /Users UniqueID $$NEXTUID`"; do \
+ let "NEXTUID=NEXTUID+1"; \
+ done; \
+ ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
- ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$(($$(${DSCL} -q . -list /Users UniqueID | /usr/bin/awk '{print $$2}' | sort -ug | tail -1)+1)) ; \
${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty ; \
${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110729/bff10eac/attachment.html>
More information about the macports-changes
mailing list