From 611868a378cccd7bb839cccdde18fa0dd9032482 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Mon, 27 Apr 2009 19:31:52 +0000 Subject: [PATCH] DEVEL15-dragonfly-bsd-userland-20090427 LICENSE IPL10 FIXES 124702 add support for dragonflyBSD's userland (cherry picked from commit 25f13f38064bf38ed89332b38c53c740475db87d) --- acinclude.m4 | 13 +++ src/afs/DFBSD/osi_prototypes.h | 22 ++++ src/afs/UKERNEL/afs_usrops.c | 7 ++ src/afs/afs.h | 2 + src/afs/afs_prototypes.h | 4 +- src/afsd/afsd.c | 2 + src/auth/cellconfig.c | 3 +- src/cf/osconf.m4 | 13 +++ src/config/afs_sysnames.h | 3 + src/config/param.i386_dfbsd_23.h | 179 +++++++++++++++++++++++++++++ src/libafs/MakefileProto.DFBSD.in | 103 +++++++++++++++++ src/libuafs/MakefileProto.DFBSD.in | 46 ++++++++ src/lwp/waitkey.c | 15 +++ src/pam/afs_auth.c | 2 +- src/pam/afs_password.c | 2 +- src/pam/afs_setcred.c | 2 +- src/pam/test_pam.c | 2 +- src/platform/DFBSD/Makefile.in | 14 +++ src/rx/rx_getaddr.c | 8 +- src/rx/rx_packet.h | 2 +- src/ubik/ubikclient.c | 1 + src/util/hostparse.c | 1 + src/util/vice.h | 2 +- 23 files changed, 439 insertions(+), 9 deletions(-) create mode 100644 src/afs/DFBSD/osi_prototypes.h create mode 100644 src/config/param.i386_dfbsd_23.h create mode 100644 src/libafs/MakefileProto.DFBSD.in create mode 100644 src/libuafs/MakefileProto.DFBSD.in create mode 100644 src/platform/DFBSD/Makefile.in diff --git a/acinclude.m4 b/acinclude.m4 index e1a93a9cdc..2c2ddd4541 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -492,6 +492,10 @@ case $system in MKAFS_OSTYPE=OBSD AC_MSG_RESULT(i386_obsd) ;; + *-dragonfly*) + MKAFS_OSTYPE=DFBSD + AC_MSG_RESULT(i386_dfbsd) + ;; *) AC_MSG_RESULT($system) ;; @@ -526,6 +530,12 @@ else vm=${v#*.} AFS_SYSNAME="amd64_fbsd_${vM}${vm}" ;; + i386-*-dragonfly2.2*) + AFS_SYSNAME="i386_dfbsd_23" + ;; + i386-*-dragonfly2.3*) + AFS_SYSNAME="i386_dfbsd_23" + ;; i?86-*-netbsd*1.5*) AFS_PARAM_COMMON=param.nbsd15.h AFS_SYSNAME="i386_nbsd15" @@ -1368,6 +1378,9 @@ PTHREAD_LIBS=error if test "x$MKAFS_OSTYPE" = OBSD; then PTHREAD_LIBS="-pthread" fi +if test "x$MKAFS_OSTYPE" = xDFBSD; then + PTHREAD_LIBS="-pthread" +fi if test "x$PTHREAD_LIBS" = xerror; then AC_CHECK_LIB(pthread, pthread_attr_init, PTHREAD_LIBS="-lpthread") diff --git a/src/afs/DFBSD/osi_prototypes.h b/src/afs/DFBSD/osi_prototypes.h new file mode 100644 index 0000000000..2cfdf0a72f --- /dev/null +++ b/src/afs/DFBSD/osi_prototypes.h @@ -0,0 +1,22 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * 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 + */ +/* + * osi_prototypes.h + * + * Exported support routines. + */ +#ifndef _OSI_PROTO_H_ +#define _OSI_PROTO_H_ + +/* osi_file.c */ +extern afs_rwlock_t afs_xosi; + + + +#endif /* _OSI_PROTO_H_ */ diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 466a6c1b25..15b1367f61 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -1,3 +1,4 @@ + /* * Copyright 2000, International Business Machines Corporation and others. * All Rights Reserved. @@ -1314,8 +1315,13 @@ SweepAFSCache(int *vFilesFound) for (currp = readdir(cdirp); currp; currp = readdir(cdirp)) { if (afsd_debug) { printf("%s: Current directory entry:\n", rn); +#if defined(AFS_USR_DFBSD_ENV) + printf("\tinode=%d, name='%s'\n", currp->d_ino, + currp->d_name); +#else printf("\tinode=%d, reclen=%d, name='%s'\n", currp->d_ino, currp->d_reclen, currp->d_name); +#endif } /* @@ -2066,6 +2072,7 @@ uafs_SetTokens(char *tbuffer, int tlen) iob.in_size = tlen; iob.out = &outbuf[0]; iob.out_size = sizeof(outbuf); + rc = call_syscall(AFSCALL_PIOCTL, 0, _VICEIOCTL(3), (long)&iob, 0, 0); if (rc != 0) { errno = rc; diff --git a/src/afs/afs.h b/src/afs/afs.h index 9396631555..d410aa169d 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -782,7 +782,9 @@ struct vcache { struct lock__bsd__ rwlock; #endif #ifdef AFS_XBSD_ENV +#if !defined(AFS_DFBSD_ENV) struct lock rwlock; +#endif #endif struct VenusFid *mvid; /* Either parent dir (if root) or root (if mt pt) */ diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 69ddcf2e8d..e8dbc3dc9f 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -690,10 +690,12 @@ extern void shutdown_osifile(void); /* ARCH/osi_groups.c */ -#ifdef AFS_XBSD_ENV +#if defined AFS_XBSD_ENV +#if !defined(AFS_DFBSD_ENV) || !defined(UKERNEL) extern int setpag(struct proc *proc, struct ucred **cred, afs_uint32 pagvalue, afs_uint32 * newpag, int change_parent); #endif +#endif /* ARCH/osi_vm.c */ diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 11ac16d0e8..3316c78c3a 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -983,6 +983,8 @@ doSweepAFSCache(int *vFilesFound, #ifdef AFS_SGI62_ENV printf("\tinode=%" AFS_INT64_FMT ", reclen=%d, name='%s'\n", currp->d_ino, currp->d_reclen, currp->d_name); +#elif defined(AFS_DFBSD_ENV) + printf("\tinode=%d, name='%s'\n", currp->d_ino, currp->d_name); #else printf("\tinode=%d, reclen=%d, name='%s'\n", currp->d_ino, currp->d_reclen, currp->d_name); diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index 0bf5c3841f..e6f922ff90 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -20,6 +20,7 @@ RCSID #include "afsincludes.h" #include "des/des.h" #include "rx/rxkad.h" +#include #else /* UKERNEL */ #include #ifdef AFS_NT40_ENV @@ -234,7 +235,7 @@ afsconf_FindService(register const char *aname) #if defined(AFS_OSF_ENV) ts = getservbyname(aname, ""); #else - ts = getservbyname(aname, NULL); + ts = (struct servent *) getservbyname(aname, NULL); #endif if (ts) { /* we found it in /etc/services, so we use this value */ diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 392cc3577a..5b62e82feb 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -254,6 +254,19 @@ case $AFS_SYSNAME in YACC="byacc" ;; + i386_dfbsd_*) + LEX="flex -l" + MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' + MT_LIBS="-pthread" + PAM_OPTMZ=-O2 + PAM_CFLAGS="-pipe -fPIC" + SHLIB_LDFLAGS="-shared -Xlinker -x" + SHLIB_LINKER="${MT_CC} -shared" + TXLIBS="-lncurses" + XCFLAGS="-pipe" + YACC="byacc" + ;; + amd64_fbsd_*) LEX="flex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 09961fd843..3925aca7c0 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -279,6 +279,9 @@ #define SYS_NAME_ID_arm_linux24 3802 #define SYS_NAME_ID_arm_linux26 3803 +#define SYS_NAME_ID_i386_dfbsd_22 3900 +#define SYS_NAME_ID_i386_dfbsd_23 3901 + /* * Placeholder to keep system-wide standard flags since this file is included by all * files (i.e in afs/param.h) diff --git a/src/config/param.i386_dfbsd_23.h b/src/config/param.i386_dfbsd_23.h new file mode 100644 index 0000000000..f19a80fcd9 --- /dev/null +++ b/src/config/param.i386_dfbsd_23.h @@ -0,0 +1,179 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +/* Machine / Operating system information */ +#define SYS_NAME "i386_dfbsd_23" +#define SYS_NAME_ID SYS_NAME_ID_i386_dfbsd_23 + +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + + +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +#ifndef IGNORE_STDS_H +#include +#endif + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_DFBSD_ENV 1 +#define AFS_DFBSD22_ENV 1 +#define AFS_DFBSD23_ENV 1 +#define AFS_X86_DFBSD_ENV 1 +#define AFS_X86_DFBSD22_ENV 1 +#define AFS_X86_DFBSD23_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_NONFSTRANS 1 +#define FTRUNC O_TRUNC + +#define IUPD 0x0010 +#define IACC 0x0020 +#define ICHG 0x0040 +#define IMOD 0x0080 + +#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ + NULL, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + NULL, curproc) + +#include + +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 339 +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif + +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 0 /* are group id's short? */ +#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) osi_fbsd_alloc((x), 1) +#undef AFS_KALLOC_NOSLEEP +#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0) +#define AFS_KFREE(x,y) osi_fbsd_free((x)) +#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 + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl { NONEXCL, EXCL }; + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_USR_DFBSD22_ENV 1 +#define AFS_USR_DFBSD23_ENV 1 +#define AFS_USR_DFBSD_ENV 1 +#define AFS_NONFSTRANS 1 + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 339 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +#include + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* !defined(UKERNEL) */ + +/* general user-space compiles */ + +#if defined(UKERNEL) || !defined(KERNEL) +#define STDLIB_HAS_MALLOC_PROTOS 1 +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/libafs/MakefileProto.DFBSD.in b/src/libafs/MakefileProto.DFBSD.in new file mode 100644 index 0000000000..d9293e401d --- /dev/null +++ b/src/libafs/MakefileProto.DFBSD.in @@ -0,0 +1,103 @@ +# Copyright 2000, International Business Machines Corporation and others. +# All Rights Reserved. +# +# 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 +# +srcdir=@srcdir@ +include @TOP_OBJDIR@/src/config/Makefile.config + + +# OS specific object files: +AFS_OS_OBJS = \ + osi_groups.o \ + osi_file.o \ + osi_inode.o \ + osi_misc.o \ + osi_sleep.o \ + osi_vm.o \ + osi_vnodeops.o \ + osi_module.o + +#AFS_OS_NFSOBJS = \ +# osi_vfsops_nfs.o + +AFS_OS_NONFSOBJS = \ + osi_vfsops.o + + +# System specific build commands and flags +KSRC = @BSD_KERNEL_PATH@ +KBLD = @BSD_KERNEL_BUILD@ + +KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \ + -elf + +DBUG = -O2 +DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT +CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} + + +# Name of directory to hold object files and libraries. +KOBJ = MODLOAD + +# This tells Makefile.common to use it's single directory build target. +COMPDIRS = single_compdir +INSTDIRS = single_instdir +DESTDIRS = single_destdir + +#include Makefile.common +all: + echo "skipping" + +setup: + echo "skipping" + +# Below this line are targets when in the COMMON directory: +LIBAFS = libafsnfs.ko +LIBAFSNONFS = libafs.ko + +INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS} +INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS} + +DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS} +DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS} + + +# Without this line, gmake tries to build libafs +.PHONY: libafs + +# libafs: $(LIBAFS) $(LIBAFSNONFS) +libafs: $(LIBAFSNONFS) +# install_libafs: $(INST_LIBAFS) $(INST_LIBAFSNONFS) +install_libafs: $(INST_LIBAFSNONFS) +# dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS) +dest_libafs: $(DEST_LIBAFSNONFS) +#libafs: +# echo WARNING: No kernel module for ${SYS_NAME} + +#install_libafs: +# echo WARNING: No kernel module for ${SYS_NAME} + +#dest_libafs: +# echo WARNING: No kernel module for ${SYS_NAME} + + +$(INST_LIBAFS): $(LIBAFS) + $(INSTALL) -f $? $@ + +$(INST_LIBAFSNONFS): $(LIBAFSNONFS) + $(INSTALL) -f $? $@ + +$(DEST_LIBAFS): $(LIBAFS) + $(INSTALL) -f $? $@ + +$(DEST_LIBAFSNONFS): $(LIBAFSNONFS) + $(INSTALL) -f $? $@ + +${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS) + echo "Skipping kernel module build" + +${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS) + echo "Skipping kernel module build" diff --git a/src/libuafs/MakefileProto.DFBSD.in b/src/libuafs/MakefileProto.DFBSD.in new file mode 100644 index 0000000000..fd8b6dfe2c --- /dev/null +++ b/src/libuafs/MakefileProto.DFBSD.in @@ -0,0 +1,46 @@ +# Copyright 2000, International Business Machines Corporation and others. +# All Rights Reserved. +# +# 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 +# +srcdir=@srcdir@ +include @TOP_OBJDIR@/src/config/Makefile.config + + +# System specific build commands and flags +CC = @CC@ +DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL +KOPTS= +CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} +OPTF=-O +# WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD + +TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_DFFBSD_ENV +TEST_LDFLAGS= +TEST_LIBS=-lpthread + + +LIBUAFS = libuafs.a +LIBJUAFS = libjuafs.a +LIBAFSWEB = nsafs.so +LIBAFSWEBKRB = nsafs.krb.so + +include Makefile.common + +$(LIBUAFS): $(UAFSOBJ) + -$(RM) -f $(LIBUAFS) + $(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ) + +$(LIBJUAFS): $(JUAFSOBJ) + -$(RM) -f $(LIBJUAFS) + $(AR) $(ARFLAGS) $(LIBJUAFS) $(JUAFSOBJ) + +$(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a + -$(RM) -f $(LIBAFSWEB) + ld -b $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS) + +$(LIBAFSWEBKRB): $(AFSWEBOBJKRB) ${DES}/libdes.a + -$(RM) -f $(LIBAFSWEBKRB) + ld -b $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS) diff --git a/src/lwp/waitkey.c b/src/lwp/waitkey.c index 5d2a88476d..e936077c0d 100644 --- a/src/lwp/waitkey.c +++ b/src/lwp/waitkey.c @@ -166,8 +166,23 @@ LWP_WaitForKeystroke(int seconds) return 1; #else #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) +#if defined(AFS_DFBSD_ENV) + struct appx_sbuf { + unsigned char *_base; + int _size; + }; + struct APPX_FILE + { + struct __FILE_public pub; + struct appx_sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ + }; + struct APPX_FILE *appx_stdin = (struct APPX_FILE *) stdin; + if (appx_stdin->_bf._size > 0) + return 1; +#else if (stdin->_bf._size > 0) return 1; +#endif #else if (stdin->_cnt > 0) return 1; diff --git a/src/pam/afs_auth.c b/src/pam/afs_auth.c index 7f70fe70a6..ee47fbd8ac 100644 --- a/src/pam/afs_auth.c +++ b/src/pam/afs_auth.c @@ -190,7 +190,7 @@ pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, RET(PAM_AUTH_ERR); } #else -#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV) +#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV) upwd = getpwnam(user); #elif defined(_POSIX_PTHREAD_SEMANTICS) && defined(AFS_SUN5_ENV) getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf), &upwd); diff --git a/src/pam/afs_password.c b/src/pam/afs_password.c index 9fcfaa87b3..28ad33248d 100644 --- a/src/pam/afs_password.c +++ b/src/pam/afs_password.c @@ -134,7 +134,7 @@ pam_sm_chauthtok(pam_handle_t * pamh, int flags, int argc, const char **argv) RET(PAM_AUTH_ERR); } #else -#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV) +#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV) upwd = getpwnam(user); #else upwd = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf)); diff --git a/src/pam/afs_setcred.c b/src/pam/afs_setcred.c index 3ae734d92e..bf22b2cc60 100644 --- a/src/pam/afs_setcred.c +++ b/src/pam/afs_setcred.c @@ -170,7 +170,7 @@ pam_sm_setcred(pam_handle_t * pamh, int flags, int argc, const char **argv) RET(PAM_AUTH_ERR); } #else -#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV) +#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV) upwd = getpwnam(user); #else upwd = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf)); diff --git a/src/pam/test_pam.c b/src/pam/test_pam.c index 39d35cb90f..1a98f88ad7 100644 --- a/src/pam/test_pam.c +++ b/src/pam/test_pam.c @@ -34,7 +34,7 @@ static const char *service = "afstest"; static const char *new_envstring = "GOTHEREVIATESTPAM=1"; static const char *new_homestring = "HOME=/tmp"; -#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV) +#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV) #define getpassphrase getpass #endif diff --git a/src/platform/DFBSD/Makefile.in b/src/platform/DFBSD/Makefile.in new file mode 100644 index 0000000000..39ed2af858 --- /dev/null +++ b/src/platform/DFBSD/Makefile.in @@ -0,0 +1,14 @@ +# Copyright 2000, International Business Machines Corporation and others. +# All Rights Reserved. +# +# 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 + +SHELL=/bin/sh + +# We have no platform-specific stuff for this platform (yet). +all: +install: +dest: +clean: diff --git a/src/rx/rx_getaddr.c b/src/rx/rx_getaddr.c index 768543b079..cff0ae74ed 100644 --- a/src/rx/rx_getaddr.c +++ b/src/rx/rx_getaddr.c @@ -46,6 +46,11 @@ RCSID #define NIFS 512 +#if defined(AFS_USR_DFBSD_ENV) +#include +#include +#endif + #ifdef KERNEL /* only used for generating random noise */ @@ -329,7 +334,7 @@ rx_getAllAddr(afs_uint32 buffer[], int maxSize) /* this function returns the total number of interface addresses ** the buffer has to be passed in by the caller */ -#else +#else /* UKERNEL indirectly, on DARWIN or XBSD */ static int rx_getAllAddr_internal(afs_uint32 buffer[], int maxSize, int loopbacks) { @@ -338,6 +343,7 @@ rx_getAllAddr_internal(afs_uint32 buffer[], int maxSize, int loopbacks) struct ifconf ifc; struct ifreq ifs[NIFS], *ifr; struct sockaddr_in *a; + /* can't ever be AFS_DARWIN_ENV or AFS_XBSD_ENV, no? */ #if defined(AFS_AIX41_ENV) || defined (AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) char *cp, *cplim, *cpnext; /* used only for AIX 41 */ #endif diff --git a/src/rx/rx_packet.h b/src/rx/rx_packet.h index e75ea7b846..821e75af9b 100644 --- a/src/rx/rx_packet.h +++ b/src/rx/rx_packet.h @@ -41,7 +41,7 @@ #define MAX(a,b) ((a)>(b)?(a):(b)) #endif #else /* AFS_NT40_ENV */ -#if !defined(AFS_DARWIN_ENV) && !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_USR_FBSD_ENV) && !defined(AFS_LINUX20_ENV) +#if !defined(AFS_DARWIN_ENV) && !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_USR_FBSD_ENV) && !defined(AFS_USR_DFBSD_ENV) && !defined(AFS_LINUX20_ENV) #include /* MIN, MAX on Solaris */ #endif #include /* MIN, MAX elsewhere */ diff --git a/src/ubik/ubikclient.c b/src/ubik/ubikclient.c index 78131e52d0..f639b53ab0 100644 --- a/src/ubik/ubikclient.c +++ b/src/ubik/ubikclient.c @@ -28,6 +28,7 @@ RCSID #define UBIK_LEGACY_CALLITER 1 #include "ubik.h" #include "afs/pthread_glock.h" +#include #else /* defined(UKERNEL) */ #include #include diff --git a/src/util/hostparse.c b/src/util/hostparse.c index d48dc6de6e..05ddb506cf 100644 --- a/src/util/hostparse.c +++ b/src/util/hostparse.c @@ -20,6 +20,7 @@ RCSID #ifdef UKERNEL #include "afs/sysincludes.h" #include "afs/afsutil.h" +#include #else /* UKERNEL */ #include #include diff --git a/src/util/vice.h b/src/util/vice.h index f8fee69397..fdea3750b3 100644 --- a/src/util/vice.h +++ b/src/util/vice.h @@ -19,7 +19,7 @@ * between user processes and Venus. */ #include -#ifdef AFS_SUN_ENV +#if defined(AFS_SUN_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_USR_DFBSD_ENV) #include #endif