# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
SHELL=/bin/sh
DEST=@DEST@
packages: dest
@case ${SYS_NAME} in \
- ppc_darwin* ) \
+ *_darwin_* ) \
${COMPILE_PART1} packaging/MacOS && sh ./buildpkg.sh ${DEST} ;; \
hp_ux110 ) \
${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.00 ;; \
case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
+ *_darwin_[1-6][0-9]) \
+ echo Not building MT viced for ${SYS_NAME} ;; \
+ *_darwin_*) \
+ ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
*) \
echo Not building MT viced for ${SYS_NAME} ;; \
esac
gtx: project null auth # kauth rxkad ?
case ${SYS_NAME} in \
- rs_aix* | sun*_5? | sgi_6? | *linux* | ppc_darwin* | *fbsd* | ia64_hpux*) \
+ rs_aix* | sun*_5? | sgi_6? | *linux* | *_darwin_* | *fbsd* | ia64_hpux*) \
$(RM) -f ${TOP_LIBDIR}/libtermlib.a; \
ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a; \
${COMPILE_PART1} gtx ${COMPILE_PART2};; \
vfsck: vol
set -x; \
case ${SYS_NAME} in \
- sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | sun*_4* ) \
+ sgi_* | *linux* | rs_aix42 | *_darwin_* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | sun*_4* ) \
echo skip vfsck for ${SYS_NAME} ;; \
* ) \
${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
else \
echo Skipping pam for ${SYS_NAME} ; \
fi ;; \
- ppc_darwin* | *_obsd* ) \
+ *_darwin_* | *_obsd* ) \
echo Skipping login for ${SYS_NAME} ;; \
* ) \
${COMPILE_PART1} login ${COMPILE_PART2} ;; \
case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*) \
${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
+ *_darwin_[1-6][0-9]) \
+ echo Not building MT libafsrpc for ${SYS_NAME} ;; \
+ *_darwin_*) \
+ ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
*) \
echo Not building MT libafsrpc for ${SYS_NAME} ;; \
esac
case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*) \
${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
+ *_darwin_[1-6][0-9]) \
+ echo Not building MT libafsauthent for ${SYS_NAME} ;; \
+ *_darwin_*) \
+ ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
*) \
- echo Not building MT libafsrpc for ${SYS_NAME} ;; \
+ echo Not building MT libafsauthent for ${SYS_NAME} ;; \
esac
shlibafsrpc: rx rxkad des
alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
*) \
- echo Not building shared libafsrpc for ${SYS_NAME} ;; \
+ echo Not building shared libafsauthent for ${SYS_NAME} ;; \
esac
libadmin_real:
case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
$(MAKE) libadmin_real ;; \
+ *_darwin_[1-6][0-9]) \
+ echo Not building MT libadmin for ${SYS_NAME} ;; \
+ *_darwin_*) \
+ $(MAKE) libadmin_real ;; \
*) \
echo Not building MT libadmin for ${SYS_NAME} ;; \
esac
ntp: project volser
@case ${WITH_OBSOLETE} in \
YES) case ${SYS_NAME} in \
- sun*_5[89] | *linux* | *fbsd* | ppc_darwin* ) echo skipping ntp for ${SYS_NAME} ;; \
+ sun*_5[89] | *linux* | *fbsd* | *_darwin_* ) echo skipping ntp for ${SYS_NAME} ;; \
* ) ${COMPILE_PART1} ntp ${COMPILE_PART2} ;; \
esac ;; \
*) echo skipping deprecated target: ntp ;; \
+/*
+ * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ */
#include <afsconfig.h>
#include <afs/param.h>
#include <sys/namei.h>
#include <sys/conf.h>
#include <sys/syscall.h>
+#include <sys/sysctl.h>
+#include "../afs/sysctl.h"
struct vcache *afs_globalVp = 0;
struct mount *afs_globalVFS = 0;
return 0;
}
-int afs_sysctl() {
- return EOPNOTSUPP;
+u_int32_t afs_darwin_realmodes = 0;
+
+int afs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
+int *name;
+u_int namelen;
+void *oldp;
+size_t *oldlenp;
+void *newp;
+size_t newlen;
+struct proc *p;
+{
+ int error;
+
+ switch (name[0]) {
+ case AFS_SC_ALL:
+ /* nothing defined */
+ break;
+ case AFS_SC_DARWIN:
+ if (namelen < 3)
+ return ENOENT;
+ switch (name[1]) {
+ case AFS_SC_DARWIN_ALL:
+ switch (name[2]) {
+ case AFS_SC_DARWIN_ALL_REALMODES:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &afs_darwin_realmodes);
+ }
+ break;
+ /* darwin version specific sysctl's goes here */
+ }
+ break;
+ }
+ return EOPNOTSUPP;
}
+/*
+ * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ */
#include <afsconfig.h>
#include <afs/param.h>
#include <sys/malloc.h>
#include <sys/namei.h>
#include <sys/ubc.h>
+#if defined(AFS_DARWIN70_ENV)
+#include <vfs/vfs_support.h>
+#endif /* defined(AFS_DARWIN70_ENV) */
int afs_vop_lookup(struct vop_lookup_args *);
int afs_vop_create(struct vop_create_args *);
int afs_vop_symlink(struct vop_symlink_args *);
int afs_vop_readdir(struct vop_readdir_args *);
int afs_vop_readlink(struct vop_readlink_args *);
+#if !defined(AFS_DARWIN70_ENV)
extern int ufs_abortop(struct vop_abortop_args *);
+#endif /* !defined(AFS_DARWIN70_ENV) */
int afs_vop_inactive(struct vop_inactive_args *);
int afs_vop_reclaim(struct vop_reclaim_args *);
int afs_vop_lock(struct vop_lock_args *);
{ &vop_symlink_desc, afs_vop_symlink }, /* symlink */
{ &vop_readdir_desc, afs_vop_readdir }, /* readdir */
{ &vop_readlink_desc, afs_vop_readlink }, /* readlink */
+#if defined(AFS_DARWIN70_ENV)
+ { &vop_abortop_desc, nop_abortop }, /* abortop */
+#else /* ! defined(AFS_DARWIN70_ENV) */
/* Yes, we use the ufs_abortop call. It just releases the namei
buffer stuff */
{ &vop_abortop_desc, ufs_abortop }, /* abortop */
+#endif /* defined(AFS_DARWIN70_ENV) */
{ &vop_inactive_desc, afs_vop_inactive }, /* inactive */
{ &vop_reclaim_desc, afs_vop_reclaim }, /* reclaim */
{ &vop_lock_desc, afs_vop_lock }, /* lock */
} */ *ap;
{
int error;
- struct vcache *vc = VTOAFS(ap->a_vp);
+ struct vnode *vp = ap->a_vp;
+ struct vcache *vc = VTOAFS(vp);
+#ifdef AFS_DARWIN14_ENV
+ int didhold = 0;
+ /*----------------------------------------------------------------
+ * osi_VM_TryReclaim() removes the ubcinfo of a vnode, but that vnode
+ * can later be passed to vn_open(), which will skip the call to
+ * ubc_hold(), and when the ubcinfo is later added, the ui_refcount
+ * will be off. So we compensate by calling ubc_hold() ourselves
+ * when ui_refcount is less than 2. If an error occurs in afs_open()
+ * we must call ubc_rele(), which is what vn_open() would do if it
+ * was able to call ubc_hold() in the first place.
+ *----------------------------------------------------------------*/
+ if (vp->v_type == VREG && !(vp->v_flag & VSYSTEM)
+ && vp->v_ubcinfo->ui_refcount < 2)
+ didhold = ubc_hold(vp);
+#endif /* AFS_DARWIN14_ENV */
AFS_GLOCK();
error = afs_open(&vc, ap->a_mode, ap->a_cred);
#ifdef DIAGNOSTIC
- if (AFSTOV(vc) != ap->a_vp)
+ if (AFSTOV(vc) != vp)
panic("AFS open changed vnode!");
#endif
afs_BozonLock(&vc->pvnLock, vc);
osi_FlushPages(vc, ap->a_cred);
afs_BozonUnlock(&vc->pvnLock, vc);
AFS_GUNLOCK();
+#ifdef AFS_DARWIN14_ENV
+ if (error && didhold)
+ ubc_rele(vp);
+#endif /* AFS_DARWIN14_ENV */
return error;
}
case _PC_PIPE_BUF:
return EINVAL;
break;
+#if defined(AFS_DARWIN70_ENV)
+ case _PC_NAME_CHARS_MAX:
+ *ap->a_retval = NAME_MAX;
+ break;
+ case _PC_CASE_SENSITIVE:
+ *ap->a_retval = 1;
+ break;
+ case _PC_CASE_PRESERVING:
+ *ap->a_retval = 1;
+ break;
+#endif /* defined(AFS_DARWIN70_ENV) */
default:
return EINVAL;
}
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
include ../config/Makefile.${SYS_NAME}
-all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h
+all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h ${TOP_INCDIR}/afs/sysctl.h
case ${SYS_NAME} in \
pmax_ul43 | pmax_ul43a) \
${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
/usr/etc/gencat afszcm.cat afs_trace.msf ;; \
*_linux* | *_umlinux* ) \
gencat --new afszcm.cat afs_trace.msf ;; \
- ppc_darwin* | i386_fbsd*) \
+ *_darwin_* | i386_fbsd*) \
echo No gencat for ${SYS_NAME} ;; \
* ) \
gencat afszcm.cat afs_trace.msf ;; \
${UKERNELDIR}/afs:
mkdir -p $@
-install: ${DESTDIR}${includedir}/afs/afs.h ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h
+install: ${DESTDIR}${includedir}/afs/afs.h ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/sysctl.h
case ${SYS_NAME} in \
pmax_ul43 | pmax_ul43a) \
${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \
${DESTDIR}${includedir}/afs/afs_stats.h: afs_stats.h
${INSTALL} $? $@
-
${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h
${INSTALL} $? $@
+${DEST}/include/afs/sysctl.h: sysctl.h
+ ${INSTALL} $? $@
+
+${DESTDIR}${includedir}/afs/sysctl.h: sysctl.h
+ ${INSTALL} $? $@
+
+${TOP_INCDIR}/afs/sysctl.h: sysctl.h
+ ${INSTALL} $? $@
+
+
${DEST}/include/afs/exporter.h: exporter.h
${INSTALL} $? $@
${INSTALL} $? $@
-dest: ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h
+dest: ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/sysctl.h
case ${SYS_NAME} in \
pmax_ul43 | pmax_ul43a) \
${INSTALL} longc_procs.h ${DEST}/include/afs ;; \
esac
case ${SYS_NAME} in \
- next_mach30 | vax_ul43 | ppc_darwin* | i386_fbsd* ) \
+ next_mach30 | vax_ul43 | *_darwin_* | i386_fbsd* ) \
echo skipping afszcm.cat install for ${SYS_NAME} ;; \
* ) \
${INSTALL} afszcm.cat ${DEST}/root.client/usr/vice/etc/C ;; \
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
attrs->va_mode &= ~(VSUID|VSGID);
}
#if defined(AFS_DARWIN_ENV)
- /* Mac OS X uses the mode bits to determine whether a file or directory
- * is accessible, and believes them, even though under AFS they're almost
- * assuredly wrong, especially if the local uid does not match the AFS
- * ID. So we set the mode bits conservatively.
- */
- if (S_ISDIR(attrs->va_mode)) {
- /* all access bits need to be set for directories, since even
- * a mode 0 directory can still be used normally.
- */
- attrs->va_mode |= ACCESSPERMS;
- } else {
- /* for other files, replicate the user bits to group and other */
- mode_t ubits = (attrs->va_mode & S_IRWXU) >> 6;
- attrs->va_mode |= ubits | (ubits << 3);
+ {
+ extern u_int32_t afs_darwin_realmodes;
+ if (!afs_darwin_realmodes) {
+ /* Mac OS X uses the mode bits to determine whether a file or
+ * directory is accessible, and believes them, even though under
+ * AFS they're almost assuredly wrong, especially if the local uid
+ * does not match the AFS ID. So we set the mode bits
+ * conservatively.
+ */
+ if (S_ISDIR(attrs->va_mode)) {
+ /* all access bits need to be set for directories, since even
+ * a mode 0 directory can still be used normally.
+ */
+ attrs->va_mode |= ACCESSPERMS;
+ } else {
+ /* for other files, replicate the user bits to group and other */
+ mode_t ubits = (attrs->va_mode & S_IRWXU) >> 6;
+ attrs->va_mode |= ubits | (ubits << 3);
+ }
+ }
}
#endif /* AFS_DARWIN_ENV */
attrs->va_uid = fakedir ? 0 : avc->m.Owner;
#ifdef AFS_OSF_ENV
attrs->va_fsid = avc->v.v_mount->m_stat.f_fsid.val[0];
#else
+#ifdef AFS_DARWIN70_ENV
+ attrs->va_fsid = avc->v.v_mount->mnt_stat.f_fsid.val[0];
+#else /* ! AFS_DARWIN70_ENV */
attrs->va_fsid = 1;
+#endif /* AFS_DARWIN70_ENV */
#endif
#endif
#endif /* AFS_SUN56_ENV */
--- /dev/null
+/*
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef AFS_SYSCTL_H
+#define AFS_SYSCTL_H
+
+/* top level AFS names */
+#define AFS_SC_ALL 0
+#define AFS_SC_DARWIN 1
+
+/* AFS_SC_ALL: platform-independent sysctls */
+ /* nothing defined */
+
+/* AFS_SC_DARWIN: darwin-specific sysctls */
+#define AFS_SC_DARWIN_ALL 0
+#define AFS_SC_DARWIN_12 1
+#define AFS_SC_DARWIN_13 2
+#define AFS_SC_DARWIN_14 3
+#define AFS_SC_DARWIN_60 4
+#define AFS_SC_DARWIN_70 5
+
+/* AFS_SC_DARWIN_ALL: darwin version-independent sysctls */
+#define AFS_SC_DARWIN_ALL_REALMODES 1
+
+/* AFS_SC_DARWIN_12: darwin 1.2 sysctls */
+ /* nothing defined */
+
+/* AFS_SC_DARWIN_13: darwin 1.3 sysctls */
+ /* nothing defined */
+
+/* AFS_SC_DARWIN_14: darwin 1.4 sysctls */
+ /* nothing defined */
+
+/* AFS_SC_DARWIN_60: darwin 6.x sysctls */
+ /* nothing defined */
+
+/* AFS_SC_DARWIN_70: darwin 7.x sysctls */
+ /* nothing defined */
+
+#endif /* AFS_SYSCTL_H */
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
# afsd makefile
DEST=@DEST@
${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib/libdwarf.a /usr/lib/libelf.a ;; \
sgi_64 | sgi_65 ) \
${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib32/libdwarf.a /usr/lib32/libelf.a ;; \
- ppc_darwin* ) \
+ *_darwin_* ) \
${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} -F/System/Library/PrivateFrameworks -framework DiskArbitration ;; \
* ) \
${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} ;; \
*linux* ) \
${INSTALLex} -f afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \
${INSTALL} -f afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \
- ppc_darwin*) \
+ *_darwin_*) \
${INSTALLex} -f afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \
${INSTALL} -f afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \
*fbsd*) \
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
. /etc/rc.common
echo "Starting afsd"
$AFSD $OPTIONS
+#
+# Call afssettings (if it exists) to set customizable parameters
+#
+if [ -x $VICEETC/config/afssettings ]; then
+ sleep 2
+ $VICEETC/config/afssettings
+fi
+
#
# Run package to update the disk
#
{
Description = "OpenAFS network file system";
Provides = ("AFS");
- Requires = ("Resolver");
+ Requires = ("Resolver", "Disks");
OrderPreference = "None";
Messages =
{
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
-#ifndef AFS_FBSD_ENV
+#if !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN70_ENV)
/*
strcasestr(): Return first occurence of pattern s2 in s1, case
insensitive.
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
@case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*|rs_aix4*|*linux*|hp_ux*) \
echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
+ *_darwin_[1-6][0-9]) \
+ echo ${INSTALL} butc ${DESTDIR}${sbindir}/butc ; \
+ ${INSTALL} butc ${DESTDIR}${sbindir}/butc ;; \
+ *_darwin_*) \
+ echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
*) \
echo ${INSTALL} butc ${DESTDIR}${sbindir}/butc ; \
${INSTALL} butc ${DESTDIR}${sbindir}/butc ;; \
@case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*|rs_aix4*|*linux*|hp_ux*) \
echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
+ *_darwin_[1-6][0-9]) \
+ echo ${INSTALL} butc ${DEST}/etc/butc ; \
+ ${INSTALL} butc ${DEST}/etc/butc ;; \
+ *_darwin_*) \
+ echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
*) \
echo ${INSTALL} butc ${DEST}/etc/butc ; \
${INSTALL} butc ${DEST}/etc/butc ;; \
--- /dev/null
+# Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+#
+# Keep macros within each section in sorted order for clean diff displays.
+#
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = DARWIN
+#
+#
+# compilation and link editor flags
+XCFLAGS=
+MT_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV ${XCFLAGS}
+MT_CC=cc
+KROOT=
+KINCLUDES=-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers
+LWP_OPTMZ=-O2
+OPTMZ=-O2
+DBG=-g
+REGEX_OBJ=regex.o
+
+
+#
+# libraries
+XLIBS=@LIB_AFSDB@
+TXLIBS=-lncurses
+#MTLIBS=
+#XLIBELFA=
+#XLIBKVM=
+#
+SHLIB_SUFFIX=
+SHLIB_CFLAGS=
+#
+# programs
+AR=ar
+AS=as
+CC=cc
+CP=cp
+INSTALL=${TOP_SRCDIR}/pinstall/pinstall
+LEX=lex -l
+LD= ld
+LORDER = lorder
+MV=mv
+RANLIB=ranlib
+RM=rm
+STRIP= strip
+
+# override getfsent
+EXTRA_VLIBOBJS=fstab.o
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
#define SYS_NAME_ID_i386_umlinux2 2700
#define SYS_NAME_ID_ppc_darwin_13 504
#define SYS_NAME_ID_ppc_darwin_14 505
#define SYS_NAME_ID_ppc_darwin_60 506
+#define SYS_NAME_ID_ppc_darwin_70 507
#define SYS_NAME_ID_next_mach20 601
#define SYS_NAME_ID_next_mach30 602
--- /dev/null
+/*
+ * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ */
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_PPC_ENV 1
+#define AFS_VFSINCL_ENV 1
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_DARWIN_ENV
+#define AFS_DARWIN13_ENV
+#define AFS_DARWIN14_ENV
+#define AFS_DARWIN60_ENV
+#define AFS_DARWIN70_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL 230
+#define AFS_NAMEI_ENV 1
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS "afs"
+
+/* Machine / Operating system information */
+#define sys_ppc_darwin_12 1
+#define sys_ppc_darwin_13 1
+#define sys_ppc_darwin_14 1
+#define sys_ppc_darwin_60 1
+#define sys_ppc_darwin_70 1
+#define SYS_NAME "ppc_darwin_70"
+#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_70
+#define AFSBIG_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+
+#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
+#define RXK_LISTENER_ENV 1
+
+#ifdef KERNEL
+#undef MACRO_BEGIN
+#undef MACRO_END
+#include <kern/macro_help.h>
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) kalloc(x)
+#define AFS_KFREE(x,y) kfree(x,y)
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#define VN_RELE(vp) vrele(((struct vnode *)(vp)))
+#define VN_HOLD(vp) VREF(((struct vnode *)(vp)))
+
+#endif
+
+#define BIND_8_COMPAT
+
+#endif /* AFS_PARAM_H */
--- /dev/null
+/*
+ * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ */
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */
+#define AFS_ENV 1
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_PPC_ENV 1
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_ENV
+#define AFS_USR_DARWIN_ENV
+#define AFS_USR_DARWIN13_ENV
+#define AFS_USR_DARWIN14_ENV
+#define AFS_USR_DARWIN60_ENV
+#define AFS_USR_DARWIN70_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL 230
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS "afs"
+
+/* Machine / Operating system information */
+#define sys_ppc_darwin_12 1
+#define sys_ppc_darwin_13 1
+#define sys_ppc_darwin_14 1
+#define sys_ppc_darwin_60 1
+#define sys_ppc_darwin_70 1
+#define SYS_NAME "ppc_darwin_70"
+#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_70
+#define AFSBIG_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define RXK_LISTENER_ENV 1
+
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#define BIND_8_COMPAT
+
+#endif /* AFS_PARAM_H */
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_ClearPeerRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_ClearProcessRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_DisablePeerRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_DisableProcessRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_EnablePeerRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_EnableProcessRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_AdminErrors.h>
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
#include <rx/rxstat.h>
#include <afs/afsint.h>
#define FSINT_COMMON_XG
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_AdminErrors.h>
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
#include <rx/rxstat.h>
#include <afs/afsint.h>
#define FSINT_COMMON_XG
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
void Usage()
{
fprintf(stderr,
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_QueryPeerRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
#include <afs/afs_clientAdmin.h>
#include <afs/afs_utilAdmin.h>
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
+
extern int RXSTATS_QueryProcessRPCStats();
void Usage()
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/* Test driver for admin functions. */
void *cellHandle;
void *tokenHandle;
+#ifdef AFS_DARWIN_ENV
+pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* AFS_DARWIN_ENV */
/*
* Before processing any command, process the common arguments and
#/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
+#/* Portions Copyright (c) 2003 Apple Computer, Inc. */
# $Header$
#
# MakefileProto for Digital Unix systems
KDEFS=
DBUG =
DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
+<ppc_darwin_70>
+KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch
<ppc_darwin_60>
KOPTS=-no-cpp-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch
<ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>afs</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.openafs.filesystems.afs</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>afs</string>
+ <key>CFBundlePackageType</key>
+ <string>KEXT</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.2.10</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.2.10</string>
+ <key>OSBundleLibraries</key>
+ <dict>
+ <key>com.apple.kernel.bsd</key>
+ <string>6.9.9</string>
+ <key>com.apple.kernel.mach</key>
+ <string>6.9.9</string>
+ </dict>
+</dict>
+</plist>
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
# This is a pthread safe library containing rx, rxkad and des.
/usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
- sgi_* | ppc_darwin* ) \
+ sgi_* | *_darwin_* ) \
${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \
alpha_dux?? ) \
${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
/lib/cpp -P -I${TOP_INCDIR} process.s >process.ss; \
${AS} -ahlns process.ss -o process.o >process.lst; \
$(RM) process.ss ;; \
- ppc_darwin* ) \
+ *_darwin_* ) \
$(CC) -c ${XCFLAGS} -I${TOP_INCDIR} process.s;; \
i386_fbsd* ) \
/usr/bin/cpp -P process.fbsd.s > process.ss; \
--- /dev/null
+# Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+#
+# @APPLE_LICENSE_HEADER_START@
+#
+# This file contains Original Code and/or Modifications of Original Code
+# as defined in and that are subject to the Apple Public Source License
+# Version 2.0 (the 'License'). You may not use this file except in
+# compliance with the License. Please obtain a copy of the License at
+# http://www.opensource.apple.com/apsl/ and read it before using this
+# file.
+#
+# The Original Code and all software distributed under the License are
+# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+# Please see the License for the specific language governing rights and
+# limitations under the License.
+#
+# @APPLE_LICENSE_HEADER_END@
+
+AFSINCLUDE = /Library/OpenAFS/Tools/include
+CFLAGS = -O -I$(AFSINCLUDE)
+LIBS = -framework Foundation
+ALL = afssettings
+
+all: $(ALL)
+
+afssettings : afssettings.m
+ cc $(CFLAGS) -o $@ $^ $(LIBS)
+
+clean:
+ @rm -f *.o $(ALL)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IFPkgDescriptionDeleteWarning</key>
+ <string></string>
+ <key>IFPkgDescriptionDescription</key>
+ <string>Mac OS X version of OpenAFS client and server.</string>
+ <key>IFPkgDescriptionTitle</key>
+ <string>OpenAFS</string>
+ <key>IFPkgDescriptionVersion</key>
+ <string>1.2.10</string>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleGetInfoString</key>
+ <string>OpenAFS 1.2.10</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.openafs.OpenAFS.pkg</string>
+ <key>CFBundleName</key>
+ <string>OpenAFS</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.2.10</string>
+ <key>IFMajorVersion</key>
+ <integer>1</integer>
+ <key>IFMinorVersion</key>
+ <integer>2</integer>
+ <key>IFPkgFlagAllowBackRev</key>
+ <false/>
+ <key>IFPkgFlagAuthorizationAction</key>
+ <string>RootAuthorization</string>
+ <key>IFPkgFlagDefaultLocation</key>
+ <string>/</string>
+ <key>IFPkgFlagInstallFat</key>
+ <false/>
+ <key>IFPkgFlagIsRequired</key>
+ <false/>
+ <key>IFPkgFlagRelocatable</key>
+ <false/>
+ <key>IFPkgFlagRestartAction</key>
+ <string>RecommendedRestart</string>
+ <key>IFPkgFlagRootVolumeOnly</key>
+ <true/>
+ <key>IFPkgFlagUpdateInstalledLanguages</key>
+ <false/>
+ <key>IFPkgFlagUseUserMask</key>
+ <false/>
+ <key>IFPkgFormatVersion</key>
+ <real>0.10000000149011612</real>
+</dict>
+</plist>
#!/bin/sh
+# Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
if [ -d /afs -a ! -h /afs ]; then
rmdir /afs
fi
-mkdir -p /Network/afs
-if [ ! -h /afs ]; then
- ln -s /Network/afs /afs
+majorvers=`uname -r | sed 's/\..*//'`
+if [ $majorvers -ge 7 ]; then
+ # /Network is now readonly, so put AFS in /afs; make sure /afs is a directory
+ if [ -e /afs ]; then
+ if [ -h /afs -o ! -d /afs ]; then
+ rm -f /afs
+ mkdir /afs
+ fi
+ else
+ mkdir /afs
+ fi
+else
+ mkdir -p /Network/afs
+ if [ ! -h /afs ]; then
+ ln -s /Network/afs /afs
+ fi
fi
cd /var/db/openafs/etc
cp CellServDB.master CellServDB
fi
fi
+
+if [ $majorvers -ge 7 ]; then
+ # make config/settings.plist if it doesn't exist
+ if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then
+ cp config/settings.plist.orig config/settings.plist
+ fi
+elif [ -e config/afssettings ]; then
+ # turn off execution of afssettings
+ chmod a-x config/afssettings
+fi
--- /dev/null
+/*
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#import <Foundation/Foundation.h>
+#import <stdio.h>
+#import <err.h>
+#import <sys/types.h>
+#import <sys/mount.h>
+#import <sys/sysctl.h>
+#import <afs/sysctl.h>
+
+enum Type {
+ TypeNode = 0,
+ TypeNum,
+ TypeStr
+};
+
+typedef struct _setting {
+ NSString *key;
+ int selector;
+ enum Type type;
+ struct _setting *children;
+} Setting;
+
+Setting s_darwin_all[] = {
+ {@"RealModes", AFS_SC_DARWIN_ALL_REALMODES, TypeNum, NULL},
+ {NULL, 0, 0, NULL}
+};
+Setting s_darwin[] = {
+ {@"All", AFS_SC_DARWIN_ALL, TypeNode, s_darwin_all},
+ {@"Darwin12", AFS_SC_DARWIN_12, TypeNode, NULL},
+ {@"Darwin13", AFS_SC_DARWIN_13, TypeNode, NULL},
+ {@"Darwin14", AFS_SC_DARWIN_14, TypeNode, NULL},
+ {@"Darwin60", AFS_SC_DARWIN_60, TypeNode, NULL},
+ {@"Darwin70", AFS_SC_DARWIN_70, TypeNode, NULL},
+ {NULL, 0, 0, NULL}
+};
+Setting s_first[] = {
+ {@"All", AFS_SC_ALL, TypeNode, NULL},
+ {@"Darwin", AFS_SC_DARWIN, TypeNode, s_darwin},
+ {NULL, 0, 0, NULL}
+};
+Setting s_top = {NULL, -1, TypeNode, s_first};
+
+int oid[CTL_MAXNAME] = {CTL_VFS};
+NSString *path = @"/var/db/openafs/etc/config/settings.plist";
+
+char *oidString(int *oid, int len);
+void init(void);
+void walk(id obj, Setting *s, int level);
+
+void
+init(void)
+{
+ int oidmax[] = {CTL_VFS, VFS_GENERIC, VFS_MAXTYPENUM};
+ int oidvfs[] = {CTL_VFS, VFS_GENERIC, VFS_CONF, 0};
+ int max;
+ struct vfsconf conf;
+ size_t len;
+ int i;
+
+ len = sizeof(max);
+ if(sysctl(oidmax, 3, &max, &len, NULL, NULL) < 0)
+ err(1, "sysctl VFS_MAXTYPENUM");
+ for(i = max; --i >= 0; ) {
+ oidvfs[3] = i;
+ len = sizeof(conf);
+ if(sysctl(oidvfs, 4, &conf, &len, NULL, NULL) < 0)
+ continue;
+ if(strcmp("afs", conf.vfc_name) == 0) {
+ s_top.selector = conf.vfc_typenum;
+ break;
+ }
+ }
+ if(s_top.selector < 0)
+ errx(1, "AFS is not loaded");
+}
+
+char *
+oidString(int *oid, int len)
+{
+ static char buf[256];
+ char *cp = buf;
+
+ for(;;) {
+ sprintf(cp, "%d", *oid++);
+ if(--len <= 0)
+ break;
+ cp += strlen(cp);
+ *cp++ = '.';
+ }
+ return buf;
+}
+
+void
+walk(id obj, Setting *s, int level)
+{
+ Setting *child;
+ id newobj;
+ int intval;
+ const char *cp;
+ int level1 = level + 1;
+
+ oid[level] = s->selector;
+ switch(s->type) {
+ case TypeNode:
+ for(child = s->children; child->key; child++) {
+ if(child->type == TypeNode && !child->children)
+ continue;
+ newobj = [obj objectForKey: child->key];
+ if(newobj)
+ walk(newobj, child, level1);
+ }
+ break;
+ case TypeNum:
+ intval = [obj intValue];
+ if(sysctl(oid, level1, NULL, NULL, &intval, sizeof(intval)) < 0)
+ err(1, "sysctl %s => %d", oidString(oid, level1), intval);
+ break;
+ case TypeStr:
+ cp = [obj UTF8String];
+ if(sysctl(oid, level1, NULL, NULL, (void *)cp, strlen(cp)) < 0)
+ err(1, "sysctl %s => %s", oidString(oid, level1), cp);
+ break;
+ }
+}
+
+main()
+{
+ NSData *plistData;
+ id plist;
+ NSString *error;
+ NSPropertyListFormat format;
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+
+ init();
+ plistData = [NSData dataWithContentsOfFile: path];
+ if(plistData) {
+ plist = [NSPropertyListSerialization propertyListFromData: plistData
+ mutabilityOption: NSPropertyListImmutable
+ format: &format
+ errorDescription: &error
+ ];
+ if(plist)
+ walk(plist, &s_top, 1);
+ else
+ errx(1, "%s: %s", [path UTF8String], [error UTF8String]);
+ }
+
+ [pool release];
+ return 0;
+}
#!/bin/sh
+# Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
if [ -z "$1" ]; then
echo Usage: buildpkg binary-dir
fi
BINDEST=$1
RESSRC=`pwd`
-if [ ! -f /usr/bin/package ]; then
- echo "/usr/bin/package does not exist. Please run this script on a MacOS X system"
- echo "with the BSD subsystem installed"
- exit 1
-fi
-if grep -q 'set resDir = ""' /usr/bin/package ; then
- echo /usr/bin/package is buggy.
- echo remove the line \''set resDir = ""'\' from /usr/bin/package and try again
- exit 1
+majorvers=`uname -r | sed 's/\..*//'`
+if [ $majorvers -ge 7 ]; then
+ SEP=:
+ package=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
+ if [ ! -x $package ]; then
+ echo "PackageMaker does not exist. Please run this script on a MacOS X system"
+ echo "with the DeveloperTools package installed"
+ exit 1
+ fi
+else
+ SEP=.
+ package=/usr/bin/package
+ if [ ! -f $package ]; then
+ echo "$package does not exist. Please run this script on a MacOS X system"
+ echo "with the BSD subsystem installed"
+ exit 1
+ fi
+ if grep -q 'set resDir = ""' $package ; then
+ echo $package is buggy.
+ echo remove the line \''set resDir = ""'\' from $package and try again
+ exit 1
+ fi
fi
if [ -x /usr/bin/curl ]; then
mkdir -p $PKGROOT $PKGRES
mkdir $PKGROOT/Library
-chown -R root.admin $PKGROOT
+chown -R root${SEP}admin $PKGROOT
chmod -R 775 $PKGROOT
mkdir $PKGROOT/Library/OpenAFS $PKGROOT/Library/OpenAFS/Tools
cd $BINDEST
pax -rw * $PKGROOT/Library/OpenAFS/Tools
cd $RESSRC
-mkdir $PKGROOT/Library
mkdir $PKGROOT/Library/StartupItems
mkdir $PKGROOT/Library/StartupItems/OpenAFS
cp $BINDEST/root.client/usr/vice/etc/afs.rc $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS
chmod a+x $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS
cp $BINDEST/root.client/usr/vice/etc/StartupParameters.plist $PKGROOT/Library/StartupItems/OpenAFS/StartupParameters.plist
-chown -R root.admin $PKGROOT/Library
+chown -R root${SEP}admin $PKGROOT/Library
chmod -R o-w $PKGROOT/Library
chmod -R g+w $PKGROOT/Library
-chown -R root.wheel $PKGROOT/Library/OpenAFS/Tools
+chown -R root${SEP}wheel $PKGROOT/Library/OpenAFS/Tools
chmod -R og-w $PKGROOT/Library/OpenAFS/Tools
mkdir $PKGROOT/private $PKGROOT/private/var $PKGROOT/private/var/db
mkdir $PKGROOT/private/var/db/openafs/etc $PKGROOT/private/var/db/openafs/etc/config
cp $RESSRC/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master
echo andrew.cmu.edu > $PKGROOT/private/var/db/openafs/etc/ThisCell.sample
-echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
+if [ $majorvers -ge 7 ]; then
+ echo /afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
+ make AFSINCLUDE=$BINDEST/include
+ cp afssettings $PKGROOT/private/var/db/openafs/etc/config
+ cp settings.plist $PKGROOT/private/var/db/openafs/etc/config/settings.plist.orig
+ make clean
+else
+ echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
+fi
#echo '-stat 2000 -dcache 800 -daemons 3 -volumes 70 -rootvol root.afs.local' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample
strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext $PKGROOT/private/var/db/openafs/etc
-chown -R root.wheel $PKGROOT/private
+chown -R root${SEP}wheel $PKGROOT/private
chmod -R og-w $PKGROOT/private
chmod og-rx $PKGROOT/private/var/db/openafs/cache
ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd
-chown -R root.wheel $PKGROOT/usr
+chown -R root${SEP}wheel $PKGROOT/usr
chmod -R og-w $PKGROOT/usr
-cp License.rtf ReadMe.rtf OpenAFS.post_install OpenAFS.pre_upgrade $PKGRES
-cp OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade
-chmod a+x $PKGRES/OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade $PKGRES/OpenAFS.pre_upgrade
+if [ $majorvers -ge 7 ]; then
+ cp OpenAFS.post_install $PKGRES/postinstall
+ cp OpenAFS.pre_upgrade $PKGRES/preupgrade
+ cp OpenAFS.post_install $PKGRES/postupgrade
+ chmod a+x $PKGRES/postinstall $PKGRES/postupgrade $PKGRES/preupgrade
+else
+ cp OpenAFS.post_install OpenAFS.pre_upgrade $PKGRES
+ cp OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade
+ chmod a+x $PKGRES/OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade $PKGRES/OpenAFS.pre_upgrade
+fi
+cp License.rtf ReadMe.rtf $PKGRES
cp csrvdbmerge.pl $PKGRES
chmod a+x $PKGRES/csrvdbmerge.pl
cp CellServDB.list $PKGRES
-chown -R root.wheel $PKGRES
+chown -R root${SEP}wheel $PKGRES
rm -rf OpenAFS.pkg
-echo /usr/bin/package $PKGROOT OpenAFS.info -r $PKGRES
-/usr/bin/package $PKGROOT OpenAFS.info -r $PKGRES
-#old versions of package didn't handle this properly
-if [ ! -r OpenAFS.pkg/Contents ]; then
- mkdir OpenAFS.pkg/Contents OpenAFS.pkg/Contents/Resources
- mv OpenAFS.pkg/OpenAFS.* OpenAFS.pkg/Contents/Resources
- mv OpenAFS.pkg/*.rtf OpenAFS.pkg/Contents/Resources
- mv OpenAFS.pkg/csrvdbmerge.pl OpenAFS.pkg/Contents/Resources
- mv OpenAFS.pkg/CellServDB* OpenAFS.pkg/Contents/Resources
+if [ $majorvers -ge 7 ]; then
+ echo $package -build -p $RESSRC/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
+ -i OpenAFS.Info.plist -d OpenAFS.Description.plist
+ $package -build -p $RESSRC/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
+ -i OpenAFS.Info.plist -d OpenAFS.Description.plist
+else
+ echo $package $PKGROOT OpenAFS.info -r $PKGRES
+ $package $PKGROOT OpenAFS.info -r $PKGRES
+ #old versions of package didn't handle this properly
+ if [ ! -r OpenAFS.pkg/Contents ]; then
+ mkdir OpenAFS.pkg/Contents OpenAFS.pkg/Contents/Resources
+ mv OpenAFS.pkg/OpenAFS.* OpenAFS.pkg/Contents/Resources
+ mv OpenAFS.pkg/*.rtf OpenAFS.pkg/Contents/Resources
+ mv OpenAFS.pkg/csrvdbmerge.pl OpenAFS.pkg/Contents/Resources
+ mv OpenAFS.pkg/CellServDB* OpenAFS.pkg/Contents/Resources
+ fi
fi
rm -rf pkgroot pkgres
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Darwin</key>
+ <dict>
+ <key>All</key>
+ <dict>
+ <key>RealModes</key>
+ <false/>
+ </dict>
+ </dict>
+</dict>
+</plist>
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
TOP_LIBDIR=@TOP_LIBDIR@
testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
case "$(SYS_NAME)" in \
- ppc_darwin_12 ) \
+ *_darwin_12 ) \
$(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \
* ) \
$(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \
* rpc_scan.c, Scanner for the RPC protocol compiler
* Copyright (C) 1987, Sun Microsystems, Inc.
*/
+
+/* Portions Copyright (c) 2003 Apple Computer, Inc. */
#include <afsconfig.h>
#include <afs/param.h>
if (commenting) {
break;
} else if (cppline(curline)) {
+#if defined(AFS_DARWIN_ENV)
+ if (strncmp(curline, "#pragma", 7) == 0)
+ continue;
+#endif /* defined(AFS_DARWIN_ENV) */
docppline(curline, &linenum,
&infilename);
} else if (directive(curline)) {
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
# */
INCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
rxkad.h v5gen.h
-OBJS=rxkad_client.o rxkad_server.o rxkad_common.o ticket.o rxkad_errs.o \
+OBJS=rxkad_client.o rxkad_server.o rxkad_common.o rxkad_errs.o \
fcrypt.o crypt_conn.o ticket.o ticket5.o crc.o
fc_test_OBJS=fc_test.o
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
# This is a pthread safe library containing rx, rxkad and des.
/usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
- sgi_* | ppc_darwin* ) \
+ sgi_* | *_darwin_* ) \
${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \
alpha_dux?? ) \
${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
# System calls.
/usr/ccs/lib/cpp ${SFLAGS} syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
- sgi_* |ppc_darwin* ) \
+ sgi_* |*_darwin_* ) \
${CC} ${CFLAGS} -c syscall.s;; \
alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \
${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER syscall.s; \
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
DIROBJS=buffer.o dir.o salvage.o
VOLOBJS= vnode.o volume.o vutil.o partition.o fssync.o purge.o \
- clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o
+ clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o \
+ ${EXTRA_VLIBOBJS}
FSINTOBJS= afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o
devname.o: ${VOL}/devname.c
${COMPILE}
+# only for darwin
+fstab.o: ${VOL}/fstab.c
+ ${COMPILE}
+
common.o: ${VOL}/common.c
${COMPILE}
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
#include <afsconfig.h>
*/
/* This table needs to be in lexical order to efficiently map back from
* characters to the numerical value.
+ *
+ * In c_reverse, we use 99 to represent an illegal value, rather than -1
+ * which would assume "char" is signed.
*/
+#ifdef AFS_DARWIN_ENV
+static char c_xlate[80] =
+ "!\"#$%&()*+,-0123456789:;<=>?@[]^_`abcdefghijklmnopqrstuvwxyz{|}~";
+static char c_reverse[] = {
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 0, 1, 2, 3, 4, 5, 99, 6, 7, 8, 9, 10, 11, 99, 99,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 29, 99, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99
+};
+#else /* AFS_DARWIN_ENV */
static char c_xlate[80] =
"+=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+static char c_reverse[] = {
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 0, 99, 99, 99, 99,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99, 99, 99, 1, 99, 99,
+ 99, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 99, 99, 99, 99, 99,
+ 99, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99
+};
+#endif /* AFS_DARWIN_ENV */
/* int_to_base64
* Create a base 64 string representation of a number.
}
-/* Mapping: +=0, ==1, 0-9 = 2-11, A-Z = 12-37, a-z = 38-63 */
#ifdef AFS_64BIT_ENV
afs_int64 flipbase64_to_int64(char *s)
#else
#endif
int shift;
- for (shift = 0; *s; s++, shift += 6) {
- if (*s == '+') n = 0;
- else if (*s == '=') n = 1;
- else if (*s <= '9') {
- n = 2 + (int)(*s - '0');
- }
- else if (*s <= 'Z') {
- n = 12 + (int)(*s - 'A');
- }
- else if (*s <= 'z') {
- n = 38 + (int)(*s - 'a');
- }
+ for (shift = 0; *s; s++) {
+ n = c_reverse[*(unsigned char *)s];
+ if (n >= 64) /* should never happen */
+ continue;
n <<= shift;
result |= n ;
+ shift += 6;
}
return result;
}
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
+#include <afsconfig.h>
+#include <afs/param.h>
+
#define _POSIX_PTHREAD_SEMANTICS
#include <assert.h>
#include <stdio.h>
#include "pthread_nosigs.h"
+/*------------------------------------------------------------------------
+ * Under Darwin 6.x (including 7.0), sigwait() is broken, so we use
+ * sigsuspend() instead. We also don't block signals we don't know
+ * about, so they should kill us, rather than us returning zero status.
+ *------------------------------------------------------------------------*/
+
static pthread_t softsig_tid;
static struct {
void (*handler) (int);
int pending;
+#if !defined(AFS_DARWIN60_ENV)
int fatal;
+#endif /* !defined(AFS_DARWIN60_ENV) */
int inited;
} softsig_sigs[NSIG];
pthread_sigmask (SIG_BLOCK, &ss, &os);
pthread_sigmask (SIG_SETMASK, &os, NULL);
sigaddset (&ss, SIGUSR1);
+#if defined(AFS_DARWIN60_ENV)
+ pthread_sigmask (SIG_BLOCK, &ss, NULL);
+ sigdelset (&os, SIGUSR1);
+#else /* !defined(AFS_DARWIN60_ENV) */
for (i = 0; i < NSIG; i++) {
if (!sigismember(&os, i) && i != SIGSTOP && i != SIGKILL) {
sigaddset(&ss, i);
softsig_sigs[i].fatal = 1;
}
}
+#endif /* defined(AFS_DARWIN60_ENV) */
while (1) {
void (*h) (int) = NULL;
for (i = 0; i < NSIG; i++) {
if (softsig_sigs[i].handler && !softsig_sigs[i].inited) {
sigaddset(&ss, i);
+#if defined(AFS_DARWIN60_ENV)
+ pthread_sigmask (SIG_BLOCK, &ss, NULL);
+ sigdelset (&os, i);
+#endif /* defined(AFS_DARWIN60_ENV) */
softsig_sigs[i].inited = 1;
}
if (softsig_sigs[i].pending) {
}
}
if (i == NSIG) {
+#if defined(AFS_DARWIN60_ENV)
+ sigsuspend (&os);
+#else /* !defined(AFS_DARWIN60_ENV) */
sigwait (&ss, &sigw);
if (sigw != SIGUSR1) {
if (softsig_sigs[sigw].fatal)
exit(0);
softsig_sigs[sigw].pending=1;
}
+#endif /* defined(AFS_DARWIN60_ENV) */
} else if (h)
h (i);
}
}
+#if defined(AFS_DARWIN60_ENV)
+static void
+softsig_usr1 (int signo)
+{
+ signal (SIGUSR1, softsig_usr1);
+}
+#endif /* defined(AFS_DARWIN60_ENV) */
+
void
softsig_init ()
{
rc = pthread_create (&softsig_tid, NULL, &softsig_thread, NULL);
assert(0 == rc);
AFS_SIGSET_RESTORE();
+#if defined(AFS_DARWIN60_ENV)
+ signal (SIGUSR1, softsig_usr1);
+#endif /* defined(AFS_DARWIN60_ENV) */
}
static void
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
@case ${SYS_NAME} in \
alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun*) \
echo "Don't install fileserver for ${SYS_NAME}" ;; \
+ *_darwin_[1-6][0-9]) \
+ echo ${INSTALL} -ns $? $@ ; \
+ ${INSTALL} -ns $? $@ ;; \
+ *_darwin_*) \
+ echo "Don't install fileserver for ${SYS_NAME}" ;; \
*) \
echo ${INSTALL} -ns $? $@ ; \
${INSTALL} -ns $? $@ ;; \
@case ${SYS_NAME} in \
alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun*) \
echo "Don't install fileserver for ${SYS_NAME}" ;; \
+ *_darwin_[1-6][0-9]) \
+ echo ${INSTALL} -ns $? $@ ; \
+ ${INSTALL} -ns $? $@ ;; \
+ *_darwin_*) \
+ echo "Don't install fileserver for ${SYS_NAME}" ;; \
*) \
echo ${INSTALL} -ns $? $@ ; \
${INSTALL} -ns $? $@ ;; \
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
DEST=@DEST@
TOP_INCDIR=@TOP_INCDIR@
VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync.o purge.o \
clone.o nuke.o devname.o listinodes.o common.o ihandle.o \
- namei_ops.o
+ namei_ops.o ${EXTRA_VLIBOBJS}
OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1980, 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(AFS_DARWIN_ENV)
+/*-----------------------------------------------------------------------
+ * This version of fstab.c is intended to be used on Darwin systems to
+ * replace getfsent() and family. It has been modified so that rather
+ * than read /etc/fstab, it calls getfsstat() to get the real list of
+ * mounted volumes.
+ *-----------------------------------------------------------------------*/
+
+#include <errno.h>
+#include <fstab.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
+
+#define STDERR_FILENO 2
+
+static struct fstab _fs_fstab;
+static struct statfs *_fs_buf;
+static struct statfs *_fs_ptr;
+static int _fs_count;
+
+static error __P((int));
+static fstabscan __P((void));
+
+static
+fstabscan()
+{
+ if(_fs_count <= 0)
+ return(0);
+ _fs_fstab.fs_spec = _fs_ptr->f_mntfromname;
+ _fs_fstab.fs_file = _fs_ptr->f_mntonname;
+ _fs_fstab.fs_vfstype = _fs_ptr->f_fstypename;
+ _fs_fstab.fs_mntops = _fs_ptr->f_fstypename; // no mount options given
+ _fs_fstab.fs_type = (_fs_ptr->f_flags & MNT_RDONLY) ? FSTAB_RO : FSTAB_RW;
+ _fs_fstab.fs_freq = 0;
+ _fs_fstab.fs_passno = 0;
+
+ _fs_ptr++;
+ _fs_count--;
+ return(1);
+}
+
+struct fstab *
+getfsent()
+{
+ if (!_fs_buf && !setfsent() || !fstabscan())
+ return((struct fstab *)NULL);
+ return(&_fs_fstab);
+}
+
+struct fstab *
+getfsspec(name)
+ register const char *name;
+{
+ if (setfsent())
+ while (fstabscan())
+ if (!strcmp(_fs_fstab.fs_spec, name))
+ return(&_fs_fstab);
+ return((struct fstab *)NULL);
+}
+
+struct fstab *
+getfsfile(name)
+ register const char *name;
+{
+ if (setfsent())
+ while (fstabscan())
+ if (!strcmp(_fs_fstab.fs_file, name))
+ return(&_fs_fstab);
+ return((struct fstab *)NULL);
+}
+
+setfsent()
+{
+ long bufsize;
+
+ if (_fs_buf) {
+ free(_fs_buf);
+ _fs_buf = NULL;
+ }
+ if((_fs_count = getfsstat(NULL, 0, MNT_WAIT)) < 0) {
+ error(errno);
+ return(0);
+ }
+ bufsize = (long)_fs_count * sizeof(struct statfs);
+ if((_fs_buf = malloc(bufsize)) == NULL) {
+ error(errno);
+ return(0);
+ }
+ if(getfsstat(_fs_buf, bufsize, MNT_WAIT) < 0) {
+ error(errno);
+ return(0);
+ }
+ _fs_ptr = _fs_buf;
+ return(1);
+}
+
+void
+endfsent()
+{
+ if (_fs_buf) {
+ free(_fs_buf);
+ _fs_buf = NULL;
+ }
+ _fs_count = 0;
+}
+
+static
+error(err)
+ int err;
+{
+ char *p;
+
+ (void)write(STDERR_FILENO, "fstab: ", 7);
+ (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1);
+ (void)write(STDERR_FILENO, ": ", 1);
+ p = strerror(err);
+ (void)write(STDERR_FILENO, p, strlen(p));
+ (void)write(STDERR_FILENO, "\n", 1);
+}
+#endif /* defined(AFS_DARWIN_ENV) */
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
+ *
+ * Portions Copyright (c) 2003 Apple Computer, Inc.
*/
/*
unsigned int *globalMask;
int globalMaskIndex;
#endif /* defined(AFS_HPUX_ENV) */
+#if defined(AFS_DARWIN_ENV)
+ char lockfile[MAXPATHLEN];
+#endif /* defined(AFS_DARWIN_ENV) */
if (!dp) return; /* no partition, will fail later */
if (dp->lock_fd != -1) return;
#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV)
partitionName = dp->devName;
code = O_RDWR;
+#elif defined(AFS_DARWIN_ENV)
+ strlcpy((partitionName = lockfile), dp->name, sizeof(lockfile));
+ strlcat(lockfile, "/.lock.afs", sizeof(lockfile));
+ code = O_RDONLY | O_CREAT;
#else
partitionName = dp->name;
code = O_RDONLY;
#endif
for (retries=25; retries; retries--) {
+#if defined(AFS_DARWIN_ENV)
+ dp->lock_fd = open(partitionName, code, 0600);
+#else /* ! defined(AFS_DARWIN_ENV) */
dp->lock_fd = open(partitionName, code);
+#endif /* defined(AFS_DARWIN_ENV) */
if (dp->lock_fd != -1) break;
pausing.tv_sec = 0;
pausing.tv_usec = 500000;