uss-prototypes-20090316
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 16 Mar 2009 13:43:34 +0000 (13:43 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 16 Mar 2009 13:43:34 +0000 (13:43 +0000)
LICENSE IPL10
FIXES 124248

prototype the uss directory

15 files changed:
src/uss/uss.c
src/uss/uss_acl.c
src/uss/uss_acl.h
src/uss/uss_common.c
src/uss/uss_common.h
src/uss/uss_fs.c
src/uss/uss_fs.h
src/uss/uss_kauth.c
src/uss/uss_kauth.h
src/uss/uss_procs.c
src/uss/uss_procs.h
src/uss/uss_ptserver.c
src/uss/uss_ptserver.h
src/uss/uss_vol.c
src/uss/uss_vol.h

index f4c5063..9564570 100644 (file)
@@ -31,11 +31,18 @@ RCSID
 #include "uss_procs.h"         /*Main uss operations */
 #include "uss_kauth.h"         /*AuthServer routines */
 #include "uss_fs.h"            /*CacheManager ops */
+#include "uss_ptserver.h"
+#include "uss_vol.h"
+#include "uss_acl.h"
 #include <afs/cmd.h>           /*Command line parsing */
 #include <afs/cellconfig.h>    /*Cell config defs */
 #include <afs/kautils.h>       /*MAXKTCREALMLEN & MAXKTCNAMELEN */
+#include <afs/pterror.h>
+#include <afs/vlserver.h>
 #include <ubik.h>
 
+extern int yylex(void);
+extern int yyparse (void);
 /*
  * Label certain things which will be activated at a later time,
  * as well as certain semi-implemented features/switches which need
@@ -101,7 +108,7 @@ extern int doUnlog;
 int uss_BulkExpires = 0;
 int local_Cell = 1;
 
-static int DoAdd();
+static int DoAdd(void);
 
 /*-----------------------------------------------------------------------
  * static GetCommon
@@ -130,7 +137,7 @@ GetCommon(register struct cmd_syndesc *a_as, void *arock)
     int code;                  /*Result of ka_LocalCell */
 
     if (strcmp(a_as->name, "help") == 0)
-       return;
+       return 0;
     if (a_as->parms[AUSS_TEMPLATE].items)
        strcpy(Template, a_as->parms[AUSS_TEMPLATE].items->data);
     if (a_as->parms[AUSS_VERBOSE].items)
@@ -208,10 +215,11 @@ GetCommon(register struct cmd_syndesc *a_as, void *arock)
  *------------------------------------------------------------------------*/
 
 static int
-SaveRestoreInfo()
+SaveRestoreInfo(void)
 {                              /*SaveRestoreInfo */
-
+#ifdef USS_DB
     static char rn[] = "uss:SaveRestoreInfo";  /*Routine name */
+#endif
     register afs_int32 code;   /*Return code */
     afs_int32 deletedUid;      /*Uid to be nuked */
 
@@ -266,7 +274,7 @@ SaveRestoreInfo()
  *------------------------------------------------------------------------*/
 
 static int
-DoDelete()
+DoDelete(void)
 {                              /*DoDelete */
 
     int code;                  /*Return code */
@@ -438,7 +446,8 @@ DelUser(struct cmd_syndesc *a_as, void *a_rock)
 
 }                              /*DelUser */
 
-
+#if USS_FUTURE_FEATURES
+#if USS_DONT_HIDE_SOME_FEATURES
 /*-----------------------------------------------------------------------
  * static PurgeVolumes
  *
@@ -502,6 +511,8 @@ RestoreUser(struct cmd_syndesc *a_as, void *a_rock)
 
 }                              /*RestoreUser */
 
+#endif
+#endif
 
 /*-----------------------------------------------------------------------
  * static DoBulkAddLine
@@ -527,14 +538,13 @@ RestoreUser(struct cmd_syndesc *a_as, void *a_rock)
  *------------------------------------------------------------------------*/
 
 static int
-DoBulkAddLine(a_buf, a_tp)
-     char *a_buf;
-     char *a_tp;
-
+DoBulkAddLine(char *a_buf,  char *a_tp)
 {                              /*DoBulkAddLine */
 
     register int i;            /*Loop variable */
+#ifdef USS_DB
     static char rn[] = "DoBulkAddLine";        /*Routine name */
+#endif
     int overflow;              /*Overflow in field copy? */
 
 #ifdef USS_DB
@@ -748,10 +758,7 @@ DoBulkAddLine(a_buf, a_tp)
  *------------------------------------------------------------------------*/
 
 static int
-DoBulkDeleteLine(a_buf, a_tp)
-     char *a_buf;
-     char *a_tp;
-
+DoBulkDeleteLine(char *a_buf, char *a_tp)
 {                              /*DoBulkDeleteLine */
 
     char volField[32];         /*Value of optional vol disposition field */
@@ -908,10 +915,7 @@ DoBulkDeleteLine(a_buf, a_tp)
  *------------------------------------------------------------------------*/
 
 static int
-DoBulkPurgeVolumeLine(a_buf, a_tp)
-     char *a_buf;
-     char *a_tp;
-
+DoBulkPurgeVolumeLine(char *a_buf, char *a_tp)
 {                              /*DoBulkPurgeVolumeLine */
 
     register int i;            /*Loop variable */
@@ -1089,10 +1093,7 @@ DoBulkPurgeVolumeLine(a_buf, a_tp)
  *------------------------------------------------------------------------*/
 
 static int
-DoBulkRestoreLine(a_buf, a_tp)
-     char *a_buf;
-     char *a_tp;
-
+DoBulkRestoreLine(char *a_buf, char *a_tp)
 {                              /*DoBulkRestoreLine */
 
     register int i;            /*Loop variable */
@@ -1266,10 +1267,7 @@ DoBulkRestoreLine(a_buf, a_tp)
  *------------------------------------------------------------------------*/
 
 static int
-DoBulkExecLine(a_buf, a_tp)
-     char *a_buf;
-     char *a_tp;
-
+DoBulkExecLine(char *a_buf, char *a_tp)
 {                              /*DoBulkExecLine */
 
     register afs_int32 code;   /*Return code */
@@ -1639,7 +1637,7 @@ AddUser(register struct cmd_syndesc *a_as, void *a_rock)
  *------------------------------------------------------------------------*/
 
 static int
-DoAdd()
+DoAdd(void)
 {                              /*DoAdd */
 
     int code;                  /*Return code */
@@ -1730,7 +1728,7 @@ DoAdd()
  *------------------------------------------------------------------------*/
 
 static int
-DoRestore()
+DoRestore(void)
 {                              /*DoRestore */
 
     return (0);
@@ -1760,7 +1758,7 @@ DoRestore()
  *------------------------------------------------------------------------*/
 
 void
-InitETTables()
+InitETTables(void)
 {                              /*InitETTables */
 
 
@@ -1781,7 +1779,7 @@ InitETTables()
 
 
 int
-osi_audit()
+osi_audit(void)
 {
 /* this sucks but it works for now.
 */
@@ -1790,10 +1788,8 @@ osi_audit()
 
 #include "AFS_component_version_number.c"
 
-main(argc, argv)
-     int argc;
-     char *argv[];
-
+int
+main(int argc, char *argv[])
 {                              /*Main routine */
 
     register struct cmd_syndesc *cs;   /*Command line syntax descriptor */
index 7347426..832671d 100644 (file)
@@ -56,7 +56,7 @@ struct AclEntry {
     afs_int32 rights;
 };
 
-static int PruneList();
+static int PruneList(struct AclEntry **a_aclPP);
 
 
 /*------------------------------------------------------------------------
@@ -80,11 +80,8 @@ static int PruneList();
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-static
-foldcmp(a_str1, a_str2)
-     register char *a_str1;
-     register char *a_str2;
-
+static int
+foldcmp(register char *a_str1, register char *a_str2)
 {                              /*foldcmp */
 
     register char t, u;
@@ -126,9 +123,7 @@ foldcmp(a_str1, a_str2)
  *------------------------------------------------------------------------*/
 
 static afs_int32
-Convert(a_rights)
-     register char *a_rights;
-
+Convert(register char *a_rights)
 {                              /*Convert */
 
     register int i, len;
@@ -201,10 +196,7 @@ Convert(a_rights)
  *------------------------------------------------------------------------*/
 
 static struct AclEntry *
-FindList(a_alist, a_name)
-     register struct AclEntry *a_alist;
-     char *a_name;
-
+FindList(register struct AclEntry *a_alist, char *a_name)
 {                              /*FindList */
 
     while (a_alist) {
@@ -242,12 +234,8 @@ FindList(a_alist, a_name)
  *------------------------------------------------------------------------*/
 
 static void
-ChangeList(a_al, a_plus, a_name, a_rights)
-     struct Acl *a_al;
-     afs_int32 a_plus;
-     char *a_name;
-     afs_int32 a_rights;
-
+ChangeList(struct Acl *a_al, afs_int32 a_plus, char *a_name, 
+          afs_int32 a_rights)
 {                              /*ChangeList */
 
     struct AclEntry *tlist;
@@ -308,9 +296,7 @@ ChangeList(a_al, a_plus, a_name, a_rights)
  *------------------------------------------------------------------------*/
 
 static int
-PruneList(a_aclPP)
-     struct AclEntry **a_aclPP;
-
+PruneList(struct AclEntry **a_aclPP)
 {                              /*PruneList */
 
     struct AclEntry **lPP;
@@ -356,9 +342,7 @@ PruneList(a_aclPP)
  *------------------------------------------------------------------------*/
 
 static char *
-SkipLine(a_str)
-     register char *a_str;
-
+SkipLine(register char *a_str)
 {                              /*SkipLine */
 
     while (*a_str != '\n')
@@ -389,7 +373,7 @@ SkipLine(a_str)
  *------------------------------------------------------------------------*/
 
 static struct Acl *
-EmptyAcl()
+EmptyAcl(void)
 {                              /*EmptyAcl */
 
     register struct Acl *tp;
@@ -423,9 +407,7 @@ EmptyAcl()
  *------------------------------------------------------------------------*/
 
 static struct Acl *
-ParseAcl(a_str)
-     char *a_str;
-
+ParseAcl(char *a_str)
 {                              /*ParseAcl */
 
     int nplus, nminus, i, trights;
@@ -515,9 +497,7 @@ ParseAcl(a_str)
  *------------------------------------------------------------------------*/
 
 static char *
-AclToString(a_acl)
-     struct Acl *a_acl;
-
+AclToString(struct Acl *a_acl)
 {                              /*AclToString */
 
     static char mydata[MAXSIZE];
@@ -562,15 +542,13 @@ AclToString(a_acl)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_acl_SetAccess(a_access, a_clear, a_negative)
-     char *a_access;
-     int a_clear;
-     int a_negative;
-
+uss_acl_SetAccess(char *a_access, int a_clear, int a_negative)
 {                              /*uss_acl_SetAccess */
 
     register afs_int32 code;
+#ifdef USS_ACL_DB
     static char rn[] = "uss_acl_SetAccess";
+#endif
     struct Acl *ta;
     char *externalizedACL;
     int plusp;
@@ -688,14 +666,13 @@ uss_acl_SetAccess(a_access, a_clear, a_negative)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_acl_SetDiskQuota(a_path, a_q)
-     char *a_path;
-     int a_q;
-
+uss_acl_SetDiskQuota(char *a_path, int a_q)
 {                              /*uss_acl_SetDiskQuota */
 
     register afs_int32 code;
+#ifdef USS_ACL_DB
     static char rn[] = "uss_acl_SetDiskQuota";
+#endif
     uss_VolumeStatus_t *status;
     char *name, *motd, *offmsg;
     char *input;
@@ -743,10 +720,9 @@ uss_acl_SetDiskQuota(a_path, a_q)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_acl_CleanUp()
+uss_acl_CleanUp(void)
 {                              /*uss_acl_CleanUp */
 
-    static char rn[] = "uss_acl_CleanUp";
     struct uss_subdir *t, *old_t = NULL;
     char tmp_str[uss_MAX_SIZE];
 
index 0b05249..eb74764 100644 (file)
@@ -17,7 +17,8 @@
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern afs_int32 uss_acl_SetAccess();
+extern afs_int32 uss_acl_SetAccess(char *a_access, int a_clear, 
+                                          int a_negative);
     /*
      * Summary:
      *    Set the value of the given ACL.
@@ -32,7 +33,7 @@ extern afs_int32 uss_acl_SetAccess();
      *    Lower-level code otherwise.
      */
 
-extern afs_int32 uss_acl_SetDiskQuota();
+extern afs_int32 uss_acl_SetDiskQuota(char *a_path, int a_q);
     /*
      * Summary:
      *    Set the initial disk quota for a user.
@@ -46,7 +47,7 @@ extern afs_int32 uss_acl_SetDiskQuota();
      *    Lower-level code otherwise.
      */
 
-extern afs_int32 uss_acl_CleanUp();
+extern afs_int32 uss_acl_CleanUp(void);
     /*
      * Summary:
      *    Remove the uss_AccountCreator from the various ACLs s/he
index 7cf2a99..d8b34fb 100644 (file)
@@ -107,7 +107,7 @@ static int initDone = 0;    /*Have we been initialized? */
  *------------------------------------------------------------------------*/
 
 void
-uss_common_Init()
+uss_common_Init(void)
 {                              /*uss_common_Init */
 
     extern int line;           /*Current template line */
@@ -147,7 +147,7 @@ uss_common_Init()
  *------------------------------------------------------------------------*/
 
 void
-uss_common_Reset()
+uss_common_Reset(void)
 {                              /*uss_common_Reset */
 
     extern int line;           /*Current template line */
@@ -196,13 +196,8 @@ uss_common_Reset()
  *------------------------------------------------------------------------*/
 
 char *
-uss_common_FieldCp(a_to, a_from, a_separator, a_maxChars, a_overflowP)
-     char *a_to;
-     char *a_from;
-     char a_separator;
-     int a_maxChars;
-     int *a_overflowP;
-
+uss_common_FieldCp(char *a_to, char *a_from, char a_separator, 
+                  int a_maxChars, int *a_overflowP)
 {                              /*uss_common_FieldCp */
 
     register int chars_read;   /*Number of chars read so far */
index ecfc630..df496ed 100644 (file)
@@ -145,7 +145,7 @@ extern struct uss_subdir *uss_currentDir;   /*Current directory */
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern void uss_common_Init();
+extern void uss_common_Init(void);
     /*
      * Summary:
      *    Set up various common uss variables, especially the saved
@@ -158,7 +158,7 @@ extern void uss_common_Init();
      *    Nothing.
      */
 
-extern void uss_common_Reset();
+extern void uss_common_Reset(void);
     /*
      * Summary:
      *    Reset some common uss variables to their idle or
@@ -171,7 +171,8 @@ extern void uss_common_Reset();
      *    Nothing.
      */
 
-extern char *uss_common_FieldCp();
+extern char *uss_common_FieldCp(char *a_to, char *a_from, char a_separator,
+                               int a_maxChars, int *a_overflowP);
     /*
      * Summary:
      *    Copy a ``field'', as terminated by the given separator, or
index 3b87470..4273b5f 100644 (file)
@@ -31,8 +31,11 @@ RCSID
 #include <netinet/in.h>
 
 #include <string.h>
+#include <unistd.h>
 
 #include <afs/venus.h>
+#include <rx/rx.h>
+#include <afs/sys_prototypes.h>
 #include "uss_common.h"
 
 
@@ -70,12 +73,8 @@ static struct ViceIoctl *blobP = &blob;      /*Ptr to above */
  *------------------------------------------------------------------------*/
 
 static int
-InAFS(a_path)
-     register char *a_path;
-
+InAFS(register char *a_path)
 {                              /*InAFS */
-
-    static char rn[] = "uss_fs:InAFS";
     register afs_int32 code;
 
     blob.in = NULL;
@@ -117,14 +116,8 @@ InAFS(a_path)
  *------------------------------------------------------------------------*/
 
 static char *
-ParentAndComponent(a_path, a_parentBuff, a_componentPP)
-     char *a_path;
-     char *a_parentBuff;
-     char **a_componentPP;
-
+ParentAndComponent(char *a_path, char *a_parentBuff, char **a_componentPP)
 {                              /*ParentAndComponent */
-
-    static char rn[] = "uss_fs:Parent";
     char *rightSlashP;
 
     /*
@@ -175,15 +168,11 @@ ParentAndComponent(a_path, a_parentBuff, a_componentPP)
  *------------------------------------------------------------------------*/
 
 static int
-CarefulPioctl(a_path, a_opcode, a_blobP, a_sl)
-     char *a_path;
-     int a_opcode;
-     struct ViceIoctl *a_blobP;
-     int a_sl;
-
+CarefulPioctl(char *a_path, int a_opcode, struct ViceIoctl *a_blobP, int a_sl)
 {                              /*CarefulPioctl */
-
+#ifdef USS_FS_DB
     static char rn[] = "uss_fs:CarefulPioctl";
+#endif
     register afs_int32 code;
 
     /*
@@ -226,14 +215,11 @@ CarefulPioctl(a_path, a_opcode, a_blobP, a_sl)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_GetACL(a_dirPath, a_aclBuff, a_aclBuffBytes)
-     char *a_dirPath;
-     char *a_aclBuff;
-     afs_int32 a_aclBuffBytes;
-
+uss_fs_GetACL(char *a_dirPath, char *a_aclBuff, afs_int32 a_aclBuffBytes)
 {                              /*uss_fs_GetACL */
-
+#ifdef USS_FS_DB
     static char rn[] = "uss_fs_GetACL";        /*Routine name */
+#endif
     register afs_int32 code;   /*pioctl() result */
 
     blob.in = NULL;
@@ -269,14 +255,11 @@ uss_fs_GetACL(a_dirPath, a_aclBuff, a_aclBuffBytes)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_SetACL(a_dirPath, a_aclBuff, a_aclBuffBytes)
-     char *a_dirPath;
-     char *a_aclBuff;
-     afs_int32 a_aclBuffBytes;
-
+uss_fs_SetACL(char *a_dirPath, char *a_aclBuff, afs_int32 a_aclBuffBytes)
 {                              /*uss_fs_SetACL */
-
+#ifdef USS_FS_DB
     static char rn[] = "uss_fs_SetACL";        /*Routine name */
+#endif
     register afs_int32 code;   /*pioctl() result */
 
     blob.in = a_aclBuff;
@@ -313,14 +296,12 @@ uss_fs_SetACL(a_dirPath, a_aclBuff, a_aclBuffBytes)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_GetVolStat(a_mountpoint, a_volStatBuff, a_volStatBuffBytes)
-     char *a_mountpoint;
-     char *a_volStatBuff;
-     afs_int32 a_volStatBuffBytes;
-
+uss_fs_GetVolStat(char *a_mountpoint, char *a_volStatBuff,
+                 afs_int32 a_volStatBuffBytes)
 {                              /*uss_fs_GetVolStat */
-
+#ifdef USS_FS_DB
     static char rn[] = "uss_fs_GetVolStat";    /*Routine name */
+#endif
     register afs_int32 code;   /*pioctl() result */
 
     blob.in = NULL;
@@ -356,14 +337,12 @@ uss_fs_GetVolStat(a_mountpoint, a_volStatBuff, a_volStatBuffBytes)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_SetVolStat(a_mountpoint, a_volStatBuff, a_volStatBuffBytes)
-     char *a_mountpoint;
-     char *a_volStatBuff;
-     afs_int32 a_volStatBuffBytes;
-
+uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff, 
+                 afs_int32 a_volStatBuffBytes)
 {                              /*uss_fs_SetVolStat */
-
+#ifdef USS_FS_DB
     static char rn[] = "uss_fs_SetVolStat";    /*Routine name */
+#endif
     register afs_int32 code;   /*pioctl() result */
 
     blob.in = a_volStatBuff;
@@ -399,10 +378,11 @@ uss_fs_SetVolStat(a_mountpoint, a_volStatBuff, a_volStatBuffBytes)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_CkBackups()
+uss_fs_CkBackups(void)
 {                              /*uss_fs_CkBackups */
-
+#ifdef USS_FS_DB
     static char rn[] = "uss_fs_CkBackups";     /*Routine name */
+#endif
     register afs_int32 code;   /*pioctl() result */
 
     blob.in = NULL;
@@ -440,12 +420,8 @@ uss_fs_CkBackups()
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_MkMountPoint(a_volname, a_cellname, a_rw, a_mountpoint)
-     char *a_volname;
-     char *a_cellname;
-     afs_int32 a_rw;
-     char *a_mountpoint;
-
+uss_fs_MkMountPoint(char *a_volname, char *a_cellname, afs_int32 a_rw,
+                   char *a_mountpoint)
 {                              /*uss_fs_MkMountPoint */
     extern int local_Cell;
     static char rn[] = "uss_fs_MkMountPoint";  /*Routine name */
@@ -504,11 +480,8 @@ uss_fs_MkMountPoint(a_volname, a_cellname, a_rw, a_mountpoint)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_fs_RmMountPoint(a_mountpoint)
-     char *a_mountpoint;
-
+uss_fs_RmMountPoint(char *a_mountpoint)
 {                              /*uss_fs_RmMountPoint */
-
     static char rn[] = "uss_fs_RmMountPoint";  /*Routine name */
     register afs_int32 code;   /*pioctl() result */
     char *parentDirP;          /*Ptr to parent */
@@ -581,10 +554,10 @@ struct tokenInfo {
  * permissions list,) destroy all tokens, and then re-register the good ones.
  * Ugly, but it works.
  */
-uss_fs_UnlogToken(celln)
-     char *celln;
+int
+uss_fs_UnlogToken(char *celln)
 {
-    unsigned count = 0, index, index2;
+    unsigned int count = 0, index, index2;
     afs_int32 code = 0, cnt = 0;
     struct ktc_principal serviceName;
     struct tokenInfo *tokenInfoP, *tp;
@@ -610,7 +583,7 @@ uss_fs_UnlogToken(celln)
            }
        }
     }
-    if (code = ktc_ForgetAllTokens()) {
+    if ((code = ktc_ForgetAllTokens())) {
        printf("uss_fs_UnlogToken: could not discard tickets, code %d\n",
               code);
        exit(1);
index 9f22d96..9fe29ca 100644 (file)
@@ -31,7 +31,8 @@ extern char *uss_fs_OutBuff;  /*Cache Manager output buff */
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern afs_int32 uss_fs_GetACL();
+extern afs_int32 uss_fs_GetACL(char *a_dirPath, char *a_aclBuff, 
+                                      afs_int32 a_aclBuffBytes);
     /*
      * Summary:
      *    Given the pathname for a directory, return its ACL.
@@ -47,7 +48,8 @@ extern afs_int32 uss_fs_GetACL();
      *    -1 otherwise, with errno set to the error.
      */
 
-extern afs_int32 uss_fs_SetACL();
+extern afs_int32 uss_fs_SetACL(char *a_dirPath, char *a_aclBuff, 
+                              afs_int32 a_aclBuffBytes);
     /*
      * Summary:
      *    Set the ACL on the specified directory.
@@ -63,7 +65,8 @@ extern afs_int32 uss_fs_SetACL();
      *    -1 otherwise, with errno set to the error.
      */
 
-extern afs_int32 uss_fs_GetVolStat();
+extern afs_int32 uss_fs_GetVolStat(char *a_mountpoint, char *a_volStatBuff,
+                                  afs_int32 a_volStatBuffBytes);
     /*
      * Summary:
      *    Given the pathname of an AFS mountpoint, find out what you
@@ -79,7 +82,8 @@ extern afs_int32 uss_fs_GetVolStat();
      *    -1 otherwise, with errno set to the error.
      */
 
-extern afs_int32 uss_fs_SetVolStat();
+extern afs_int32 uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff,
+                                  afs_int32 a_volStatBuffBytes);
     /*
      * Summary:
      *    Given the pathname of an AFS mountpoint, set the status info
@@ -95,7 +99,7 @@ extern afs_int32 uss_fs_SetVolStat();
      *    -1 otherwise, with errno set to the error.
      */
 
-extern afs_int32 uss_fs_CkBackups();
+extern afs_int32 uss_fs_CkBackups(void);
     /*
      * Summary:
      *    Make sure the CacheManager doesn't have any stale volume
@@ -109,7 +113,8 @@ extern afs_int32 uss_fs_CkBackups();
      *    -1 otherwise, with errno set to the error.
      */
 
-extern afs_int32 uss_fs_MkMountPoint();
+extern afs_int32 uss_fs_MkMountPoint(char *a_volname, char *a_cellname, 
+                                    afs_int32 a_rw, char *a_mountpoint);
     /*
      * Summary: *NEW*
      *    Given the name of the volume, the cell it lives in,
@@ -128,7 +133,7 @@ extern afs_int32 uss_fs_MkMountPoint();
      *    -1 otherwise, with errno set to the error.
      */
 
-extern afs_int32 uss_fs_RmMountPoint();
+extern afs_int32 uss_fs_RmMountPoint(char *a_mountpoint);
     /*
      * Summary:
      *    Delete the given mountpoint.
@@ -141,4 +146,6 @@ extern afs_int32 uss_fs_RmMountPoint();
      *    -1 otherwise, with errno set to the error.
      */
 
+extern int uss_fs_UnlogToken(char *celln);
+
 #endif /* _USS_FS_H_ */
index d735088..292f73c 100644 (file)
@@ -31,6 +31,7 @@ RCSID
 #include <afs/com_err.h>
 #include <afs/kautils.h> /*MAXKTCREALMLEN*/
 #include <afs/kaport.h>                /* pack_long */
+#include <afs/kauth.h>
 #define uss_kauth_MAX_SIZE     2048
 #undef USS_KAUTH_DB
 /*
@@ -60,7 +61,7 @@ int doUnlog = 0;
  *-----------------------------------------------------------------------*/
 
 afs_int32
-uss_kauth_InitAccountCreator()
+uss_kauth_InitAccountCreator(void)
 {                              /*uss_kauth_InitAccountCreator */
 
     char *name;
@@ -141,7 +142,7 @@ uss_kauth_InitAccountCreator()
 
 int Pipe = 0;
 static char *
-getpipepass()
+getpipepass(void)
 {
     static char gpbuf[BUFSIZ];
     /* read a password from stdin, stop on \n or eof */
@@ -158,12 +159,13 @@ getpipepass()
 
 
 afs_int32
-InitThisModule()
+InitThisModule(void)
 {                              /*InitThisModule */
-
+#ifdef USS_KAUTH_DB
     static char rn[] = "uss_kauth:InitThisModule";
+#endif
     register afs_int32 code;
-    char *name, prompt[2 * MAXKTCNAMELEN + 20];
+    char prompt[2 * MAXKTCNAMELEN + 20];
     char *reasonString, longPassBuff[1024], shortPassBuff[9];
     struct ktc_encryptionKey key;
     struct ktc_token token, tok;
@@ -302,8 +304,8 @@ InitThisModule()
        strcpy(Name.name, "afs");
        Name.instance[0] = '\0';
        strncpy(Name.cell, uss_Cell, sizeof(Name.cell));
-       if (code =
-           ktc_GetToken(&Name, &token, sizeof(struct ktc_token), &tok)) {
+       if ((code =
+           ktc_GetToken(&Name, &token, sizeof(struct ktc_token), &tok))) {
            code =
                ka_UserAuthenticateLife(0, uss_AccountCreator,
                                        CreatorInstance, uss_Cell,
@@ -335,14 +337,13 @@ InitThisModule()
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_kauth_AddUser(a_user, a_passwd)
-     char *a_user;
-     char *a_passwd;
-
+uss_kauth_AddUser(char *a_user, char *a_passwd)
 {                              /*uss_kauth_AddUser */
-
+#ifdef USS_KAUTH_DB
     static char rn[] = "uss_kauth_AddUser";    /*Routine name */
-    struct ktc_encryptionKey key;
+#endif
+    struct ktc_encryptionKey ktc_key;
+    EncryptionKey key;
     afs_int32 code;
 
     if (uss_SkipKaserver) {
@@ -372,8 +373,10 @@ uss_kauth_AddUser(a_user, a_passwd)
      * Given the (unencrypted) password and cell, generate a key to
      * pass to the AuthServer.
      */
-    ka_StringToKey(a_passwd, uss_Cell, &key);
+    ka_StringToKey(a_passwd, uss_Cell, &ktc_key);
 
+    memcpy(&key, &ktc_key, sizeof(key)); /* XXX - we could just cast */
+    
     if (!uss_DryRun) {
        if (uss_verbose)
            fprintf(stderr, "Adding user '%s' to the Authentication DB\n",
@@ -384,8 +387,9 @@ uss_kauth_AddUser(a_user, a_passwd)
                "%s: KAM_CreateUser: user='%s', CreatorInstance='%s', %d bytes\n",
                rn, a_user, CreatorInstance, strlen(CreatorInstance));
 #endif /* USS_KAUTH_DB_INSTANCE */
-       code = ubik_Call(KAM_CreateUser, uconn_kauthP, 0, a_user, UserInstance, /*set by CheckUsername() */
-                        key);
+       code = ubik_KAM_CreateUser(uconn_kauthP, 0, a_user, 
+                                  UserInstance,        /*set by CheckUsername() */
+                                  key);
        if (code) {
            if (code == KAEXIST) {
                if (uss_verbose)
@@ -425,12 +429,11 @@ uss_kauth_AddUser(a_user, a_passwd)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_kauth_DelUser(a_user)
-     char *a_user;
-
+uss_kauth_DelUser(char *a_user)
 {                              /*uss_kauth_DelUser */
-
+#ifdef USS_KAUTH_DB
     static char rn[] = "uss_kauth_DelUser";    /*Routine name */
+#endif
     register afs_int32 code;   /*Return code */
 
     if (uss_SkipKaserver) {
@@ -462,7 +465,7 @@ uss_kauth_DelUser(a_user)
 #endif /* USS_KAUTH_DB_INSTANCE */
        if (uss_verbose)
            printf("Deleting user '%s' from Authentication DB\n", a_user);
-       code = ubik_Call(KAM_DeleteUser,        /*Procedure to call */
+       code = ubik_KAM_DeleteUser(
                         uconn_kauthP,  /*Ubik client connection struct */
                         0,     /*Flags */
                         a_user,        /*User name to delete */
@@ -505,10 +508,11 @@ uss_kauth_DelUser(a_user)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_kauth_CheckUserName()
+uss_kauth_CheckUserName(void)
 {                              /*uss_kauth_CheckUserName */
-
+#ifdef USS_KAUTH_DB
     static char rn[] = "uss_kauth_CheckUserName";      /*Routine name */
+#endif
     register afs_int32 code;   /*Return code */
 
     if (uss_SkipKaserver) {
@@ -583,14 +587,12 @@ uss_kauth_CheckUserName()
  */
 
 afs_int32
-uss_kauth_SetFields(username, expirestring, reuse, failures, lockout)
-     char *reuse;
-     char *username;
-     char *expirestring;
-     char *failures;
-     char *lockout;
+uss_kauth_SetFields(char *username, char *expirestring, char *reuse, 
+                   char *failures, char *lockout)
 {
+#ifdef USS_KAUTH_DB
     static char rn[] = "uss_kauth_SetFields";
+#endif
     afs_int32 code;
     char misc_auth_bytes[4];
     int i;
index 4fd7ebf..efc7968 100644 (file)
@@ -28,7 +28,7 @@
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern afs_int32 uss_kauth_InitAccountCreator();
+extern afs_int32 uss_kauth_InitAccountCreator(void);
     /*
      * Summary:
      *    Initialize the variable uss_AccountCreator().
@@ -41,7 +41,7 @@ extern afs_int32 uss_kauth_InitAccountCreator();
      *    1 if couldn't get user name from getpwuid().
      */
 
-extern afs_int32 uss_kauth_AddUser();
+extern afs_int32 uss_kauth_AddUser(char *, char *);
     /*
      * Summary:
      *    Register the given user with the Authentication Server.
@@ -56,7 +56,7 @@ extern afs_int32 uss_kauth_AddUser();
      *    Code returned from a lower-level call.
      */
 
-extern afs_int32 uss_kauth_DelUser();
+extern afs_int32 uss_kauth_DelUser(char *);
     /*
      * Summary:
      *    Delete the given user from the Authentication Database.
@@ -70,7 +70,7 @@ extern afs_int32 uss_kauth_DelUser();
      *    Code returned from a lower-level call.
      */
 
-extern afs_int32 uss_kauth_CheckUserName();
+extern afs_int32 uss_kauth_CheckUserName(void);
     /*
      * Summary:
      *    Make sure the parsed user name is a legal one.
index 70c60d2..724df7b 100644 (file)
@@ -34,7 +34,8 @@ RCSID
 #endif
 
 #include <string.h>
-
+#include <stdarg.h>
+    
 #include <afs/kautils.h> /*MAXKTCREALMLEN*/
 #undef USS_PROCS_DB
 #undef USS_PROCS_DB_INSTANCE
@@ -43,8 +44,8 @@ RCSID
 char temp[1000];
 extern int line;
 
-static int Copy();
-static int Echo();
+static int Copy(char *a_from, char *a_to, int a_mode);
+static int Echo(char *a_s, char *a_f, int a_mode);
 
 /*-----------------------------------------------------------------------
  * EXPORTED uss_procs_BuildDir
@@ -57,12 +58,7 @@ static int Echo();
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_procs_BuildDir(a_path, a_mode, a_owner, a_access)
-     char *a_path;
-     char *a_mode;
-     char *a_owner;
-     char *a_access;
-
+uss_procs_BuildDir(char *a_path, char *a_mode, char *a_owner, char *a_access)
 {                              /*uss_procs_BuildDir */
 
     int m, o;
@@ -186,12 +182,7 @@ uss_procs_BuildDir(a_path, a_mode, a_owner, a_access)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_procs_CpFile(a_path, a_mode, a_owner, a_proto)
-     char *a_path;
-     char *a_mode;
-     char *a_owner;
-     char *a_proto;
-
+uss_procs_CpFile(char *a_path, char *a_mode, char *a_owner, char *a_proto)
 {                              /*uss_procs_CpFile */
 
     int m, o;
@@ -288,12 +279,8 @@ uss_procs_CpFile(a_path, a_mode, a_owner, a_proto)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_procs_EchoToFile(a_path, a_mode, a_owner, a_content)
-     char *a_path;
-     char *a_mode;
-     char *a_owner;
-     char *a_content;
-
+uss_procs_EchoToFile(char *a_path, char *a_mode, char *a_owner, 
+                    char *a_content)
 {                              /*uss_procs_EchoToFile */
 
     int m, o;
@@ -371,9 +358,7 @@ uss_procs_EchoToFile(a_path, a_mode, a_owner, a_content)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_procs_Exec(a_command)
-     char *a_command;
-
+uss_procs_Exec(char *a_command)
 {                              /*uss_procs_Exec */
 
     if (uss_verbose)
@@ -409,11 +394,7 @@ uss_procs_Exec(a_command)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_procs_SetLink(a_path1, a_path2, a_type)
-     char *a_path1;
-     char *a_path2;
-     char a_type;
-
+uss_procs_SetLink(char *a_path1, char *a_path2, char a_type)
 {                              /*uss_procs_SetLink */
 
     struct stat stbuf;
@@ -488,9 +469,7 @@ uss_procs_SetLink(a_path1, a_path2, a_type)
  *------------------------------------------------------------------------*/
 
 int
-uss_procs_GetOwner(a_ownerStr)
-     char *a_ownerStr;
-
+uss_procs_GetOwner(char *a_ownerStr)
 {                              /*uss_procs_GetOwner */
 
     struct passwd *pw;         /*Ptr to password file entry */
@@ -535,11 +514,7 @@ uss_procs_GetOwner(a_ownerStr)
  *------------------------------------------------------------------------*/
 
 static int
-Copy(a_from, a_to, a_mode)
-     char *a_from;
-     char *a_to;
-     int a_mode;
-
+Copy(char *a_from, char *a_to, int a_mode)
 {                              /*Copy */
 
     register int fd1, fd2;
@@ -585,7 +560,7 @@ Copy(a_from, a_to, a_mode)
                           strerror(errno));
        return (1);
     }
-    if (rc = close(fd2))
+    if ((rc = close(fd2)))
        uss_procs_PrintErr(line, "Warning: Failed to close '%s': %s\n",
                           a_from, strerror(errno));
     return (0);
@@ -615,11 +590,7 @@ Copy(a_from, a_to, a_mode)
  *------------------------------------------------------------------------*/
 
 static int
-Echo(a_s, a_f, a_mode)
-     char *a_s;
-     char *a_f;
-     int a_mode;
-
+Echo(char *a_s, char *a_f, int a_mode)
 {                              /*Echo */
 
     register int fd;
@@ -686,10 +657,7 @@ Echo(a_s, a_f, a_mode)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_procs_PickADir(path, cp)
-     char *path;
-     char *cp;
-
+uss_procs_PickADir(char *path, char *cp)
 {                              /*uss_procs_PickADir */
 
     char cd[300];              /*Current  directory for search */
@@ -777,8 +745,7 @@ uss_procs_PickADir(path, cp)
  *------------------------------------------------------------------------*/
 
 int
-uss_procs_AddToDirPool(a_dirToAdd)
-     char *a_dirToAdd;
+uss_procs_AddToDirPool(char *a_dirToAdd)
 {
     if (uss_NumGroups > 99) {
        return (-1);
@@ -798,9 +765,7 @@ uss_procs_AddToDirPool(a_dirToAdd)
  *------------------------------------------------------------------------*/
 
 FILE *
-uss_procs_FindAndOpen(a_fileToOpen)
-     char *a_fileToOpen;
-
+uss_procs_FindAndOpen(char *a_fileToOpen)
 {                              /*uss_procs_FindAndOpen */
 
 #define NUM_TPL_PATHS 3
@@ -889,19 +854,13 @@ uss_procs_FindAndOpen(a_fileToOpen)
  *------------------------------------------------------------------------*/
 
 void
-uss_procs_PrintErr(a_lineNum, a_fmt, a_1, a_2, a_3, a_4, a_5)
-     int a_lineNum;
-     char *a_fmt;
-     char *a_1;
-     char *a_2;
-     char *a_3;
-     char *a_4;
-     char *a_5;
-
+uss_procs_PrintErr(int a_lineNum, char *a_fmt, ... )
 {                              /*uss_procs_PrintErr */
-
+    va_list ap;
+    
+    va_start(ap, a_fmt);
     uss_syntax_err++;
     fprintf(stderr, "%s: Template file, line %d: ", uss_whoami, a_lineNum);
-    fprintf(stderr, a_fmt, a_1, a_2, a_3, a_4, a_5);
-
+    vfprintf(stderr, a_fmt, ap);
+    va_end(ap);
 }                              /*uss_procs_PrintErr */
index 4167bed..091a075 100644 (file)
@@ -32,7 +32,8 @@
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern afs_int32 uss_procs_BuildDir();
+extern afs_int32 uss_procs_BuildDir(char *a_path, char *a_mode, 
+                                   char *a_owner, char *a_access);
     /*
      * Summary:
      *    Create and fully set up a directory for the user.
@@ -49,7 +50,8 @@ extern afs_int32 uss_procs_BuildDir();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern afs_int32 uss_procs_CpFile();
+extern afs_int32 uss_procs_CpFile(char *a_path, char *a_mode, 
+                                 char *a_owner, char *a_proto);
     /*
      * Summary:
      *    Copy the given file to the user's directory.
@@ -66,7 +68,8 @@ extern afs_int32 uss_procs_CpFile();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern afs_int32 uss_procs_EchoToFile();
+extern afs_int32 uss_procs_EchoToFile(char *a_path, char *a_mode, 
+                                     char *a_owner, char *a_content);
     /*
      * Summary:
      *    Put the specified contents into the given file.
@@ -83,7 +86,7 @@ extern afs_int32 uss_procs_EchoToFile();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern afs_int32 uss_procs_Exec();
+extern afs_int32 uss_procs_Exec(char *a_command);
     /*
      * Summary:
      *    Execute the given Unix command.
@@ -97,7 +100,8 @@ extern afs_int32 uss_procs_Exec();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern afs_int32 uss_procs_SetLink();
+extern afs_int32 uss_procs_SetLink(char *a_path1, char *a_path2, 
+                                  char a_type);
     /*
      * Summary:
      *    Create either the given symbolic or hard link.
@@ -113,7 +117,7 @@ extern afs_int32 uss_procs_SetLink();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern int uss_procs_AddToDirPool();
+extern int uss_procs_AddToDirPool(char *a_dirToAdd);
     /*
      * Summary:
      *    Add the given pathname to the $AUTH directory pool
@@ -125,7 +129,7 @@ extern int uss_procs_AddToDirPool();
      *    Result of addition.
      */
 
-extern FILE *uss_procs_FindAndOpen();
+extern FILE *uss_procs_FindAndOpen(char *a_fileToOpen);
     /*
      * Summary:
      *    Given a template filename, get that file open and return the
@@ -140,7 +144,7 @@ extern FILE *uss_procs_FindAndOpen();
      *    NULL otherwise.
      */
 
-extern void uss_procs_PrintErr();
+extern void uss_procs_PrintErr(int a_lineNum, char *a_fmt, ... );
     /*
      * Summary:
      *    Print out an error connected with template file parsing.
@@ -148,17 +152,12 @@ extern void uss_procs_PrintErr();
      * Args:
      *    int a_lineNum : Template file line number having the error.
      *    char *a_fmt   : Format string to use.
-     *    char *a_1     : First arg to print.
-     *    char *a_2     : Second ...
-     *    char *a_3     : Third ...
-     *    char *a_4     : Fourth ...
-     *    char *a_5     : Fifth ...
      *
      * Returns:
      *    Nothing.
      */
 
-extern int uss_procs_GetOwner();
+extern int uss_procs_GetOwner(char *a_ownerStr);
     /*
      * Summary:
      *    Translate the owner string to the owner uid.
index 901ac63..4f05269 100644 (file)
@@ -24,6 +24,7 @@ RCSID
 #include "uss_ptserver.h"      /*Module interface */
 #include <afs/ptclient.h>      /*Protection Server client interface */
 #include <afs/pterror.h>       /*Protection Server error codes */
+#include <afs/ptuser.h>
 #include <afs/com_err.h>       /*Error code xlation */
 
 
@@ -66,7 +67,7 @@ static int initDone = 0;      /*Module initialized? */
  *------------------------------------------------------------------------*/
 
 static afs_int32
-InitThisModule()
+InitThisModule(void)
 {                              /*InitThisModule */
 
     static char rn[] = "uss_ptserver:InitThisModule";  /*Routine name */
@@ -113,10 +114,7 @@ InitThisModule()
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_ptserver_AddUser(a_user, a_uid)
-     char *a_user;
-     char *a_uid;
-
+uss_ptserver_AddUser(char *a_user, char *a_uid)
 {                              /*uss_ptserver_AddUser */
 
     afs_int32 code;            /*Various return codes */
@@ -175,7 +173,7 @@ uss_ptserver_AddUser(a_user, a_uid)
             * ID known for the user name.
             */
            mappedUserID = id;
-           if (code = pr_SNameToId(a_user, &mappedUserID)) {
+           if ((code = pr_SNameToId(a_user, &mappedUserID))) {
                afs_com_err(uss_whoami, code,
                        "while getting uid from Protection Server");
                return (code);
@@ -226,9 +224,7 @@ uss_ptserver_AddUser(a_user, a_uid)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_ptserver_DelUser(a_name)
-     char *a_name;
-
+uss_ptserver_DelUser(char *a_name)
 {                              /*uss_ptserver_DelUser */
 
     afs_int32 code;            /*Various return codes */
@@ -294,13 +290,11 @@ uss_ptserver_DelUser(a_name)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_ptserver_XlateUser(a_user, a_uidP)
-     char *a_user;
-     afs_int32 *a_uidP;
-
+uss_ptserver_XlateUser(char *a_user, afs_int32 *a_uidP)
 {                              /*uss_ptserver_XlateUser */
-
+#ifdef USS_PTSERVER_DB
     static char rn[] = "uss_ptserver_XlateUser";       /*Routine name */
+#endif
     register afs_int32 code;   /*Various return codes */
 
     if (uss_verbose)
index cbcde29..b088df2 100644 (file)
@@ -24,7 +24,7 @@
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern afs_int32 uss_ptserver_AddUser();
+extern afs_int32 uss_ptserver_AddUser(char *a_user, char *a_uid);
     /*
      * Summary:
      *    Register the given user with the Protection Server.
@@ -39,7 +39,7 @@ extern afs_int32 uss_ptserver_AddUser();
      *    Code returned from a lower-level call.
      */
 
-extern afs_int32 uss_ptserver_DelUser();
+extern afs_int32 uss_ptserver_DelUser(char *a_name);
     /*
      * Summary:
      *    Delete the given user from the Protection Server.
@@ -52,7 +52,7 @@ extern afs_int32 uss_ptserver_DelUser();
      *    Code returned from a lower-level call.
      */
 
-extern afs_int32 uss_ptserver_XlateUser();
+extern afs_int32 uss_ptserver_XlateUser(char *a_user, afs_int32 *a_uidP);
     /*
      * Summary:
      *    Ask the Protection Server to translate the given user
index a2e4f50..0751eb8 100644 (file)
@@ -25,6 +25,7 @@ RCSID
 #include "uss_common.h"                /*Common definitions */
 #include "uss_procs.h"         /*Defs from procs module */
 #include "uss_fs.h"            /*CacheManager ops */
+#include "uss_acl.h"
 #include <sys/stat.h>
 #include <pwd.h>
 #include <netdb.h>
@@ -32,20 +33,19 @@ RCSID
 
 #include <string.h>
 
+#include <afs/com_err.h>
 #include <afs/vlserver.h>
+#include <afs/vldbint.h>
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
 #include <rx/rx_globals.h>
 #include <afs/volser.h>
 #include <afs/volint.h>
 #include <afs/keys.h>
+#include <afs/afsutil.h>
 #include <ubik.h>
 
-extern struct rx_connection *UV_Bind();
 extern int line;
-extern int VL_GetEntryByID();
-extern char *hostutil_GetNameByINet();
-
 
 /*
  * ---------------------- Private definitions ---------------------
@@ -101,14 +101,11 @@ static struct rx_connection
  *------------------------------------------------------------------------*/
 
 static afs_int32
-InitThisModule(a_noAuthFlag, a_confDir, a_cellName)
-     int a_noAuthFlag;
-     char *a_confDir;
-     char *a_cellName;
-
+InitThisModule(int a_noAuthFlag, char *a_confDir, char *a_cellName)
 {                              /*InitThisModule */
-
+#ifdef USS_VOL_DB
     static char rn[] = "uss_vol:InitThisModule";
+#endif
     register afs_int32 code;   /*Return code */
     struct afsconf_dir *tdir;  /*Ptr to conf dir info */
     struct afsconf_cell info;  /*Info about chosen cell */
@@ -295,13 +292,8 @@ InitThisModule(a_noAuthFlag, a_confDir, a_cellName)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-char *hostutil_GetNameByINet();
-
 static void
-HostIDToHostName(a_hostID, a_hostName)
-     afs_int32 a_hostID;
-     char *a_hostName;
-
+HostIDToHostName(afs_int32 a_hostID, char *a_hostName)
 {                              /*HostIDToHostName */
 
     strcpy(a_hostName, hostutil_GetNameByINet(a_hostID));
@@ -332,14 +324,11 @@ HostIDToHostName(a_hostID, a_hostName)
  *------------------------------------------------------------------------*/
 
 static afs_int32
-PartIDToPartName(a_partID, a_partName)
-     afs_int32 a_partID;
-     char *a_partName;
-
+PartIDToPartName(afs_int32 a_partID, char *a_partName)
 {                              /*PartIDToPartName */
-
+#ifdef USS_VOL_DB
     static char rn[] = "PartIDToPartName";
-
+#endif
 #ifdef USS_VOL_DB
     printf("[%s] Translating partition id %d to its name\n", rn, a_partID);
 #endif /* USS_VOL_DB */
@@ -379,9 +368,7 @@ PartIDToPartName(a_partID, a_partName)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_vol_GetServer(a_name)
-     char *a_name;
-
+uss_vol_GetServer(char *a_name)
 {                              /*uss_vol_GetServer */
 
     register struct hostent *th;
@@ -409,6 +396,8 @@ uss_vol_GetServer(a_name)
 
 }                              /*uss_vol_GetServer */
 
+/* XXX - This function is unused, and could be deleted */
+#if 0
 /*------------------------------------------------------------------------
  * static GetVolumeType
  *
@@ -430,9 +419,7 @@ uss_vol_GetServer(a_name)
  *------------------------------------------------------------------------*/
 
 static afs_int32
-GetVolumeType(a_type)
-     char *a_type;
-
+GetVolumeType(char *a_type)
 {                              /*GetVolumeType */
 
     if (!strcmp(a_type, "ro"))
@@ -445,7 +432,7 @@ GetVolumeType(a_type)
        return (-1);
 
 }                              /*GetVolumeType */
-
+#endif
 
 /*------------------------------------------------------------------------
  * EXPORTED uss_Vol_GetPartitionID
@@ -458,9 +445,7 @@ GetVolumeType(a_type)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_vol_GetPartitionID(a_name)
-     char *a_name;
-
+uss_vol_GetPartitionID(char *a_name)
 {                              /*uss_vol_GetPartitionID */
 
     register char tc;
@@ -544,13 +529,12 @@ uss_vol_GetPartitionID(a_name)
  *------------------------------------------------------------------------*/
 
 static int
-CheckDoubleMount(a_mp, a_oldmp)
-     char *a_mp;
-     char *a_oldmp;
-
+CheckDoubleMount(char *a_mp, char *a_oldmp)
 {                              /*CheckDoubleMount */
 
+#ifdef USS_VOL_DB
     static char rn[] = "uss_vol:CheckDoubleMount";
+#endif
     int start, len, mlen, tlen;
     int i = 0;
     struct passwd *pws;
@@ -627,19 +611,13 @@ CheckDoubleMount(a_mp, a_oldmp)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_vol_CreateVol(a_volname, a_server, a_partition, a_quota, a_mpoint,
-                 a_owner, a_acl)
-     char *a_volname;
-     char *a_server;
-     char *a_partition;
-     char *a_quota;
-     char *a_mpoint;
-     char *a_owner;
-     char *a_acl;
-
+uss_vol_CreateVol(char *a_volname, char *a_server, char *a_partition,
+                 char *a_quota, char *a_mpoint, char *a_owner, 
+                 char *a_acl)
 {                              /*uss_vol_CreateVol */
-
+#ifdef USS_VOL_DB
     static char rn[] = "uss_vol_CreateVol";    /*Routine name */
+#endif
     afs_int32 pname;           /*Partition name */
     afs_int32 volid, code;     /*Volume ID, return code */
     afs_int32 saddr;           /*Socket info for server */
@@ -850,7 +828,7 @@ uss_vol_CreateVol(a_volname, a_server, a_partition, a_quota, a_mpoint,
      * Set the volume disk quota.
      */
     if (!uss_DryRun) {
-       if (code = uss_acl_SetDiskQuota(a_mpoint, atoi(a_quota)))
+       if ((code = uss_acl_SetDiskQuota(a_mpoint, atoi(a_quota))))
            return (code);
     } /*Dry run */
     else {
@@ -923,15 +901,8 @@ uss_vol_CreateVol(a_volname, a_server, a_partition, a_quota, a_mpoint,
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_vol_DeleteVol(a_volName, a_volID, a_servName, a_servID, a_partName,
-                 a_partID)
-     char *a_volName;
-     afs_int32 a_volID;
-     char *a_servName;
-     afs_int32 a_servID;
-     char *a_partName;
-     afs_int32 a_partID;
-
+uss_vol_DeleteVol(char *a_volName, afs_int32 a_volID, char *a_servName, 
+                 afs_int32 a_servID, char *a_partName, afs_int32  a_partID)
 {                              /*uss_vol_DeleteVol */
 
     static char rn[] = "uss_vol_DeleteVol";    /*Routine name */
@@ -993,11 +964,8 @@ uss_vol_DeleteVol(a_volName, a_volID, a_servName, a_servID, a_partName,
  *------------------------------------------------------------------------*/
 
 static afs_int32
-GetServerAndPart(a_vldbEntryP, a_servIDP, a_partIDP)
-     struct vldbentry *a_vldbEntryP;
-     afs_int32 *a_servIDP;
-     afs_int32 *a_partIDP;
-
+GetServerAndPart(struct vldbentry *a_vldbEntryP, afs_int32 *a_servIDP,
+                afs_int32 *a_partIDP)
 {                              /*GetServerAndPart */
 
     /*
@@ -1022,12 +990,11 @@ GetServerAndPart(a_vldbEntryP, a_servIDP, a_partIDP)
  *------------------------------------------------------------------------*/
 
 afs_int32
-uss_vol_GetVolInfoFromMountPoint(a_mountpoint)
-     char *a_mountpoint;
-
+uss_vol_GetVolInfoFromMountPoint(char *a_mountpoint)
 {                              /*uss_vol_GetVolInfoFromMountPoint */
-
+#ifdef USS_VOL_DB
     static char rn[] = "uss_vol_GetVolInfoFromMountPoint";
+#endif
     register afs_int32 code;   /*Return code */
     uss_VolumeStatus_t *statusP;       /*Ptr to returned status */
     afs_int32 volID;           /*Volume ID */
@@ -1101,7 +1068,7 @@ uss_vol_GetVolInfoFromMountPoint(a_mountpoint)
        if (code)
            return (code);
     }
-    code = ubik_Call(VL_GetEntryByID, uconn_vldbP, 0, volID, -1, &vldbEntry);
+    code = ubik_VL_GetEntryByID( uconn_vldbP, 0, volID, -1, &vldbEntry);
     if (code) {
        printf("%s: Can't fetch VLDB entry for volume ID %d\n", uss_whoami,
               volID);
index f2fc7c8..0f71ebc 100644 (file)
@@ -18,7 +18,7 @@
 /*
  * ------------------------ Exported functions  -----------------------
  */
-extern afs_int32 uss_vol_GetServer();
+extern afs_int32 uss_vol_GetServer(char *a_name);
     /*
      * Summary:
      *    Given the string name of a desired host, find its address.
@@ -30,7 +30,7 @@ extern afs_int32 uss_vol_GetServer();
      *    Host address in network byte order.
      */
 
-extern afs_int32 uss_vol_GetPartitionID();
+extern afs_int32 uss_vol_GetPartitionID(char *a_name);
     /*
      * Summary:
      *    Get partition id from a name.
@@ -42,7 +42,10 @@ extern afs_int32 uss_vol_GetPartitionID();
      *    Numeric partition name, or -1 on failure.
      */
 
-extern afs_int32 uss_vol_CreateVol();
+extern afs_int32 uss_vol_CreateVol(char *a_volname, char *a_server, 
+                                  char *a_partition, char *a_quota, 
+                                  char *a_mpoint, char *a_owner, 
+                                  char *a_acl);
     /*
      * Summary:
      *    Create a volume, set its disk quota, and mount it at the
@@ -63,7 +66,9 @@ extern afs_int32 uss_vol_CreateVol();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern afs_int32 uss_vol_DeleteVol();
+extern afs_int32 uss_vol_DeleteVol(char *a_volName, afs_int32 a_volID, 
+                                  char *a_servName, afs_int32 a_servID, 
+                                  char *a_partName, afs_int32 a_partID);
     /*
      * Summary:
      *    Delete the given volume.
@@ -82,7 +87,7 @@ extern afs_int32 uss_vol_DeleteVol();
      *    Other error code if problem occurred in lower-level call.
      */
 
-extern afs_int32 uss_vol_GetVolInfoFromMountPoint();
+extern afs_int32 uss_vol_GetVolInfoFromMountPoint(char *a_mountpoint);
     /*
      * Summary:
      *    Given a mountpoint, pull out the name of the volume mounted
@@ -98,6 +103,7 @@ extern afs_int32 uss_vol_GetVolInfoFromMountPoint();
      *    Other error code if problem occurred in lower-level call.
      */
 
+#if 0
 extern afs_int32 uss_vol_DeleteMountPoint();
     /*
      * Summary:
@@ -111,5 +117,5 @@ extern afs_int32 uss_vol_DeleteMountPoint();
      *    1 if there was a problem in the routine itself, or
      *    Other error code if problem occurred in lower-level call.
      */
-
+#endif
 #endif /* _USS_VOL_H_ */