]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
This commit was generated by cvs2svn to compensate for changes in r139,
authorSam Hartman <hartmans@debian.org>
Fri, 19 Jan 2001 20:57:19 +0000 (20:57 +0000)
committerSam Hartman <hartmans@debian.org>
Fri, 19 Jan 2001 20:57:19 +0000 (20:57 +0000)
which included commits to RCS files with non-trunk default branches.

72 files changed:
src/WINNT/afsapplib/al_wizard.h
src/WINNT/afsclass/afsclassfn.cpp
src/WINNT/afsclass/afsclassfn.h
src/WINNT/afsclass/worker.h
src/WINNT/afssvrmgr/svc_create.h
src/WINNT/eventlog/lang/de_DE/event.mc
src/WINNT/eventlog/lang/en_US/event.mc
src/WINNT/eventlog/lang/es_ES/event.mc
src/WINNT/eventlog/lang/ja_JP/event.mc
src/WINNT/eventlog/lang/ko_KR/event.mc
src/WINNT/eventlog/lang/pt_BR/event.mc
src/WINNT/eventlog/lang/zh_CN/event.mc
src/WINNT/eventlog/lang/zh_TW/event.mc
src/afs/LINUX/osi_alloc.c
src/afs/LINUX/osi_groups.c
src/afs/LINUX/osi_sleep.c
src/afs/LINUX/osi_vfs.h
src/afs/LINUX/osi_vfsops.c
src/afs/SOLARIS/osi_inode.c
src/afs/SOLARIS/osi_prototypes.h
src/afs/SOLARIS/osi_vnodeops.c
src/afs/UKERNEL/osi_vfsops.c
src/afs/VNOPS/afs_vnop_attrs.c
src/afs/afs_conn.c
src/afs/afs_server.c
src/afs/afs_vcache.c
src/auth/cellconfig.c
src/comerr/et_lex.lex_nt.c
src/config/Makefile.sgi_65
src/config/Makefile.sun4x_56
src/config/Makefile.version-NOCML
src/config/afs_sysnames.h
src/config/venus.h
src/des/andrew-conf.h
src/ftpd43+/ftpd.c
src/ftpd43+/getusershell.c
src/ftpd43+/glob.c
src/inetd/inetd.c
src/kauth/admin_tools.c
src/kauth/kaprocs.c
src/kauth/krb_udp.c
src/kauth/rebuild.c
src/libafs/MakefileProto.SOLARIS
src/libafsrpc/Makefile
src/libuafs/MakefileProto.SOLARIS
src/ntp/Makefile
src/ptserver/Makefile
src/ptserver/db_verify.c
src/ptserver/ptprocs.c
src/ptserver/pts.c
src/ptserver/ptutils.c
src/ptserver/testpt.c
src/ptserver/utils.c
src/rcp/Makefile
src/rlogind/Makefile
src/rsh/Makefile
src/rsh/rcmd.c
src/rx/rx_globals.h
src/rx/rx_lwp.c
src/rx/rx_pthread.c
src/rxgen/rpc_parse.c
src/rxkad/rxkad_server.c
src/sgistuff/Makefile
src/sys/rmtsysc.c
src/ubik/ubikclient.c
src/usd/usd_file.c
src/venus/fs.c
src/vlserver/vlserver.c
src/vol/vol-salvage.c
src/vol/volume.c
src/vol/vutil.c
src/volser/dumpstuff.c

index 51ef7c5c38cf765e765fd6d46c351aa36362096f..615b027a67a2a42e5528811a073eb5e74c49da9e 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef AL_WIZARD_H
 #define AL_WIZARD_H
 
+#include <windows.h>
+#include <prsht.h>
 #include <WINNT/TaLocale.h>
 #include <WINNT/subclass.h>
 
