Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 316
    • Issues 316
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #555
Closed
Open
Created Nov 21, 2007 by Trac@tracbot

Mac OS X 0.1.2.18 Tiger Universal Bundle addsysuser RFE

One side-effect of the 2007-06-12 modifications to addsysuser for Mac OS X 10.5 (Leopard) is that the "_tor" account is no longer assigned an explicit uid. Cf., the statement in "else" clause that executes

uiddef=nidump passwd / | cut -d: -f3 | sort -n | grep -v '!^[56789]..' |grep -v '!^....$' | tail -n 1

However, these modifications now cause the "else" clause that employs nidump to never be executed even for older versions of the Mac OS X (including 10.2 through 10.4) because they (too) have /usr/bin/dscl. Therefore, I suggest that something along the following be added within the "if [ -x /usr/bin/dscl ]; then" clause:

if [ -x /usr/bin/nidump ]; then
   uiddef=`nidump passwd / | cut -d: -f3 | sort -n | grep -v '!^[56789]..' |grep -v '!^....$' | tail -n 1`
else
   set _tmp=/tmp/_dsexport_tmp.txt.$$
   rm -f $_tmp
   dsexport $_tmp '/Local/Default' 'dsRecTypeStandard:Users' > /dev/null 2>&1
   uiddef=`cat $_tmp | sed 's/\\\://g' | cut -d: -f6 | grep '!^[0-9]' | sort -n | grep -v '!^[56789]..' | grep -v '!^....$' | tail -n 1`
   rm -f $_tmp
fi

uiddef=`echo $uiddef + 1 | bc`

dscl . -create /users/$username uid $uiddef

(Note that the "if [ -x /usr/bin/nidump ]; then" protection exists because OSes prior to 10.5 do not have /usr/bin/dsexport (sigh).)

[Automatically added by flyspray2trac: Operating System: OSX 10.5 Leopard]

Trac:
Username: mwfong

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking