SHELLERS for SYSCF, MacOS 10.5 hints file (trunk only)
Add SHELLERS - people allowed to use ! command with same syntax as WIZARDS. Add new hints file for 10.5, since the rules and commands for groups changed (new commands introduced in 10.4, old ones removed in 10.5; creating a new user under 10.4 gave you a matching group, in 10.5 it doesn't). Also move shared build into roughly right place in file system when being installed for root - don't use ~root. Makefile.top - don't remove ./-p unless it exists (that's always annoyed me). fix error invoking macosx.sh
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
#!/bin/sh
|
||||
# SCCS Id: @(#)macosx-mu.sh 3.5 2007/12/12
|
||||
# SCCS Id: @(#)macosx.sh 3.5 2007/12/12
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
# hints helper script for macosx
|
||||
# DO NOT invoke directly
|
||||
# DO NOT invoke directly.
|
||||
|
||||
# Works for 10.4 and 10.5. (The 10.5 support might work for 10.4 but keep
|
||||
# both versions in case we need to support earlier versions.)
|
||||
|
||||
cmd=$1
|
||||
|
||||
echo "macosx: $*"
|
||||
|
||||
case "x$cmd" in
|
||||
xuser)
|
||||
# fail unless user exists (good through 10.4)
|
||||
user=$2
|
||||
gotuser=`niutil -readval . /users/$user name 0 2>/dev/null`
|
||||
[ -z $gotuser ] && (echo "User $user does not exist."
|
||||
exit 1;
|
||||
)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
#name: dummy1
|
||||
#_writers_passwd: dummy1
|
||||
#_writers_tim_password: dummy1
|
||||
@@ -35,14 +41,16 @@ xuser)
|
||||
#authentication_authority: ;ShadowHash;
|
||||
#realname: dummyname1
|
||||
#generateduid: F6D4991C-BDF5-481F-A407-D84C6A2D0E2A
|
||||
|
||||
xgroup)
|
||||
# fail unless group exists (good through 10.4)
|
||||
group=$2
|
||||
gotgrp=`niutil -readval . /groups/$group name 0 2>/dev/null`
|
||||
[ -z $gotgrp ] && ( echo "Group $group does not exist."
|
||||
exit 1
|
||||
)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
#niutil -read . /groups/bin name 0
|
||||
#name: bin
|
||||
#gid: 7
|
||||
@@ -51,7 +59,92 @@ xgroup)
|
||||
#smb_sid: S-1-5-21-107
|
||||
#realname: Binary
|
||||
|
||||
xuser2)
|
||||
# fail unless user exists (required as of 10.5)
|
||||
user=$2
|
||||
if( dscl localhost -read /Search/Users/$user 1>/dev/null 2>&1 );
|
||||
then
|
||||
true;
|
||||
else
|
||||
echo "User $user does not exist.";
|
||||
exit 1;
|
||||
fi
|
||||
;;
|
||||
|
||||
xgroup2)
|
||||
# if group does not exist, create it (required as of 10.5)
|
||||
group=$2
|
||||
[ -z $group ] && ( echo "No group specified."
|
||||
exit 1
|
||||
)
|
||||
if( dscl localhost -read /Search/Groups/$group 1>/dev/null 2>&1 );
|
||||
then
|
||||
true;
|
||||
else
|
||||
echo "Group $group does not exist - creating.";
|
||||
dseditgroup -o create -r "Games Group" -s 3600 $group
|
||||
if( dscl localhost -read /Search/Groups/$group 1>/dev/null 2>&1 );
|
||||
then
|
||||
true;
|
||||
else
|
||||
echo "Unable to create group $group."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
#% dscl localhost -read /Search/Groups/wheel
|
||||
# AppleMetaNodeLocation: /Local/Default
|
||||
# GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000000
|
||||
# GroupMembership: root
|
||||
# Password: *
|
||||
# PrimaryGroupID: 0
|
||||
# RealName:
|
||||
# System Group
|
||||
# RecordName: wheel
|
||||
# RecordType: dsRecTypeStandard:Groups
|
||||
# SMBSID: S-1-5-21-100
|
||||
|
||||
*) echo "Unknown command $cmd"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dscl localhost -read /Search/Users/games
|
||||
# dsAttrTypeNative:_writers_hint: games
|
||||
# dsAttrTypeNative:_writers_jpegphoto: games
|
||||
# dsAttrTypeNative:_writers_LinkedIdentity: games
|
||||
# dsAttrTypeNative:_writers_passwd: games
|
||||
# dsAttrTypeNative:_writers_picture: games
|
||||
# dsAttrTypeNative:_writers_realname: games
|
||||
# dsAttrTypeNative:_writers_UserCertificate: games
|
||||
# AppleMetaNodeLocation: /Local/Default
|
||||
# AuthenticationAuthority: ;ShadowHash; ;Kerberosv5;;games@LKDC:SHA1.3F695B215C78511043D9787CA51DE92E6494A021;LKDC:SHA1.3F695B215C78511043D9787CA51DE92E6494A021;
|
||||
# AuthenticationHint: games
|
||||
# GeneratedUID: A727EFB1-D6AA-4FE2-8524-0E154890E9A9
|
||||
# NFSHomeDirectory: /Users/games
|
||||
# Password: ********
|
||||
# Picture:
|
||||
# /Library/User Pictures/Flowers/Sunflower.tif
|
||||
# PrimaryGroupID: 20
|
||||
# RealName: games
|
||||
# RecordName: games
|
||||
# RecordType: dsRecTypeStandard:Users
|
||||
# UniqueID: 505
|
||||
# UserShell: /bin/bash
|
||||
|
||||
# see also: http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/additionalfeatures/chapter_10_section_9.html
|
||||
|
||||
# another mess: 10.4 creates a group for every user, 10.5 dumps you into staff.
|
||||
# so I think we need to explicitly create group games in both (if it doesn't
|
||||
# exist) and use owner bin (nope that fails since everything seems to be owned
|
||||
# by root. Do we want that? How about just creating user games as well?)
|
||||
|
||||
# [Hermes:sys/unix/hints] keni% dscl localhost -read /Search/Users/games9
|
||||
# <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
|
||||
# [Hermes:sys/unix/hints] keni% dscl localhost -read /Search/Users/games9 >/dev/null
|
||||
# <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
|
||||
# [Hermes:sys/unix/hints] keni% dscl localhost -read /Search/Users/games > /dev/null
|
||||
# status is good: 0 or 56
|
||||
|
||||
# file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/releasenotes/MacOSXServer/RN-DirectoryServices/index.html
|
||||
|
||||
Reference in New Issue
Block a user