]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Merge in changes from 1.0.2
authorSam Hartman <hartmans@debian.org>
Fri, 19 Jan 2001 21:52:38 +0000 (21:52 +0000)
committerSam Hartman <hartmans@debian.org>
Fri, 19 Jan 2001 21:52:38 +0000 (21:52 +0000)
src/Makefile
src/afs/UKERNEL/sysincludes.h
src/afs/VNOPS/afs_vnop_readdir.c
src/afs/afs_pioctl.c
src/lwp/lwp.c
src/rx/rx.c
src/venus/Makefile

index c77eccc9cb56f11e1049c1227281532e110a1f6c..5ab06778b98f8dc47d01810d87016cf9d1d63386 100644 (file)
@@ -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 
index 2a5e9352dc1b8977bfc35afbe102d69617058d85..6b4d953fd8c3acc3d4a0359274f7eb0057d35cae 100644 (file)
 #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 };
index c6992f18cca4e95d253964726c2c7ecb8c4438cf..cd3bf6d87c7d60410709f580ebdb8a8cd760a893 100644 (file)
@@ -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);
index 1eeb449103eaa22ce6e0dd9e76c824fe99904174..314f61788433e263f15ac355dc541a80406362a2 100644 (file)
@@ -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
  * <hostaddr, uid, g0, g1>.  This allows a server running as root to
index 1ff6c2d7bbfd752cc4968859b56a0e45a238b5ab..7512d4691a43a572fcb4e42cfb763ac218086f60 100644 (file)
@@ -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 */
 }
 
index ace254d08559948bf16062573ba94e24abac93f4..eca7a5b380edc598f5d03c7972c31bad5ad7e3f4 100644 (file)
@@ -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;
index cbaedbf5d5c306dea21eaab38b6866351a5cef37..21229d4d92348c1e252108f64d5220cc8a73a869 100644 (file)
@@ -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? ) \