From: Sam Hartman Date: Fri, 19 Jan 2001 21:52:38 +0000 (+0000) Subject: Merge in changes from 1.0.2 X-Git-Tag: debian/1.0.2-1~17 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=39c67835156fde546a3fb130d36401626c24bb76;p=packages%2Fo%2Fopenafs.git Merge in changes from 1.0.2 --- diff --git a/src/Makefile b/src/Makefile index c77eccc9c..5ab06778b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -12,7 +12,7 @@ INSTALL=${SRCDIR}bin/install WASHTOOL=true #WASHTOOLRCSUPDATE=${WASHTOOL} rcsupdate -WASHTOOLCMD=make +WASHTOOLCMD=$(MAKE) WASHTOOLFLAGS=-argument install COMPILE_PART1=cd obj; cd diff --git a/src/afs/UKERNEL/sysincludes.h b/src/afs/UKERNEL/sysincludes.h index 2a5e9352d..6b4d953fd 100644 --- a/src/afs/UKERNEL/sysincludes.h +++ b/src/afs/UKERNEL/sysincludes.h @@ -197,10 +197,16 @@ #define EXCL usr_EXCL #define NONEXCL usr_NONEXCL #define uio_rw usr_uio_rw +#ifdef ino_t +#undef ino_t +#endif #define ino_t usr_ino_t #define offset_t usr_offset_t #define getpid() usr_getpid() #define setpag(A,B,C,D) usr_setpag((A),(B),(C),(D)) +#ifdef pid_t +#undef pid_t +#endif #define pid_t int enum usr_vcexcl { usr_NONEXCL, usr_EXCL }; diff --git a/src/afs/VNOPS/afs_vnop_readdir.c b/src/afs/VNOPS/afs_vnop_readdir.c index c6992f18c..cd3bf6d87 100644 --- a/src/afs/VNOPS/afs_vnop_readdir.c +++ b/src/afs/VNOPS/afs_vnop_readdir.c @@ -641,7 +641,7 @@ tagain: } #else /* AFS_HPUX_ENV */ code = afs_readdir_move(ode, avc, auio, o_slen, -#ifdef defined(AFS_SUN5_ENV) +#if defined(AFS_SUN5_ENV) len, origOffset); #else auio->afsio_resid, origOffset); diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 1eeb44910..314f61788 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -44,6 +44,7 @@ extern afs_rwlock_t afs_xcbhash; extern afs_int32 afs_mariner, afs_marinerHost; extern struct srvAddr *afs_srvAddrs[NSERVERS]; extern int afs_resourceinit_flag; +extern afs_int32 cryptall; static int PBogus(), PSetAcl(), PGetAcl(), PSetTokens(), PGetVolumeStatus(); static int PSetVolumeStatus(), PFlush(), PNewStatMount(), PGetTokens(), PUnlog(); @@ -59,6 +60,7 @@ static int PSetSPrefs(), PGetSPrefs(), PGag(), PTwiddleRx(); static int PSetSPrefs33(), PStoreBehind(), PGCPAGs(); static int PGetCPrefs(), PSetCPrefs(); /* client network addresses */ static int PGetInitParams(), PFlushMount(), PRxStatProc(), PRxStatPeer(); +static int PGetRxkcrypt(), PSetRxkcrypt(); int PExportAfs(); static int HandleClientContext(struct afs_ioctl *ablob, int *com, struct AFS_UCRED **acred, struct AFS_UCRED *credp); @@ -121,6 +123,17 @@ static int (*(pioctlSw[]))() = { PFlushMount, /* 52 - flush mount symlink data */ PRxStatProc, /* 53 - control process RX statistics */ PRxStatPeer, /* 54 - control peer RX statistics */ + PGetRxkcrypt, /* 55 -- Get rxkad encryption flag */ + PSetRxkcrypt, /* 56 -- Set rxkad encryption flag */ + PNoop, /* 57 -- arla: set file prio */ + PNoop, /* 58 -- arla: fallback getfh */ + PNoop, /* 59 -- arla: fallback fhopen */ + PNoop, /* 60 -- arla: controls xfsdebug */ + PNoop, /* 61 -- arla: controls arla debug */ + PNoop, /* 62 -- arla: debug interface */ + PNoop, /* 63 -- arla: print xfs status */ + PNoop, /* 64 -- arla: force cache check */ + PNoop, /* 65 -- arla: break callback */ }; #define PSetClientContext 99 /* Special pioctl to setup caller's creds */ @@ -3121,6 +3134,46 @@ static cred_t *crget(void) return cr; } #endif + +static int +PGetRxkcrypt(avc, afun, areq, ain, aout, ainSize, aoutSize, acred) +struct vcache *avc; +int afun; +struct vrequest *areq; +char *ain, *aout; +afs_int32 ainSize; +afs_int32 *aoutSize; +struct AFS_UCRED *acred; +{ + bcopy((char *)&cryptall, aout, sizeof(afs_int32)); + *aoutSize=sizeof(afs_int32); + return 0; +} + +static int +PSetRxkcrypt(avc, afun, areq, ain, aout, ainSize, aoutSize, acred) +struct vcache *avc; +int afun; +struct vrequest *areq; +char *ain, *aout; +afs_int32 ainSize; +afs_int32 *aoutSize; +struct AFS_UCRED *acred; +{ + afs_int32 tmpval; + + if (!afs_osi_suser(acred)) + return EPERM; + if (ainSize != sizeof(afs_int32) || ain == NULL) + return EINVAL; + bcopy(ain, (char *)&tmpval, sizeof(afs_int32)); + /* if new mappings added later this will need to be changed */ + if (tmpval != 0 && tmpval != 1) + return EINVAL; + cryptall = tmpval; + return 0; +} + /* * Create new credentials to correspond to a remote user with given * . This allows a server running as root to diff --git a/src/lwp/lwp.c b/src/lwp/lwp.c index 1ff6c2d7b..7512d4691 100644 --- a/src/lwp/lwp.c +++ b/src/lwp/lwp.c @@ -925,7 +925,7 @@ static void Initialize_PCB(temp, priority, stack, stacksize, ep, parm, name) temp -> misc = NULL; /* currently unused */ temp -> next = NULL; temp -> prev = NULL; - temp -> lwp_rused = NULL; + temp -> lwp_rused = 0; temp -> level = 1; /* non-preemptable */ } diff --git a/src/rx/rx.c b/src/rx/rx.c index ace254d08..eca7a5b38 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -446,9 +446,22 @@ int rx_Init(u_int port) #else osi_GetTime(&tv); #endif - /* *Slightly* random start time for the cid. This is just to help - * out with the hashing function at the peer */ - rx_port = port; + if (port) { + rx_port = port; + } else { +#if defined(KERNEL) && !defined(UKERNEL) + /* Really, this should never happen in a real kernel */ + rx_port = 0; +#else + struct sockaddr_in addr; + int addrlen = sizeof(addr); + if (getsockname(rx_socket, (struct sockaddr *) &addr, &addrlen)) { + rx_Finalize(); + return -1; + } + rx_port = addr.sin_port; +#endif + } rx_stats.minRtt.sec = 9999999; #ifdef KERNEL rx_SetEpoch (tv.tv_sec | 0x80000000); @@ -459,6 +472,8 @@ int rx_Init(u_int port) MUTEX_ENTER(&rx_stats_mutex); rxi_dataQuota += rx_extraQuota; /* + extra pkts caller asked to rsrv */ MUTEX_EXIT(&rx_stats_mutex); + /* *Slightly* random start time for the cid. This is just to help + * out with the hashing function at the peer */ rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT); rx_connHashTable = (struct rx_connection **) htable; rx_peerHashTable = (struct rx_peer **) ptable; diff --git a/src/venus/Makefile b/src/venus/Makefile index cbaedbf5d..21229d4d9 100644 --- a/src/venus/Makefile +++ b/src/venus/Makefile @@ -159,6 +159,8 @@ cmdebug: cmdebug.o ${CMLIBS} kdump.o: kdump.c ${INCLS} AFS_component_version_number.c set -x; \ case ${SYS_NAME} in \ + *linux* ) \ + ${CC} -g -I${LINUX_SRCDIR}${LINUX_VERS}/include -I${DESTDIR}include -I${SRCDIR}include ${XCFLAGS} -c kdump.c ;; \ alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c| alpha_dux?? ) \ ${CC} -g ${CFLAGS} -I/usr/sys/include -I/usr/sys/BINARY -I/usr/sys/AFS -DDEBUGGER -c kdump.c ;;\ sgi_6? ) \