index 6d35691990e35ac27d28c7b86d3ba9b7f3ce97a8..736c922f39795beceaf69210ca1fd2c2c9fb1e4e 100644 (file)
@@ -1952,7 +1952,7 @@ BOOL AfsClass_RenameFileset (LPIDENT lpiFileset, LPTSTR pszNewName, ULONG *pStat
 
 #define iswhite(_ch) ((_ch)==TEXT(' ') || (_ch)==TEXT('\t'))
 
-LPIDENT AfsClass_CreateService (LPIDENT lpiServer, LPTSTR pszService, LPTSTR pszCommand, LPTSTR pszParams, LPTSTR pszNotifier, SERVICETYPE type, SYSTEMTIME *pstIfCron, ULONG *pStatus)
+LPIDENT AfsClass_CreateService (LPIDENT lpiServer, LPTSTR pszService, LPTSTR pszCommand, LPTSTR pszParams, LPTSTR pszNotifier, AFSSERVICETYPE type, SYSTEMTIME *pstIfCron, ULONG *pStatus)
 {
    BOOL rc = TRUE;
    ULONG status;
index fc0743d22933a674ed07ce47db6987fec844112a..8cf44ddaf33f2ed0d8f122d61cea506f73d676de 100644 (file)
@@ -137,7 +137,7 @@ BOOL    AfsClass_GetRandomKey         (LPIDENT lpi, LPENCRYPTIONKEY pKey, ULONG
  *
  */
 
-LPIDENT AfsClass_CreateService        (LPIDENT lpiServer, LPTSTR pszService, LPTSTR pszCommand, LPTSTR pszParams, LPTSTR pszNotifier, SERVICETYPE type, SYSTEMTIME *pstIfCron, ULONG *pStatus = NULL);
+LPIDENT AfsClass_CreateService        (LPIDENT lpiServer, LPTSTR pszService, LPTSTR pszCommand, LPTSTR pszParams, LPTSTR pszNotifier, AFSSERVICETYPE type, SYSTEMTIME *pstIfCron, ULONG *pStatus = NULL);
 BOOL    AfsClass_DeleteService        (LPIDENT lpiService, ULONG *pStatus = NULL);
 
 BOOL    AfsClass_StartService         (LPIDENT lpiStart, BOOL fTemporary, ULONG *pStatus = NULL);
index 4dab13726e194daa3cfedb8f1746432472292b7e..ac61cc582d69466444aa37caae7abeb34fd1d264 100644 (file)
@@ -470,7 +470,7 @@ typedef union // WORKERPACKET
       struct {
          PVOID hServer;        // [in] token from BosServerOpen()
          LPTSTR pszService;    // [in] name of new service
-         SERVICETYPE type;     // [in] service type (stCRON, stFS, etc)
+         AFSSERVICETYPE type;  // [in] service type (stCRON, stFS, etc)
          LPTSTR pszCommand;    // [in] full command-line to execute
          LPTSTR pszTimeCron;   // [in] date/time (CRON only)
          LPTSTR pszNotifier;   // [in] command executed on exit
index 2eb27fd4307375ef756244b233e2433ffac0e7cc..0446b4ce8bee1db5f5451c4881253af3531df80b 100644 (file)
@@ -24,7 +24,7 @@ typedef struct
    TCHAR szParams[ cchNAME ];
    TCHAR szNotifier[ cchNAME ];
    TCHAR szLogFile[ cchNAME ];
-   SERVICETYPE type;
+   AFSSERVICETYPE type;
    BOOL fRunNow;
    SYSTEMTIME stIfCron;
    } SVC_CREATE_PARAMS, *LPSVC_CREATE_PARAMS;
index a9df878e0375f6b8c204a46d6f8a0e279ef3a6bb..86bc237651e41eb4a6928c52bc20767b1fa33ec6 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index 0349e6a06068171384a33433fbe51eea750a0e1c..33e3e3b6d14cde919eb1c37122048213736a5dd4 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* 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
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h
 ; */
 ;
index 95b26a0f9d9760e46cce5acc82f522f5bf90e516..fe46e4d14304e4c97987caa9da6b593d51062ee0 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index 4ca040e2c175aaebf10bb94ec4106148789a29bb..17659b37dc4b97698014afbb364accbaa3589cb5 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index 9061c9f5dd30d5af234df4387de1b839b6ddb05f..23dcd6f7bb5a32e029c84f773086f3241aaa0fe8 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index dd7f10d4ca16a1f99d33ed643bdca6c927c4e0ca..50747577ba5a6f63cc3d9db3d948ebc8ca5e453f 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index e1d2979c947ed03bd49127946c659d2470ef805c..575da8fec8f8ea4f9bee24eba3278791dab0d400 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index 4a145a485f67b6a12318e36d441bd7c29fc4dde1..08f59035f2c948906090232d3adc266566fd8390 100644 (file)
@@ -1,10 +1,9 @@
-; 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
-
+;/* Copyright 2000, International Business Machines Corporation and others.\r
+; * All Rights Reserved.\r
+; *\r
+; * This software has been released under the terms of the IBM Public\r
+; * License.  For details, see the LICENSE file in the top-level source\r
+; * directory or online at http://www.openafs.org/dl/license10.html\r
 ; * event.mc --(mc)--> event.[h|rc] --(logevent.h + event.h)--> afsevent.h\r
 ; */\r
 ;\r
index 404639a90171b48a7b82477027fa56209366f9a8..f076d7e0b72144a95da691645bb0055bc6d9cb0d 100644 (file)
@@ -199,14 +199,15 @@ static int linux_alloc_init()
 {
     /* initiate our pool of osi_linux_mem structs */
     al_mem_pool = afs_atomlist_create(sizeof(struct osi_linux_mem),
-                                  sizeof(long)*1024, vmalloc, local_free);
+                                     sizeof(long)*1024, (void *)vmalloc, 
+                                     local_free);
     if (!al_mem_pool) {
         printf("afs_osi_Alloc: Error in initialization(atomlist_create)\n");
         return 0;
     }
 
     /* initialize the hash table to hold references to alloc'ed chunks */
-    lh_mem_htab = afs_lhash_create(hash_equal, vmalloc, local_free);
+    lh_mem_htab = afs_lhash_create(hash_equal, (void *)vmalloc, local_free);
     if (!lh_mem_htab) {
         printf("afs_osi_Alloc: Error in initialization(lhash_create)\n");
         return 0;
index b20538fe668a69f70b8e8329abc10915ce7b0d82..d89069381c444bdd97b03a7cc2b96e86283e38f7 100644 (file)
@@ -129,19 +129,19 @@ asmlinkage int afs_xsetgroups(int gidsetsize, gid_t *grouplist)
 #ifdef AFS_SPARC64_LINUX20_ENV
 asmlinkage int afs_xsetgroups32(int gidsetsize, __kernel_gid_t32 *grouplist)
 {
-       gid_t gl[NGROUPS];
-       int ret, i;
-       mm_segment_t old_fs = get_fs ();
-       
-       if ((unsigned) gidsetsize > NGROUPS)
-               return -EINVAL;
-       for (i = 0; i < gidsetsize; i++, grouplist++)
-               if (__get_user (gl[i], grouplist))
-                       return -EFAULT;
-        set_fs (KERNEL_DS);
-       ret = afs_xsetgroups(gidsetsize, gl);
-       set_fs (old_fs);
-       return ret;
+    gid_t gl[NGROUPS];
+    int ret, i;
+    mm_segment_t old_fs = get_fs ();
+
+    if ((unsigned) gidsetsize > NGROUPS)
+       return -EINVAL;
+    for (i = 0; i < gidsetsize; i++, grouplist++)
+       if (__get_user (gl[i], grouplist))
+           return -EFAULT;
+    set_fs (KERNEL_DS);
+    ret = afs_xsetgroups(gidsetsize, gl);
+    set_fs (old_fs);
+    return ret;
 }
 #endif
 
index 17f1139969362a115031e763e382ed85fdaf0727..9acd27a8c4d12f35f65123e7bc131354b73f8f5e 100644 (file)
@@ -17,6 +17,7 @@
 #if defined(AFS_GLOBAL_SUNLOCK)
 static int osi_TimedSleep(char *event, afs_int32 ams, int aintok);
 #endif
+
 void afs_osi_Wakeup(char *event);
 void afs_osi_Sleep(char *event);
 
index 74f7515b7cf739ac42e2d8d3ae4af9143b208aad..77b7bcff9fc7d65a555623fd48de932b6d733c05 100644 (file)
@@ -25,7 +25,9 @@ typedef struct vnode {
        struct list_head        i_hash;
        struct list_head        i_list;
        struct list_head        i_dentry;
-
+#if defined(AFS_LINUX24_ENV)
+        struct list_head        i_dirty_buffers;
+#endif
        unsigned long           i_ino;
        unsigned int            i_count;
        kdev_t                  i_dev;
@@ -76,6 +78,8 @@ typedef struct vnode {
 #if defined(AFS_LINUX24_ENV)
         struct pipe_inode_info  *i_pipe;
         struct block_device     *i_bdev;
+        unsigned long           i_dnotify_mask;
+        struct dnotify_struct   *i_dnotify;
 #endif
 
        unsigned long           i_state;
index 3e9faa1e1de9aebd48800fe2b9940954ab6896c1..d1939581a6d22d7a193541cb4b30be9a7398a382 100644 (file)
@@ -210,7 +210,11 @@ static LIST_HEAD(dummy_inode_list);
  * pages to disk. So it needs an inode syncing function to update metadata when it
  * has synced some pages of a file to disk.
  */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+void afs_write_inode(struct inode *ip, int unused) 
+#else
 void afs_write_inode(struct inode *ip) 
+#endif
 {
     /* and put it back on our dummy list. */
     list_del(&ip->i_list);
index 306b282fa2e8287c67f63657f65c12e92b95805f..42bdc89dc6ecc6872cb0bb7257f450928744ee93 100644 (file)
@@ -42,6 +42,8 @@ getinode(vfsp, dev, inode, ipp, credp,perror)
     if (!vfsp 
 #if !defined(AFS_SUN58_ENV)
        && !(vfsp = vfs_devsearch(dev))
+#else
+        && !(vfsp = vfs_dev2vfsp(dev))
 #endif
        ) {
        return (ENODEV);
index edfadb2a29c4bb2edc9882e333e0a2b254540377..6219269c0c864527c56dc398408e20aba543156f 100644 (file)
@@ -17,7 +17,12 @@ int afs_putapage(struct vnode *vp, struct page *pages,
 #else
                 u_int *offp,
 #endif
-                u_int *lenp, int flags, struct AFS_UCRED *credp);
+#if     defined(AFS_SUN58_ENV)
+                 size_t *lenp,
+#else
+                 u_int *lenp,
+#endif
+                 int flags, struct AFS_UCRED *credp);
 
 
 
index 8c8c43a2b6c1f77c8fc8a3b0979ff729a2395281..e55d2694ce3b87cc8356d386652cfd7f3d5bbb99 100644 (file)
@@ -379,7 +379,11 @@ retry:
         * As of 4/98, that shouldn't be possible, but we'll be defensive here
         * in case someone tries to relax all the serialization of read and write
         * operations with harmless things like stat. */
+#if    defined(AFS_SUN58_ENV)
+        page = page_create_va(vp, toffset, PAGESIZE, PG_WAIT|PG_EXCL, seg, addr);
+#else
        page = page_create_va(vp, toffset, PAGESIZE, PG_WAIT|PG_EXCL, seg->s_as, addr);
+#endif
 #else
        page = page_create(vp, toffset, PAGESIZE, PG_WAIT);
 #endif
@@ -537,7 +541,12 @@ int afs_putpage(vp, off, len, flags, cred)
     struct vcache *avc;
     struct page *pages;
     afs_int32 code = 0;
-    afs_int32 tlen, endPos, NPages=0;
+#if    defined(AFS_SUN58_ENV)
+    size_t tlen;
+#else
+    afs_int32 tlen;
+#endif
+    afs_int32 endPos, NPages=0;
 #if    defined(AFS_SUN56_ENV)
     u_offset_t toff = off;
 #else
@@ -615,7 +624,12 @@ int afs_putapage(struct vnode *vp, struct page *pages,
 #else
                 u_int *offp,
 #endif
-                u_int *lenp, int flags, struct AFS_UCRED *credp)
+#if    defined(AFS_SUN58_ENV)
+                 size_t *lenp,
+#else
+                 u_int *lenp,
+#endif
+                 int flags, struct AFS_UCRED *credp)
 {
     struct buf *tbuf;
     struct vcache *avc = (struct vcache *)vp;
index c32c4940b10d5656ae1712e341d9e1e57343010e..e146b2c8e0e6833ab1dd4df1989149c681111b10 100644 (file)
@@ -49,7 +49,7 @@ afs_mount(afsp, path, data)
     afs_globalVFS = afsp;
     afsp->vfs_bsize = 8192;
     afsp->vfs_fsid.val[0] = AFS_VFSMAGIC; /* magic */
-    afsp->vfs_fsid.val[1] = AFS_VFSFSID; 
+    afsp->vfs_fsid.val[1] = (afs_int32) AFS_VFSFSID; 
 
     return 0;
 }
@@ -113,7 +113,7 @@ afs_statfs(afsp, abp)
        abp->f_type = 0;
        abp->f_bsize = afsp->vfs_bsize;
        abp->f_fsid.val[0] = AFS_VFSMAGIC; /* magic */
-       abp->f_fsid.val[1] = AFS_VFSFSID;
+       abp->f_fsid.val[1] = (afs_int32) AFS_VFSFSID;
        return 0;
 }
 
index 0ae402a8893a997783c1caa5308bff99252ad5e5..34675191dcbb530d7cc0eea3a8348facb245d272 100644 (file)
@@ -188,6 +188,13 @@ afs_getattr(OSI_VC_ARG(avc), attrs, acred)
     afs_Trace2(afs_iclSetp, CM_TRACE_GETATTR, ICL_TYPE_POINTER, avc, 
               ICL_TYPE_INT32, avc->m.Length);
 
+#if defined(AFS_SUN5_ENV)
+    if (flags & ATTR_HINT) {
+       code = afs_CopyOutAttrs(avc, attrs);
+       return code;
+    }
+#endif
+
 #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV)
     afs_BozonLock(&avc->pvnLock, avc);
 #endif
index 16bc447e7e85c091d8dc52c119f1d43f15a80cd4..0e984f0c779533ec14b94bbff220ad99224b9478 100644 (file)
@@ -220,15 +220,15 @@ struct conn *afs_ConnBySA(struct srvAddr *sap, unsigned short aport,
 
              if (cryptall) {
                level=rxkad_crypt;
-               isec=3;
-             }
-             else {
+             } else {
                level=rxkad_clear;
-               isec=2;
              }
-               /* kerberos tickets on channel 2 */
-               csec = rxkad_NewClientSecurityObject(level, tu->ct.HandShakeKey,
-                       /* kvno */ tu->ct.AuthHandle, tu->stLen, tu->stp);
+             isec=2;
+             /* kerberos tickets on channel 2 */
+             csec = rxkad_NewClientSecurityObject(level, tu->ct.HandShakeKey,
+                                                  /* kvno */ 
+                                                  tu->ct.AuthHandle, 
+                                                  tu->stLen, tu->stp);
        }
        if (isec == 0)
            csec = rxnull_NewClientSecurityObject();
index e2ddf743b09e7b42ceca52b5328c1713c42639d3..84a3b35ba9742f57070ac48553a942176c8ceff4 100644 (file)
@@ -702,7 +702,7 @@ NB:  Has to be unsigned, since shifts on signed quantities may preserve
    clients.  This is probably OK, but I don't want to see too much of it.
 */
 
-#define        ranstage(x)     (x)= (afs_uint32) (3141592621*((afs_uint32)x)+1)
+#define        ranstage(x)     (x)= (afs_uint32) (3141592621U*((afs_uint32)x)+1)
 extern afs_int32 rxi_getaddr();
 
 unsigned int afs_random()
index 385374ce20d61a15f189bfdd01e808e1d0ca843f..699f5919b60c6e4ca4b58b56bdee20a8c39df1f6 100644 (file)
@@ -923,7 +923,10 @@ struct vcache *afs_NewVCache(struct VenusFid *afid, struct server *serverp,
        sema_init(&ip->i_zombie, 1);
        init_waitqueue_head(&ip->i_wait);
        spin_lock_init(&ip->i_data.i_shared_lock);
-       INIT_LIST_HEAD(&ip->i_data.pages);
+       INIT_LIST_HEAD(&ip->i_data.clean_pages);
+       INIT_LIST_HEAD(&ip->i_data.dirty_pages);
+       INIT_LIST_HEAD(&ip->i_data.locked_pages);
+       INIT_LIST_HEAD(&ip->i_dirty_buffers);
        ip->i_data.host = (void*) ip;
        ip->i_mapping = &ip->i_data;
 #else
index c3356b51606237fd4739524c8d26260bfb206af7..c05cd53562b8a64bf80f87e7a42c06bda8f30c7d 100644 (file)
@@ -40,6 +40,9 @@
 
 static ParseHostLine();
 static ParseCellLine();
+static afsconf_OpenInternal();
+static afsconf_CloseInternal();
+static afsconf_Reopen();
 
 static struct afsconf_servPair serviceTable [] = {
     "afs",     7000,
@@ -195,7 +198,7 @@ register struct afsconf_dir *adir; {
 #ifdef AFS_NT40_ENV
     return _utime(tbuffer, NULL);
 #else
-    gettimeofday(&tvp[0], (char *) 0);
+    gettimeofday(&tvp[0], NULL);
     tvp[1] = tvp[0];
     return utimes(tbuffer, tvp);
 #endif  /* AFS_NT40_ENV */
index a765768f783fdc0c51156bfcabc90d0b64e541e5..dc53cac59726819f3586da4830e1218525e47a26 100644 (file)
@@ -1,7 +1,7 @@
 /* A lexical scanner generated by flex */\r
 \r
 /* Scanner skeleton version:\r
- * $Header: /tmp/cvstemp/openafs/src/comerr/et_lex.lex_nt.c,v 1.1 2000/11/04 04:23:01 hartmans Exp $\r
+ * $Header: /tmp/cvstemp/openafs/src/comerr/et_lex.lex_nt.c,v 1.1.1.2 2001/01/19 20:54:19 hartmans Exp $\r
  */\r
 \r
 #define FLEX_SCANNER\r
index b60412dfa26a74c740bb8534ebe993eeaa58bd13..07d163f14046b8ec8ea16b75645720397025dd01 100644 (file)
@@ -33,9 +33,9 @@ SHLIB_CFLAGS=
 AR=ar
 AS=as
 CP=cp
-MT_CC=cc
+MT_CC=/usr/bin/cc
 INSTALL=${SRCDIR}bin/install
-LD=ld   
+LD=/usr/bin/ld   
 LEX=lex
 MV=mv
 RANLIB=/bin/true
index 3b2d006cb360c6f516b1025881652aa3162a426e..f048a0efd7c48375065e27eaffe203913b31cbbc 100644 (file)
@@ -22,7 +22,7 @@ DBG=-g
 #
 # libraries
 XLIBS=-lsocket -lnsl -lintl -ldl
-TXLIBS=-lcurses
+TXLIBS=-L/usr/ccs/lib -lcurses
 MTLIBS=-lpthread -lsocket
 XLIBELFA=-lelf
 XLIBKVM=-lkvm
index fbd16647f6017acf29252b15e1bb7d3a440b9a15..9edc0ddf0c64e31582c39b10dd2915c8b8a93a13 100644 (file)
@@ -8,8 +8,8 @@
 AFS_component_version_number.o: AFS_component_version_number.c
 
 AFS_component_version_number.c: 
-       echo 'char cml_version_number[]="@(#)CML not accessible: No version Information";' >AFS_component_version_number.c;
-       echo 'char* AFSVersion = "afs??"; ' >>AFS_component_version_number.c;
+       echo 'char cml_version_number[]="@(#) OpenAFS devel built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c;
+       echo 'char* AFSVersion = "openafs devel"; ' >>AFS_component_version_number.c;
 
 noversion: install
 
index 32504e4119b698050c327ec990f0b777fb59e1e4..7f5ed76f96460af834e31835d06983d9801c3474 100644 (file)
 #define SYS_NAME_ID_sparc64_linux2     1800
 #define SYS_NAME_ID_sparc64_linux22    1801
 
+#define SYS_NAME_ID_s390_linux2         1900
+#define SYS_NAME_ID_s390_linux22        1901
+#define SYS_NAME_ID_s390_linux24        1902
+
 
 /*
  * Placeholder to keep system-wide standard flags since this file is included by all 
index b95cb383622f777cdd9a08d3eea7a10b74dd5a74..1b019a157ec03066c64f67a74060e22ebcdd27dd 100644 (file)
@@ -174,5 +174,7 @@ struct cm_initparams {
 #define VIOC_AFS_FLUSHMOUNT    _VICEIOCTL(52)  /* Flush mount symlink data */
 #define VIOC_RXSTAT_PROC       _VICEIOCTL(53)  /* Control process RX stats */
 #define VIOC_RXSTAT_PEER       _VICEIOCTL(54)  /* Control peer RX stats */
+#define VIOC_GETRXKCRYPT        _VICEIOCTL(55)  /* Set rxkad enc flag */
+#define VIOC_SETRXKCRYPT        _VICEIOCTL(56)  /* Set rxkad enc flag */
 
 #endif /* AFS_VENUS_H */
index 554b41423e630ca5a367b963fc583c1540cde65b..99ec3cde22309baae0f0ff1a67e719bf473eba9f 100644 (file)
 #ifdef AFS_SPARC64_LINUX20_ENV
 #include "conf-sparc64-linux.h"
 #else
+#ifdef AFS_S390_LINUX20_ENV
+#include "conf-s390-linux.h"
+#else
 #include "conf-i386-linux.h"
+#endif /* AFS_S390_LINUX20_ENV */
 #endif /* AFS_SPARC64_LINUX20_ENV */
 #endif /* AFS_SPARC_LINUX20_ENV */
 #endif
index a67c2729a38fea3eeb281882fc85c11e5afddbca..24e752c5afbc6d4473bbff6961d91c6b4f13efca 100644 (file)
@@ -61,6 +61,7 @@ static char sccsid[] = "@(#)ftpd.c    5.27.1.1        (Berkeley) 3/2/89";
 #include <netdb.h>
 #include <errno.h>
 #include <string.h>
+#include <unistd.h>
 #include <time.h>
 #if defined(AIX)
 #include <sys/syslog.h>
index 0f6f756168f807ef17d1be0aa177d891bd4630b5..6409dbf9daa2aae63772b2f31e5f859957160726 100644 (file)
@@ -35,7 +35,7 @@ static char *okshells[] =
 
 static char **shells, *strings;
 static char **curshell = NULL;
-extern char **initshells();
+static char **initshells();
 
 /*
  * Get a list of shells from SHELLS, if it exists.
@@ -65,12 +65,6 @@ endusershell()
        curshell = NULL;
 }
 
-setusershell()
-{
-
-       curshell = initshells();
-}
-
 static char **
 initshells()
 {
@@ -118,3 +112,15 @@ initshells()
        (void)fclose(fp);
        return (shells);
 }
+
+setusershell()
+{
+
+       curshell = initshells();
+}
+
+
+
+
+
+
index fa79f1c04f7e281b6861d7de975bc4e2d73f8ada..9367a7c1936304567133c7d74d87a3f578f0dfe7 100644 (file)
@@ -93,6 +93,8 @@ char **copyblk(register char **);
 static char *strend(register char *);
 int gethdir(char *);
 
+static addpath();
+static rscan();
 
 #ifdef notdef
 static addpath(char);
index df6420cad475f9825a0bb67048af475699af3e08..abe25fe83866d52a25e0b8dc5f3c77d236ea639a 100644 (file)
@@ -1029,7 +1029,7 @@ machtime()
                fprintf(stderr, "Unable to get time of day\n");
                return (0L);
        }
-       return (htonl((afs_int32)tv.tv_sec + 2208988800));
+       return (htonl((afs_int32)tv.tv_sec + 2208988800U));
 }
 
 /* ARGSUSED */
index 7e62c12436f5796c334eb60c2f007312be05cbfe..46c6300f146ea436d7150f9a042d4f29785d00dc 100644 (file)
@@ -169,7 +169,7 @@ int DumpUser (
     if ((!ka_KeyIsZero((char *) &tentry.key, sizeof(tentry.key))) && 
        (showkey)) {
        printf ("  key (%d):", tentry.key_version);
-       ka_PrintBytes (&tentry.key, sizeof(tentry.key));
+       ka_PrintBytes ((char *)&tentry.key, sizeof(tentry.key));
     }
     else {
        if (tentry.keyCheckSum == 0) 
@@ -704,7 +704,7 @@ int StringToKey (
 
     printf ("Converting %s in realm '%s' yields key='",
            as->parms[0].items->data, realm);
-    ka_PrintBytes (&key, sizeof(key));
+    ka_PrintBytes ((char *)&key, sizeof(key));
     printf ("'.\n");
 
     return 0;
@@ -745,9 +745,10 @@ int SetPassword (
       ka_StringToKey (as->parms[1].items->data, realm, &key);
     } 
     else if (as->parms[2].items) {
-      if (ka_ReadBytes (as->parms[2].items->data, &key, sizeof(key)) != 8) {
+      if (ka_ReadBytes (as->parms[2].items->data, (char *)&key, sizeof(key))
+         != 8) {
        printf ("Key must be 8 bytes: '%s' was too long\n",
-                        as->parms[2].items->data);
+               as->parms[2].items->data);
        return KABADCMD;
       }
     } 
@@ -890,10 +891,10 @@ static afs_int32 ListTicket (
     }
     if (verbose) {
        printf ("SessionKey: ");
-       ka_PrintBytes (&token.sessionKey, sizeof(token.sessionKey));
+       ka_PrintBytes ((char *)&token.sessionKey, sizeof(token.sessionKey));
        printf ("\nTicket (kvno = %d, len = %d): ", token.kvno, 
                token.ticketLen);
-       ka_PrintBytes (token.ticket, token.ticketLen);
+       ka_PrintBytes ((char *)token.ticket, token.ticketLen);
        printf ("\n");
     }
     return 0;
@@ -982,7 +983,7 @@ static GetPassword (
     ubik_ClientDestroy(lpbkConn);
     if (code) goto abort;
     printf ("Key: ");
-    ka_PrintBytes (&key, sizeof(key));
+    ka_PrintBytes ((char *)&key, sizeof(key));
     printf ("\n");
     return code;
 }
@@ -999,7 +1000,7 @@ int GetRandomKey (
     else {
        int i;
        printf ("Key: ");
-       ka_PrintBytes (&key, sizeof(key));
+       ka_PrintBytes ((char *)&key, sizeof(key));
        printf (" (");
        for (i=0; i<sizeof(key); i++) {
            printf ("%0.2x", ((char *)&key)[i] & 0xff);
@@ -1174,7 +1175,7 @@ int Quit (
     return 0;
 }
 
-void MyAfterProc(
+int MyAfterProc(
   struct cmd_syndesc *as)
 {
     if (!strcmp(as->name,"help")) return;
@@ -1187,7 +1188,7 @@ void MyAfterProc(
         conn = 0;
     }
 
-    return;
+    return 0;
 }
 
 int   init = 0, noauth;
index 40aaf86a8e3978b5f602370ba4431b94f407eb26..562fba91b7fe4ec6ffc740f042e00bb3432fff02 100644 (file)
@@ -142,7 +142,8 @@ static afs_int32 get_time (timeP, tt, admin)
                                     &key, 0, 0);
                if (code == 0) {
                    des_init_random_number_generator (&key);
-                   ka_ConvertBytes (buf, sizeof(buf), &key, sizeof(key));
+                   ka_ConvertBytes (buf, sizeof(buf), (char *)&key, 
+                                    sizeof(key));
                    es_Report ("New Admin key is %s\n", buf);
                } else {
                    es_Report ("in get_time: set_password failed because: %d\n", code);
@@ -159,7 +160,8 @@ static afs_int32 get_time (timeP, tt, admin)
                des_fixup_key_parity (&key);
                code = set_password (tt, KA_TGS_NAME, lrealm, &key, 0, 0);
                if (code == 0) {
-                   ka_ConvertBytes (buf, sizeof(buf), &key, sizeof(key));
+                   ka_ConvertBytes (buf, sizeof(buf), (char *)&key, 
+                                    sizeof(key));
                    es_Report ("New TGS key is %s\n", buf);
                } else {
                    es_Report ("in get_time: set_password failed because: %s\n", error_message (code));
@@ -720,7 +722,7 @@ impose_reuse_limits ( password, tentry )
   if (!bcmp(password, &(tentry->key), sizeof(EncryptionKey)))
       return KAREUSED;
 
-  code = ka_KeyCheckSum (password, &newsum);
+  code = ka_KeyCheckSum ((char *)password, &newsum);
   if (code)
      return code;
 
@@ -759,7 +761,7 @@ set_password (tt, name, instance, password, kvno, caller)
       /* do nothing, no limits */ ;
     }
     else {
-     code = ka_KeyCheckSum (&(tentry.key), &newsum);
+     code = ka_KeyCheckSum ((char *)&(tentry.key), &newsum);
      if (code)
        return code;
      for (i=npwSums-1; i ; i--) 
@@ -1551,7 +1553,7 @@ afs_int32 kamGetEntry (call, aname, ainstance, aversion, aentry)
        (callerIsAdmin && enc_level == rxkad_crypt))
        bcopy (&tentry.key, &aentry->key, sizeof(struct ktc_encryptionKey));
     else bzero (&aentry->key, sizeof(aentry->key));
-    code = ka_KeyCheckSum (&tentry.key, &aentry->keyCheckSum);
+    code = ka_KeyCheckSum ((char *)&tentry.key, &aentry->keyCheckSum);
     if (!tentry.pwsums[0] && npwSums > 1 && !tentry.pwsums[1]) {
        aentry->reserved3 = 0x12340000;
     } else {
index fc20a12434c29ca16ad09cd0f782defce9ea4914..0d470a8c330c64a001d00b8d7ee119ce21f52743 100644 (file)
@@ -414,7 +414,7 @@ afs_int32 UDP_GetTicket (ksoc, pkt, kvno, authDomain, ticket, ticketLen, auth, a
     COUNT_REQ (UGetTicket);
 
     if (code = InitAuthServ(&tt, LOCKREAD, this_op)) goto fail;
-    code = ka_LookupKvno (0, KA_TGS_NAME,
+    code = ka_LookupKvno (tt, KA_TGS_NAME,
                          ((strlen(authDomain) > 0) ? authDomain : lrealm),
                          kvno, &tgskey);
     if (code) goto abort;
@@ -568,7 +568,7 @@ static err_packet (ksoc, pkt, code, reason)
     }
 
     ans.len = 2 + strlen(pkt->name) + strlen(pkt->inst) + strlen(pkt->realm) +
-       3/* nulls */ + sizeof(afs_int32) + strlen (buf) + 1;
+       3/* nulls */ + (2 * sizeof(afs_int32)) + strlen (buf) + 1;
     if (ans.len > sizeof(ans.data)) {
        printf ("Answer packet too long\n");
        return;
@@ -827,7 +827,13 @@ afs_int32 init_krb_udp ()
     taddr.sin_family = AF_INET;  /* added for NCR port */
     if ( !sp ) 
     {
-       /* if kerberos-4 is not available, try "kerberos" */
+       /* if kerberos-4 is not available, try "kerberos-iv" */
+       krb4name = "kerberos-iv";
+       sp = getservbyname(krb4name, "udp");
+    }
+    if ( !sp ) 
+    {
+       /* if kerberos-iv is not available, try "kerberos" */
        krb4name = "kerberos";
        sp = getservbyname(krb4name, "udp");
     }
index bf0614632f5543cfea5c37de842ce3b52653fcdd..bc743832416ffa206e6ef974491f7a9865312e99 100644 (file)
@@ -176,7 +176,7 @@ PrintEntry(index, entry)
   printf("   Key Version = %d\n", entry->key_version);
 
   printf("   Key = ");
-  ka_PrintBytes (&entry->key, sizeof(entry->key));
+  ka_PrintBytes ((char *)&entry->key, sizeof(entry->key));
   printf("\n");
 
   /* What about asServer structs and such and misc_ath_bytes */
@@ -229,7 +229,8 @@ RebuildEntry(entryp)
 
   fprintf(out, "create    -name %s", EntryName(entryp));
 
-  ka_ConvertBytes (key, sizeof(key), &entryp->key, sizeof(entryp->key));
+  ka_ConvertBytes (key, sizeof(key), (char *)&entryp->key, 
+                  sizeof(entryp->key));
   fprintf(out, " -initial_password foo\n", key);
 
   strcpy(flags,"");
index 666f5ef8f1e698df03d4bba6c1ebc1eeaf66f55d..d6592bcac6e4d05a2c02a13f4f838c8afeb0ce8f 100644 (file)
@@ -28,9 +28,10 @@ AFS_OS_NONFSOBJS = \
 
 # System specific build commands and flags
 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
-LD = /usr/ccs/bin/ld
-LORDER = /usr/ccs/bin/lorder
-CC = /opt/SUNWspro/bin/cc
+#These are redundant
+#LD = /usr/ccs/bin/ld
+#LORDER = /usr/ccs/bin/lorder
+#CC = /opt/SUNWspro/bin/cc
 KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
        -DSYSV -dn ${ARCH_DEFS}
 
@@ -106,7 +107,7 @@ ${COMPDIRS}:
 LIBAFS = libafs.o
 LIBAFSNONFS = libafs.nonfs.o
 
-<all -sun4x_57 sun4x_58>
+<all -sun4x_57 -sun4x_58>
 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS}
 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
 
index 5186cdbcdce3e349148348a77194412602a1451f..057adaa964d6ad258eb96b0cf0436b3969aac3d6 100644 (file)
@@ -109,9 +109,9 @@ LIBOBJS = \
 
 system install:
        if [ -f "../des/Makefile" ] ; then \
-               make install.lib ; \
+               $(MAKE) install.lib ; \
        else \
-               make libstub ; \
+               $(MAKE) libstub ; \
        fi
 
 install.lib: ${DESTDIR}lib/libafsrpc.a
@@ -238,7 +238,7 @@ xdr_afsuuid.o: ${RX}/xdr_afsuuid.c
 #
 #   $ what /opt/langtools/bin/pxdb32
 #   /opt/langtools/bin/pxdb32:
-#           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.2 $
+#           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.3 $
 #
 # The problem occurs when -g and -O are both used when compiling des.c.
 # The simplest way to work around the problem is to leave out either -g or -O.
index 9e36a266d2c4df8f4c6e20b6de248cd40350c579..43875f359fc864d47d5d0acf4d4fc29edc207b72 100644 (file)
@@ -13,7 +13,8 @@ include $(DESTDIR)../obj/config/Makefile.${SYS_NAME}
 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
 
 # System specific build commands and flags
-CC = /opt/SUNWspro/bin/cc
+# Redundant
+# CC = /opt/SUNWspro/bin/cc
 DEFINES= -D_REENTRANT -DAFSDEBUG -DKERNEL -DUKERNEL -DAFS -DVICE
 CFLAGS=-I. -I.. ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG}
 OPTF=-O
@@ -73,9 +74,9 @@ $(LIBUAFS): $(UAFSOBJ)
 
 $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a
        -rm -f $(LIBAFSWEB)
-       ld -G -M../mapfile -o $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS)
+       ${LD} -G -M../mapfile -o $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS)
 
 
 $(LIBAFSWEBKRB): $(AFSWEBOBJKRB) $(DES)/libdes.a
        -rm -f $(LIBAFSWEBKRB)
-       ld -G -M../mapfile -o $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)
+       ${LD} -G -M../mapfile -o $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)
index 5e9fb9542b61fcb020a979c97836655ee31bb9b9..ff773628f1fdd863d6a05f1cc16fd16d1c65c483 100644 (file)
@@ -149,7 +149,7 @@ install: AFS_component_version_number.c ntest ntpd ntp ntpdc runntp
 #      make ${MFLAGS} DESTDIR=${DESTDIR} install-link
 
 install-man:
-       cd man; make ${MFLAGS} DESTDIR=${DESTDIR} install
+       cd man; $(MAKE) ${MFLAGS} DESTDIR=${DESTDIR} install
 
 install-link:
        rm -f ${BINDIR}/${LINKDIR}/ntpd
index 3fa42800c9a334f366f65cb0f241421212a8c41b..af05c4eab5c7e383234182a15ffd32dce9cf308d 100644 (file)
@@ -57,7 +57,7 @@ include ../config/Makefile.version
 
 clean:
        $(RM) -f *.o ptserver ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h \
-       libprot.a  pts readgroup readpwd db_verify testpt pterror.h pterror.c \
+       libprot.a  pts readgroup readpwd db_verify testpt pt_util pterror.h pterror.c \
         core  AFS_component_version_number.c
 
 ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${auditlib}
@@ -108,7 +108,6 @@ libprot.a: ${LIBOBJS} AFS_component_version_number.o
        $(RM) -f libprot.a
        $(AR) r libprot.a ${LIBOBJS} AFS_component_version_number.o
        $(RANLIB) libprot.a
-               
 
 pts: pts.o libprot.a ${SRCDIR}lib/afs/libcmd.a $(LIBS)
        $(CC) ${CFLAGS} -o pts pts.o ${SRCDIR}lib/afs/libcmd.a libprot.a ${LIBS} ${XLIBS}
@@ -130,6 +129,10 @@ testpt: testpt.o libprot.a ${SRCDIR}lib/afs/libcmd.a $(LIBS)
 
 testpt.o: testpt.c ${INCLS} ${SRCDIR}include/afs/cmd.h AFS_component_version_number.c
 
+pt_util: pt_util.o ptutils.o ubik.o utils.o libprot.a $(LIBS)
+       $(CC) ${CFLAGS} -o pt_util pt_util.o ptutils.o ubik.o utils.o libprot.a $(LIBS) ${XLIBS}
+
+ubik.o: ubik.c ${INCLS}
 
 system: install
 
@@ -143,7 +146,7 @@ ukinstall webinstall: ${UKSRCS} Kptint.h Kptint.cs.c Kptint.xdr.c
        ${INSTALL} Kptint.xdr.c ${UKERNELDIR}afsint/ptint.xdr.c
        ${INSTALL} ${UKSRCS} ${UKERNELDIR}afs
 
-all: ptclient libprot.a pts db_verify readgroup readpwd testpt
+all: ptclient libprot.a pts db_verify readgroup readpwd testpt pt_util
 
 ${DESTDIR}root.server/usr/afs/bin/ptserver: ptserver
        ${INSTALL} $? $@
@@ -151,11 +154,14 @@ ${DESTDIR}root.server/usr/afs/bin/ptserver: ptserver
 ${DESTDIR}bin/pts ${DESTDIR}root.server/usr/afs/bin/pts: pts
        ${INSTALL} $? $@
 
+${DESTDIR}root.server/usr/afs/bin/pt_util: pt_util
+       ${INSTALL} $? $@
+
 ${DESTDIR}lib/afs/libprot.a: libprot.a
        ${INSTALL}   $? $@
 
 
-install: all ukinstall ${DESTDIR}root.server/usr/afs/bin/ptserver ${DESTDIR}root.server/usr/afs/bin/pts ${DESTDIR}bin/pts ${DESTDIR}lib/afs/libprot.a
+install: all ukinstall ${DESTDIR}root.server/usr/afs/bin/ptserver ${DESTDIR}root.server/usr/afs/bin/pts ${DESTDIR}bin/pts ${DESTDIR}lib/afs/libprot.a ${DESTDIR}root.server/usr/afs/bin/pt_util
        ${INSTALL} libprot.a ${DESTDIR}lib/afs/libprot.a
        ${INSTALL} ptserver.h ptint.h pterror.h ptclient.h ${DESTDIR}include/afs
        ${INSTALL} ptserver.h ${DESTDIR}include/afs/prserver.h
index fceb556706f836071de19d35c2b69ed349dd5ee2..7e98bab6efd7638a54764735040e77326985e5e5 100644 (file)
@@ -95,7 +95,7 @@ afs_int32 ReadHeader()
     }
     /* Check and see if database exists and is approximately OK. */
     if (ntohl(cheader.headerSize) != sizeof(cheader) ||
-       ntohl(cheader.eofPtr) == NULL) {
+       ntohl(cheader.eofPtr) == 0) {
        if (code) return code;
        com_err (whoami, PRDBBAD, "header is bad");
        return PRDBBAD;
index 9e98967e5b3b4a03ca8720938b1bae6733907612..4e06c66010728d9ec16c738a9a03f3f91573099e 100644 (file)
@@ -45,6 +45,7 @@ afs_int32 listEntries(), changeEntry(), setFieldsEntry(), put_prentries();
 afs_int32 listElements(), listOwned(), isAMemberOf(), idToName();
 
 static stolower();
+extern int IDCmp();
 
 /* When abort, reset initd so that the header is read in on next call.
  * Abort the transarction and return the code.
@@ -593,7 +594,7 @@ afs_int32 Delete (call, aid)
     /* Delete each continuation block as a separate transaction so that no one
      * transaction become to large to complete. */
     nptr = tentry.next;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32)NULL) {
        struct contentry centry;
        int i;
 
@@ -636,7 +637,7 @@ afs_int32 Delete (call, aid)
      * transaction, we start a new transaction every 50 entries. */
     count = 0;
     nptr = tentry.owned;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32)NULL) {
        struct prentry nentry;
 
        code = pr_ReadEntry (tt, 0, nptr, &nentry);
@@ -1650,7 +1651,6 @@ afs_int32 addWildCards(tt,alist,host)
     afs_int32 hostid;
     int size = 0, i, code;
     int added = 0;
-    extern afs_int32 IDCmp();
  
     while (host = (host & wild)) {
        wild = htonl ( ntohl(wild) << 8) ;
index 52a00bc1e0a5c10fae2ba07315e4634a49e91b03..23b98840885d7d02e0597129084a175f132bb911 100644 (file)
@@ -78,13 +78,15 @@ int GetGlobals (as)
     return code;
 }
 
-void CleanUp (as)
+int CleanUp (as)
   register struct cmd_syndesc *as;
 {
     if (!strcmp(as->name,"help")) return;
     /* Need to shutdown the ubik_client & other connections */
     pr_End();
     rx_Finalize();
+
+    return 0;
 }
 
 CreateGroup (as)
index 8f4e9546efa9c4dc88f3d1e24e07e347c416d1a3..bcaef4bb9e8be427c32787a602cf498a8ae25fdf 100644 (file)
@@ -32,6 +32,7 @@
 extern struct ubik_dbase *dbase;
 extern struct afsconf_dir *prdir;
 extern int pr_noAuth;
+extern int IDCmp();
 
 extern afs_int32 AddToEntry();
 static char *whoami = "ptserver";
@@ -444,7 +445,7 @@ afs_int32 RemoveFromEntry (at, aid, bid)
     }
     hloc = 0;
     nptr = tentry.next;
-    while (nptr != NULL) {
+    while (nptr != 0) {
        code = pr_ReadCoEntry(at,0,nptr,&centry);
        if (code != 0) return code;
        if ((centry.id != bid) || !(centry.flags & PRCONT)) return PRDBBAD;
@@ -526,7 +527,7 @@ afs_int32 DeleteEntry (at, tentry, loc)
        if (code) return code;
     }
     nptr = tentry->next;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32)NULL) {
        code = pr_ReadCoEntry(at,0,nptr,&centry);
        if (code != 0) return PRDBFAIL;
        for (i=0;i<COSIZE;i++) {
@@ -638,7 +639,7 @@ afs_int32 AddToEntry (tt, entry, loc, aid)
     }
     last = 0;
     nptr = entry->next;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32)NULL) {
        code = pr_ReadCoEntry(tt,0,nptr,&nentry);
        if (code != 0) return code;
        last = nptr;
@@ -693,7 +694,7 @@ afs_int32 AddToEntry (tt, entry, loc, aid)
     bzero(&aentry,sizeof(aentry));
     aentry.flags |= PRCONT;
     aentry.id = entry->id;
-    aentry.next = NULL;
+    aentry.next = 0;
     aentry.entries[0] = aid;
     code = pr_WriteCoEntry(tt,0,nptr,&aentry);
     if (code != 0) return code;
@@ -739,7 +740,6 @@ afs_int32 GetList (at, tentry, alist, add)
     afs_int32 nptr;
     int size;
     int count = 0;
-    extern afs_int32 IDCmp();
 
     size = 0;
     alist->prlist_val = 0;
@@ -752,7 +752,7 @@ afs_int32 GetList (at, tentry, alist, add)
        if (code) return code;
     }
 
-    for (nptr = tentry->next; nptr != NULL; nptr = centry.next) {
+    for (nptr = tentry->next; nptr != 0; nptr = centry.next) {
        /* look through cont entries */
        code = pr_ReadCoEntry(at,0,nptr,&centry);
        if (code != 0) return code;
@@ -795,7 +795,6 @@ afs_int32 GetList2 (at, tentry, tentry2 , alist, add)
     afs_int32 nptr;
     afs_int32 size;
     int count = 0;
-    extern afs_int32 IDCmp();
 
     size = 0;
     alist->prlist_val = 0;
@@ -808,7 +807,7 @@ afs_int32 GetList2 (at, tentry, tentry2 , alist, add)
     }
 
     nptr = tentry->next;
-    while (nptr != NULL) {
+    while (nptr != (afs_uint32)NULL) {
        /* look through cont entries */
        code = pr_ReadCoEntry(at,0,nptr,&centry);
        if (code != 0) return code;
@@ -831,7 +830,7 @@ afs_int32 GetList2 (at, tentry, tentry2 , alist, add)
 
     if (!code) {
            nptr = tentry2->next;
-           while (nptr != NULL) {
+           while (nptr != (afs_uint32)NULL) {
                /* look through cont entries */
                code = pr_ReadCoEntry(at,0,nptr,&centry);
                if (code != 0) break;
@@ -869,7 +868,6 @@ afs_int32 GetOwnedChain (ut, next, alist)
     struct prentry tentry;
     int size;
     int count = 0;
-    extern afs_int32 IDCmp();
 
     size = 0;
     alist->prlist_val = 0;
@@ -970,7 +968,7 @@ afs_int32 Initdb()
     }
     if ((ntohl(cheader.version) == PRDBVERSION) &&
        ntohl(cheader.headerSize) == sizeof(cheader) &&
-       ntohl(cheader.eofPtr) != NULL &&
+       ntohl(cheader.eofPtr) != (afs_uint32)NULL &&
        FindByID(tt,ANONYMOUSID) != 0){
        /* database exists, so we don't have to build it */
        code = ubik_EndTrans(tt);
@@ -1016,7 +1014,7 @@ afs_int32 Initdb()
      */
     if ((ntohl(cheader.version) == PRDBVERSION) &&
        ntohl(cheader.headerSize) == sizeof(cheader) &&
-       ntohl(cheader.eofPtr) != NULL &&
+       ntohl(cheader.eofPtr) != (afs_uint32)NULL &&
        FindByID(tt,ANONYMOUSID) != 0){
        /* database exists, so we don't have to build it */
        code = ubik_EndTrans(tt);
index 3d093683574f82bce2bb3f09895e6a8c596604a2..8b81ad4396e38c245505ad29aaf2dba2ba3ce252 100644 (file)
@@ -837,7 +837,7 @@ static char tmp_conf_file[128] = "";
 static char tmp_cell_file[128] = "";
 static char tmp_noauth_file[128] = "";
 
-static afs_int32 MyAfterProc (as, arock)
+static int MyAfterProc (as, arock)
   struct cmd_syndesc *as;
   char *arock;
 {   afs_int32  code;
@@ -848,7 +848,7 @@ static afs_int32 MyAfterProc (as, arock)
     return 0;
 }
 
-static afs_int32 MyBeforeProc (as, arock)
+static int MyBeforeProc (as, arock)
   struct cmd_syndesc *as;
   char *arock;
 {   afs_int32  code;
index ef456f184afb13ac4be4cf9bc2aa3cceb07a4559..36861494753e4ce60a7241576ed4cad1eea6adcb 100644 (file)
@@ -287,7 +287,7 @@ afs_int32 aid;
     if (code != 0) return 0;
     if (aid == tentry.id) return entry;
     entry = tentry.nextID;
-    while (entry != NULL) {
+    while (entry != 0) {
        bzero(&tentry,sizeof(tentry));
        code = pr_ReadEntry(at,0,entry,&tentry);
        if (code != 0) return 0;
@@ -317,7 +317,7 @@ struct prentry *tentryp;
     if (code != 0) return 0;
     if ((strncmp(aname,tentryp->name,PR_MAXNAMELEN)) == 0) return entry;
     entry = tentryp->nextName;
-    while (entry != NULL) {
+    while (entry != 0) {
        bzero(tentryp, sizeof(struct prentry));
        code = pr_ReadEntry(at,0,entry, tentryp);
        if (code != 0) return 0;
@@ -410,7 +410,7 @@ afs_int32 *aid;
     return PRSUCCESS;
 }
 
-afs_int32 IDCmp(a,b)
+int IDCmp(a,b)
 afs_int32 *a;
 afs_int32 *b;
 {
@@ -437,18 +437,18 @@ afs_int32 *loc;                           /* ??? in case ID hashed twice ??? */
     bzero(&tentry,sizeof(tentry));
     bzero(&bentry,sizeof(bentry));
     trail = 0;
-    if (current == NULL) return PRSUCCESS; /* already gone */
+    if (current == 0) return PRSUCCESS; /* already gone */
     code = pr_ReadEntry(tt,0,current,&tentry);
     if (code) return PRDBFAIL;
     while (aid != tentry.id) {
        trail = current;
        current = tentry.nextID;
-       if (current == NULL) break;
+       if (current == 0) break;
        code = pr_ReadEntry(tt,0,current,&tentry);
        if (code) return PRDBFAIL;
     }
-    if (current == NULL) return PRSUCCESS;  /* we didn't find him, so he's already gone */
-    if (trail == NULL) {
+    if (current == 0) return PRSUCCESS;  /* we didn't find him, so he's already gone */
+    if (trail == 0) {
        /* it's the first entry! */
        cheader.idHash[i] = htonl(tentry.nextID);
        code = pr_Write(tt,0,72+HASHSIZE*4+i*4,(char *)&cheader.idHash[i],sizeof(cheader.idHash[i]));
@@ -504,18 +504,18 @@ afs_int32 *loc;
     bzero(&tentry,sizeof(tentry));
     bzero(&bentry,sizeof(bentry));
     trail = 0;
-    if (current == NULL) return PRSUCCESS;  /* already gone */
+    if (current == 0) return PRSUCCESS;  /* already gone */
     code = pr_ReadEntry(tt,0,current,&tentry);
     if (code) return PRDBFAIL;
     while (strcmp(aname,tentry.name)) {
        trail = current;
        current = tentry.nextName;
-       if (current == NULL) break;
+       if (current == 0) break;
        code = pr_ReadEntry(tt,0,current,&tentry);
        if (code) return PRDBFAIL;
     }
-    if (current == NULL) return PRSUCCESS;  /* we didn't find him, already gone */
-    if (trail == NULL) {
+    if (current == 0) return PRSUCCESS;  /* we didn't find him, already gone */
+    if (trail == 0) {
        /* it's the first entry! */
        cheader.nameHash[i] = htonl(tentry.nextName);
        code = pr_Write(tt,0,72+i*4,(char *)&cheader.nameHash[i],sizeof(cheader.nameHash[i]));
@@ -609,7 +609,7 @@ afs_int32 RemoveFromOwnerChain(at,gid,oid)
     le =  &thisEntry;
     lastLoc = 0;
     nptr = thisEntry.owned;
-    while (nptr != NULL) {
+    while (nptr != 0) {
        if (nptr == lastLoc) te = le;
        else {
            if (&thisEntry == le) te = &thatEntry;
@@ -690,7 +690,7 @@ afs_int32 gid;
     nptr = ntohl(cheader.orphan);
     bzero(&bentry,sizeof(bentry));
     loc = 0;
-    while (nptr != NULL) {
+    while (nptr != 0) {
        code = pr_ReadEntry(at,0,nptr,&tentry);
        if (code != 0) return PRDBFAIL;
        if (gid == tentry.id) {
index b3903599cf970419d81fbbc9bf315e706c8215fa..9525c2024180c5093c3d289c527d47b28f09d0a5 100644 (file)
@@ -54,13 +54,13 @@ rcp: ${OBJS} ${LIBS}
         esac
 
 ../rsh/rcmd.o: ../rsh/rcmd.c
-       (cd ../rsh ; make rcmd.o SRCDIR=${SRCDIR} DESTDIR=${DESTDIR})
+       (cd ../rsh ; $(MAKE) rcmd.o SRCDIR=${SRCDIR} DESTDIR=${DESTDIR})
 
 ../rsh/herror.o: ../rsh/herror.c
-       (cd ../rsh ; make herror.o SRCDIR=${SRCDIR} DESTDIR=${DESTDIR})
+       (cd ../rsh ; $(MAKE) herror.o SRCDIR=${SRCDIR} DESTDIR=${DESTDIR})
 
 ../inetd/ta-rauth.o: ../inetd/ta-rauth.c
-       (cd ../inetd ; make ta-rauth.o SRCDIR=${SRCDIR} DESTDIR=${DESTDIR})
+       (cd ../inetd ; $(MAKE) ta-rauth.o SRCDIR=${SRCDIR} DESTDIR=${DESTDIR})
 
 clean:
 clean:
index 4ac2d35786ca0a487ca3c0cf698c1107f04b7f95..1b399bf2883f584abb852200f51e157af53a9ef4 100644 (file)
@@ -66,13 +66,13 @@ rexecd: rexecd.o ${ALIBS}
 
 
 ../login/libutil.a : ../login/util_login.c ../login/util_logout.c ../login/util_logwtmp.c
-       ( cd ../login ; make libutil.a )
+       ( cd ../login ; $(MAKE) libutil.a )
 
 ../rsh/rcmd.o : ../rsh/rcmd.c
-       (cp AFS_component_version_number.c ../rsh/AFS_component_version_number.c ;  cd ../rsh ; make rsh.o )
+       (cp AFS_component_version_number.c ../rsh/AFS_component_version_number.c ;  cd ../rsh ; $(MAKE) rsh.o )
 
 ../rsh/herror.o : ../rsh/herror.c
-       ( cd ../rsh ; make herror.o )
+       ( cd ../rsh ; $(MAKE) herror.o )
 
 clean:
        rm -f ${OBJS} core rlogind AFS_component_version_number.c
index 6717c5bc8e86314bbd7e55c4bd73a308b293e461..a76f1083161f3078e1f5a0f785a88a862e5ea2a5 100644 (file)
@@ -52,9 +52,9 @@ rlogin.o: rlogin.c AFS_component_version_number.c
 rsh.o: rsh.c AFS_component_version_number.c
 
 ../rlogind/herror.o: ../rlogind/herror.c
-       (cd ../rlogind ; make herror.o )
+       (cd ../rlogind ; $(MAKE) herror.o )
 ../inetd/ta-rauth.o : ../inetd/ta-rauth.c
-       (cd ../inetd ; make ta-rauth.o DESTDIR=${DESTDIR})
+       (cd ../inetd ; $(MAKE) ta-rauth.o DESTDIR=${DESTDIR})
 
 clean:
        rm -f ${OBJS} core rsh *.BAK AFS_component_version_number.c
index 759b27dbc819bd0a82863babd186651563a13d1a..9772e04392f8d0ed3e69f920c126a17bd6f09d2f 100644 (file)
@@ -596,7 +596,7 @@ _checkhost(rhost, lhost, len)
                        nodomain = 1;
                        return(0);
                }
-               ldomain[MAXHOSTNAMELEN] = NULL;
+               ldomain[MAXHOSTNAMELEN] = '\0';
                if ((domainp = index(ldomain, '.')) == (char *)NULL) {
                        nodomain = 1;
                        return(0);
index 2ab62d20ad6f3bb1bb8cedea5a21d639b57db95f..bd467e37ffe474892c8443f31bb5d2c3e2bc62b0 100644 (file)
@@ -274,7 +274,6 @@ struct rx_peer *rxi_FindPeer();
 struct rx_call *rxi_NewCall();
 void rxi_FreeCall();
 struct rx_call *rxi_FindCall();
-void rx_ListenerProc();
 int rxi_ReadPacket();
 struct rx_packet *rxi_ReceivePacket();
 struct rx_packet *rxi_ReceiveDataPacket();
index c78d69541a7a65fc47a23c04068041c2193b403f..6517423b96adf2e4e68d992dd4c3447a16896f4a 100644 (file)
@@ -54,7 +54,7 @@ void rxi_Wakeup(void *addr)
 }
 
 PROCESS rx_listenerPid;        /* LWP process id of socket listener process */
-void rx_ListenerProc();
+static void rx_ListenerProc(void *dummy);
 
 /*
  * Delay the current thread the specified number of seconds.
@@ -250,7 +250,7 @@ void rxi_ListenerProc(rfds, tnop, newcallp)
 /* This is the listener process request loop. The listener process loop
  * becomes a server thread when rxi_ListenerProc returns, and stays
  * server thread until rxi_ServerProc returns. */
-static void rx_ListenerProc()
+static void rx_ListenerProc(void *dummy)
 {
     int threadID;
     int sock;
index 50b62918cdc8b1ba2f2aa96a16148b6f2b0dd7fc..c81f86b05b5c2d2732a3a7805b0b145304e3f80e 100644 (file)
@@ -49,6 +49,8 @@ static long rx_pthread_n_event_wakeups;
  */
 static int rx_pthread_event_rescheduled = 0;
 
+static void rx_ListenerProc(void *);
+
 /*
  * We supply an event handling thread for Rx's event processing.
  * The condition variable is used to wakeup the thread whenever a new
index e0f272dfd57b127c5d8a9a16150496653a053e6e..a774acd66b226cfc89e8d86757d40106acae9c59 100644 (file)
@@ -97,6 +97,7 @@ static unsigned_dec();
 static def_package();
 static def_prefix();
 static def_startingopcode();
+static def_statindex();
 static def_split();
 static customize_struct();
 static def_special();
index 6c2e19e5bca2686156976df68dc33686b9d703bb..43c232a6026d6f07664dff6ade32bbfb775b2e27 100644 (file)
@@ -76,7 +76,7 @@ pthread_mutex_t rxkad_random_mutex;
 static void init_random_int32 ()
 {   struct timeval key;
 
-    gettimeofday (&key, (char *) 0);
+    gettimeofday (&key, NULL);
     LOCK_RM
     fc_keysched (&key, random_int32_schedule);
     UNLOCK_RM
index 51618f7631635229d635f0a592bceb42bd20e6f1..8ec1c4c98046561563b2f74cc9f2672dc2972794 100644 (file)
@@ -48,10 +48,10 @@ afskauthlib.so: sgi_auth.o ${KAFSLIBS} ${AUTHFILES}
        $(LD) ${LDFLAGS} -shared -all -o afskauthlib.so sgi_auth.o $(KAFSLIBS) ${AUTHFILES}
 
 ../rsh/rcmd.o: ../rsh/rcmd.c
-       (cd ../rsh ; make rcmd.o )
+       (cd ../rsh ; $(MAKE) rcmd.o )
 
 ../rsh/herror.o: ../rsh/herror.c
-       (cd ../rsh ; make herror.o )
+       (cd ../rsh ; $(MAKE) herror.o )
 
 sgi_auth.o: sgi_auth.c
        ${CC} ${CFLAGS} -c sgi_auth.c
index e83238946b9a1410ba8c0cc620fb32e8307690b0..9b8fe1548d150c46404f0608cf94212ab7ff6775 100644 (file)
@@ -201,7 +201,8 @@ struct ViceIoctl *data;
 {
     struct rx_connection *conn;
     clientcred creds;
-    afs_int32 errorcode, groups[NGROUPS_MAX], errornumber, ins= data->in_size;
+    afs_int32 errorcode, errornumber, ins= data->in_size;
+    afs_uint32 groups[NGROUPS_MAX];
     rmtbulk InData, OutData;
     char pathname[256], *pathp = pathname, *inbuffer;
 #if 0/*ndef HAVE_GETCWD*/ /* XXX enable when autoconf happens */
index 30499db1d692e17641512ad21631773ddba8c3b1..253ab62625dd7b2b5ac990d08e9c118492730155 100644 (file)
@@ -132,7 +132,7 @@ static void afs_random_once(void)
  * use time and pid to try to get some initial randomness.
  */
 #if !defined(UKERNEL)
-#define        ranstage(x)     (x)= (afs_uint32) (3141592621*((afs_uint32)x)+1)
+#define        ranstage(x)     (x)= (afs_uint32) (3141592621U*((afs_uint32)x)+1)
 
 unsigned int afs_random(void)
 {
index 9ec145cf26613985ffc58c6ed14079357d33d673..a2b497349e22f5987d84678745acef643ea95349 100644 (file)
@@ -64,8 +64,8 @@ typedef off_t           osi_lloff_t;
 static int usd_FileRead(
   usd_handle_t usd,
   char *buf,
-  u_int nbytes,
-  u_int *xferdP)
+  afs_uint32 nbytes,
+  afs_uint32 *xferdP)
 {
     int fd = (int)(usd->handle);
     int got;
@@ -84,8 +84,8 @@ static int usd_FileRead(
 static int usd_FileWrite(
   usd_handle_t usd,
   char *buf,
-  u_int nbytes,
-  u_int *xferdP)
+  afs_uint32 nbytes,
+  afs_uint32 *xferdP)
 {
     int fd = (int)(usd->handle);
     int sent;
index 74e4d8cae1c4ca64aa933998a766fd13649a0bfc..2f92a09fc267f6033660090c194b03e4bd4a0899 100644 (file)
@@ -2764,6 +2764,61 @@ static StoreBehindCmd(as)
     return error;
 }
 
+
+static afs_int32 SetCryptCmd(as)
+    struct cmd_syndesc *as;
+{
+    afs_int32 code = 0, flag;
+    struct ViceIoctl blob;
+    char *tp;
+    tp = as->parms[0].items->data;
+    if (strcmp(tp, "on") == 0)
+      flag = 1;
+    else if (strcmp(tp, "off") == 0)
+      flag = 0;
+    else {
+      fprintf (stderr, "%s: %s must be \"on\" or \"off\".\n", pn, tp);
+      return EINVAL;
+    }
+
+    blob.in = (char *) &flag;
+    blob.in_size = sizeof(flag);
+    blob.out_size = 0;
+    code = pioctl(0, VIOC_SETRXKCRYPT, &blob, 1);
+    if (code)
+      Die(code, (char *) 0);
+    return 0;
+}
+
+
+static afs_int32 GetCryptCmd(as)
+    struct cmd_syndesc *as;
+{
+    afs_int32 code = 0, flag;
+    struct ViceIoctl blob;
+    char *tp;
+    blob.in = (char *) 0;
+    blob.in_size = 0;
+    blob.out_size = sizeof(flag);
+    blob.out = space;
+
+    code = pioctl(0, VIOC_GETRXKCRYPT, &blob, 1);
+
+    if (code) Die(code, (char *) 0);
+    else {
+      tp = space;
+      bcopy(tp, &flag, sizeof(afs_int32));
+      printf("Security level is currently ");
+      if (flag == 1)
+        printf("crypt (data security).\n");
+      else
+        printf("clear.\n");
+    }
+    return 0;
+}
+
 #include "AFS_component_version_number.c"
 
 main(argc, argv)
@@ -2987,6 +3042,9 @@ defect 3069
     cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL, "show status");
     cmd_CreateAlias(ts, "sb");
 
+    ts = cmd_CreateSyntax("setcrypt", SetCryptCmd, 0, "set cache manager encryption flag");
+    cmd_AddParm(ts, "-crypt", CMD_SINGLE, 0, "on or off");
+
     ts = cmd_CreateSyntax("rxstatproc", RxStatProcCmd, 0,
                          "Manage per process RX statistics");
     cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL,
index 6f6650a0dbc20895bab28fa4912b9f39c3f91f93..e57e41081a8c68b606a1271e9d733f0029dd9eaa 100644 (file)
@@ -58,7 +58,7 @@ int LogLevel = 0;
 int smallMem = 0;
 int rxJumbograms = 1;  /* default is to send and receive jumbo grams */
 
-CheckSignal_Signal()       {IOMGR_SoftSig(CheckSignal, 0);}
+static void CheckSignal_Signal()       {IOMGR_SoftSig(CheckSignal, 0);}
 
 static CheckSignal()
 {
index 9d801b2b252da4137d1c3e000d0514e00eb8b34b..1d8a25d14f5a7ea73a04b1b24d75c86c550f77e6 100644 (file)
@@ -431,7 +431,7 @@ int SalvageVolumeHeaderFile(register struct InodeSummary *isp,
 void showlog(void);
 int UseTheForceLuke(char *path);
 
-
+static int IsVnodeOrphaned(VnodeId vnode);
 
 /* Uniquifier stored in the Inode */
 static Unique IUnique(u)
@@ -547,6 +547,14 @@ static handleit(as)
          orphans = ORPH_ATTACH;
     }
 
+#ifdef FAST_RESTART
+    if (ti = as->parms[16].items) {  /* -DontSalvage */
+      printf("Exiting immediately without salvage. Look into the FileLog");
+      printf(" to find volumes which really need to be salvaged!\n");
+      Exit(0);
+    }
+#endif /* FAST_RESTART */ 
     /* Note:  if seemvol we initialize this as a standard volume utility:  this has the
        implication that the file server may be running; negotations have to be made with
        the file server in this case to take the read write volume and associated read-only
@@ -713,6 +721,9 @@ char **argv;
     cmd_AddParm(ts, "-showsuid", CMD_FLAG,CMD_OPTIONAL, "Report on suid/sgid files");
     cmd_AddParm(ts, "-showmounts", CMD_FLAG,CMD_OPTIONAL, "Report on mountpoints");
     cmd_AddParm(ts, "-orphans", CMD_SINGLE, CMD_OPTIONAL, "ignore | remove | attach");
+#ifdef FAST_RESTART
+    cmd_AddParm(ts, "-DontSalvage", CMD_FLAG, CMD_OPTIONAL, "Don't salvage. This my be set in BosConfig to let the fileserver restart immediately after a crash. Bad volumes will be taken offline");
+#endif /* FAST_RESTART */
     err = cmd_Dispatch(argc, argv);
     Exit(err);
 }
index 0d540e328325482ca5bd8e3fccf4e9b0126d26b0..2345e231ddd647b88eae191bc0223e39c9cad593 100644 (file)
@@ -98,7 +98,7 @@
 #include <sys/time.h>
 #endif /* ITIMER_REAL */
 #endif /* AFS_NT40_ENV */
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_LINUX20_ENV)
 #include <string.h>
 #else
 #include <strings.h>
@@ -746,6 +746,7 @@ private Volume *attach2(ec, path, header, partp, isbusy)
        return NULL;
     }
     if (programType == fileServer) {
+#ifndef FAST_RESTART
        if (V_inUse(vp) && VolumeWriteable(vp)) {
            if (!V_needsSalvaged(vp)) {
                V_needsSalvaged(vp) = 1;
@@ -756,6 +757,7 @@ private Volume *attach2(ec, path, header, partp, isbusy)
            *ec = VSALVAGE;
            return NULL;
        }
+#endif /* FAST_RESTART */
        if (V_destroyMe(vp) == DESTROY_ME) {
            FreeVolume(vp);
            Log("VAttachVolume: volume %s is junk; it should be destroyed at next salvage\n", path);
@@ -767,6 +769,7 @@ private Volume *attach2(ec, path, header, partp, isbusy)
     AddVolumeToHashTable(vp, V_id(vp));
     vp->nextVnodeUnique = V_uniquifier(vp);
     vp->vnodeIndex[vSmall].bitmap = vp->vnodeIndex[vLarge].bitmap = NULL;
+#ifndef BITMAP_LATER
     if (programType == fileServer && VolumeWriteable(vp)) {
        int i;
        for (i = 0; i<nVNODECLASSES; i++) {
@@ -779,6 +782,7 @@ private Volume *attach2(ec, path, header, partp, isbusy)
            }
        }
     }
+#endif /* BITMAP_LATER */
 
     if (programType == fileServer) {
         if (vp->specialStatus) vp->specialStatus = 0;
@@ -1209,6 +1213,43 @@ int VAllocBitmapEntry_r(ec,vp,index)
        *ec = VREADONLY;
        return 0;
     }
+#ifdef BITMAP_LATER
+    if ((programType == fileServer) && !index->bitmap) {
+        int i;
+        int wasVBUSY = 0;
+        if (vp->specialStatus == VBUSY) {
+            if (vp->goingOffline) { /* vos dump waiting for the volume to
+                                       go offline. We probably come here
+                                       from AddNewReadableResidency */
+                wasVBUSY = 1;
+            } else {
+                VOL_UNLOCK
+               while (vp->specialStatus == VBUSY)
+#ifdef AFS_PTHREAD_ENV
+                   sleep(2);
+#else /* AFS_PTHREAD_ENV */
+                   IOMGR_Sleep(2);
+#endif /* AFS_PTHREAD_ENV */
+                VOL_LOCK
+           }
+        }
+        if (!index->bitmap) {
+            vp->specialStatus = VBUSY; /* Stop anyone else from using it.*/
+            for (i = 0; i<nVNODECLASSES; i++) {
+                VOL_UNLOCK
+                GetBitmap(ec,vp,i);
+                VOL_LOCK
+                if (*ec) {
+                    vp->specialStatus = 0;
+                    vp->shuttingDown = 1; /* Let who has it free it. */
+                    return NULL;
+                }
+            }
+            if (!wasVBUSY)
+                vp->specialStatus = 0; /* Allow others to have access. */
+        }
+    }
+#endif /* BITMAP_LATER */
     bp = index->bitmap + index->bitmapOffset;
     ep = index->bitmap + index->bitmapSize;
     while (bp < ep) {
@@ -1253,6 +1294,9 @@ void VFreeBitMapEntry_r(Error *ec, register struct vnodeIndex *index,
 {
     unsigned int offset;
      *ec = 0;
+#ifdef BITMAP_LATER
+     if (!index->bitmap) return;
+#endif /* BITMAP_LATER */
      offset = bitNumber>>3;
      if (offset >= index->bitmapSize) {
        *ec = VNOVNODE;
@@ -1339,6 +1383,9 @@ static void GetBitmap(Error *ec, Volume *vp, VnodeClass class)
     struct VnodeDiskObject *vnode;
     unsigned int unique = 0;
     FdHandle_t *fdP;
+#ifdef BITMAP_LATER
+    byte *BitMap = 0;
+#endif /* BITMAP_LATER */
 
     *ec = 0;
 
@@ -1357,9 +1404,14 @@ static void GetBitmap(Error *ec, Volume *vp, VnodeClass class)
                                the whole thing is rounded up to nearest 4
                                bytes, because the bit map allocator likes
                                it that way */
+#ifdef BITMAP_LATER
+    BitMap = (byte *) calloc(1, vip->bitmapSize);
+    assert(BitMap != NULL);
+#else /* BITMAP_LATER */
     vip->bitmap = (byte *) calloc(1, vip->bitmapSize);
     assert(vip->bitmap != NULL);
     vip->bitmapOffset = 0;
+#endif /* BITMAP_LATER */
     if (STREAM_SEEK(file,vcp->diskSize,0) != -1) {
       int bitNumber = 0;
       for (bitNumber = 0; bitNumber < nVnodes+100; bitNumber++) {
@@ -1372,7 +1424,11 @@ static void GetBitmap(Error *ec, Volume *vp, VnodeClass class)
            *ec = VSALVAGE;
            break;
          }
+#ifdef BITMAP_LATER
+          *(BitMap + (bitNumber>>3)) |= (1 << (bitNumber & 0x7));
+#else /* BITMAP_LATER */
          *(vip->bitmap + (bitNumber>>3)) |= (1 << (bitNumber & 0x7));
+#endif /* BITMAP_LATER */
          if (unique <= vnode->uniquifier)
            unique = vnode->uniquifier + 1; 
        }
@@ -1394,6 +1450,17 @@ static void GetBitmap(Error *ec, Volume *vp, VnodeClass class)
     STREAM_CLOSE(file);
     FDH_CLOSE(fdP);
     free(vnode);
+#ifdef BITMAP_LATER
+    /* There may have been a racing condition with some other thread, both
+     * creating the bitmaps for this volume. If the other thread was faster
+     * the pointer to bitmap should already be filled and we can free ours.
+     */
+    if (vip->bitmap == NULL) {
+        vip->bitmap = BitMap;
+        vip->bitmapOffset = 0;
+    } else 
+       free((byte *)BitMap);
+#endif /* BITMAP_LATER */
 }
 
 static void GetVolumePath(Error *ec, VolId volumeId, char **partitionp,
index f58fdd1ca2eeb0d9d9b52906c0be34062c43987d..83b97b33437f3524ddb4e7ec0708cb09f281a201 100644 (file)
@@ -56,7 +56,7 @@
 #ifdef AFS_AIX_ENV
 #include <sys/lockf.h>
 #endif
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_LINUX20_ENV)
 #include <string.h>
 #else
 #include <strings.h>
index d5808f3e713cb61040ff36f4f54c5f16fe13e32e..e44971ffd7e479eabbb386462fb765835fbdaa9d 100644 (file)
@@ -673,7 +673,7 @@ static int DumpDumpHeader(register struct iod *iodp, register Volume *vp,
     if (!code) code = DumpString(iodp, 'n',V_name(vp));
     dumpTimes[0] = fromtime;
     dumpTimes[1] = V_backupDate(vp);   /* Until the time the clone was made */
-    if (!code) code = DumpArrayInt32(iodp, 't', (unsigned int *)dumpTimes, 2);
+    if (!code) code = DumpArrayInt32(iodp, 't', (afs_uint32 *)dumpTimes, 2);
     return code;
 }
 
@@ -811,7 +811,7 @@ int RestoreVolume(register struct rx_call *call, Volume *avp,
     register Volume *vp;
     struct iod iod;
     register struct iod *iodp = &iod;
-    int *b1=0, *b2=0;
+    afs_int32 *b1=0, *b2=0;
     int s1=0, s2=0, delo=0, tdelo;
     int tag;
 
@@ -913,7 +913,7 @@ static int ReadVnodes(register struct iod *iodp, Volume *vp,
     while (tag == D_VNODE) {
         int haveStuff = 0;
        bzero(buf, sizeof (buf));
-       if (!ReadInt32(iodp, (unsigned int *)&vnodeNumber))
+       if (!ReadInt32(iodp, (afs_uint32 *)&vnodeNumber))
            break;
 
        ReadInt32(iodp, &vnode->uniquifier);
@@ -946,7 +946,7 @@ static int ReadVnodes(register struct iod *iodp, Volume *vp,
                    ReadInt32(iodp, &vnode->owner);
                    break;
                case 'g':
-                   ReadInt32(iodp, (unsigned int *)&vnode->group);
+                   ReadInt32(iodp, (afs_uint32 *)&vnode->group);
                    break;
                case 'b': {
                    unsigned short modeBits;
@@ -1101,7 +1101,7 @@ static int ReadDumpHeader(register struct iod *iodp, struct DumpHeader *hp)
     register tag;
     afs_uint32 beginMagic;
     if (iod_getc(iodp) != D_DUMPHEADER || !ReadInt32(iodp, &beginMagic)
-       || !ReadInt32(iodp, (unsigned int *)&hp->version)
+       || !ReadInt32(iodp, (afs_uint32 *)&hp->version)
        || beginMagic != DUMPBEGINMAGIC
        ) return 0;
     hp->volumeId = 0;
@@ -1122,7 +1122,8 @@ static int ReadDumpHeader(register struct iod *iodp, struct DumpHeader *hp)
                    return 0;
                hp->nDumpTimes = (arrayLength >> 1);
                for (i = 0; i<hp->nDumpTimes; i++)
-                   if (!ReadInt32(iodp, (unsigned int *)&hp->dumpTimes[i].from) || !ReadInt32(iodp, (unsigned int *)&hp->dumpTimes[i].to))
+                   if (!ReadInt32(iodp, (afs_uint32 *)&hp->dumpTimes[i].from)
+                       || !ReadInt32(iodp, (afs_uint32 *)&hp->dumpTimes[i].to))
                        return 0;
                break;
        }