]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Cleanup for the USS directory
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Tue, 28 Jul 2009 11:13:10 +0000 (12:13 +0100)
committerDerrick Brashear <shadow@dementia.org>
Wed, 29 Jul 2009 11:09:38 +0000 (04:09 -0700)
Add additional header files for prototypes
Add additional prototypes to header files
yyerror() is internal, not external. Make it static while we're at it.
ANSIfy various function definitions
Unsigned vs signed cleanup

Reviewed-on: http://gerrit.openafs.org/239
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/uss/grammar.y
src/uss/lex.l
src/uss/uss_fs.c
src/uss/uss_kauth.h
src/uss/uss_procs.h

index 7abb30c32218cc6ac65f1266f78ae3373357d338..c943c6b5db2fe1613d9ecbaf5b0030beb91f2880 100644 (file)
 #include <afs/param.h>
 #include <stdio.h>
 #include <string.h>
+#include "uss_procs.h"
+#include "uss_vol.h"
+#include "uss_kauth.h"
 
 extern int line;
 extern int uss_perr;
 
 extern int yylex(void);
-extern int yyerror(char *);
+static int yyerror(char *);
 
 %}
 
@@ -127,8 +130,8 @@ accesslist :        /* empty */
        ;
 
 %%
-yyerror(s)
-char *s;
+static int
+yyerror(char *s)
 {
 fprintf(stderr,"%s. ",s);
 return 0;
index 976211fb7dd4f2c750bb76076c0d08ce92213ca6..503da07b12894bd7730dd736c60e08315cbb8e65 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "y.tab.h"
 #include "uss_common.h"
+#include "uss_procs.h"
 int line=1;
 #ifdef DEBUG
 #define dprint(x)      {fprintf(stderr, x); fflush(stderr);}
@@ -69,9 +70,7 @@ EOL   [\n]
  */
 
 void
-Replace(in, out)
-    char *in, *out;
-
+Replace(char *in, char *out)
 { /*Replace*/
 
     char *in_text, *in_var, *out_cp, VarNo;
@@ -196,7 +195,7 @@ Replace(in, out)
 
 } /*Replace*/
 
-yywrap()
+int yywrap(void)
 {
 return(1);
 }
index 82b117d664ee9bfc4b40c94a0ed9a58653c64654..d3743a11a31589d039f82181ce82bfcecbe63e4c 100644 (file)
@@ -555,7 +555,7 @@ struct tokenInfo {
 int
 uss_fs_UnlogToken(char *celln)
 {
-    unsigned int count = 0, index, index2;
+    int count = 0, index, index2;
     afs_int32 code = 0, cnt = 0;
     struct ktc_principal serviceName;
     struct tokenInfo *tokenInfoP, *tp;
index efc79685e19f80add205be2f9d596236e3274db9..e6e660ad980c173dd39e93865d2aa4c60be9934e 100644 (file)
@@ -83,4 +83,8 @@ extern afs_int32 uss_kauth_CheckUserName(void);
      *    1 if the user name is not legal.
      */
 
+extern afs_int32 uss_kauth_SetFields(char *username, char *expirestring,
+                                    char *reuse, char *failures,
+                                    char *lockout);
+
 #endif /* _USS_KAUTH_H_ */
index 091a075bd448ae13684b15a6431b9c3bcbd93ca7..82ca78fd2bddc78c2cbb0d7bba7f760243c33e51 100644 (file)
@@ -169,4 +169,21 @@ extern int uss_procs_GetOwner(char *a_ownerStr);
      *    Owner's uid.
      */
 
+extern afs_int32 uss_procs_PickADir(char *path, char *cp);
+    /*
+     * Summary:
+     *    Tries to replace $AUTO by a subdir.  Subdirs are given by means
+     *    of "G" in the configuration file.  Each of the directories is
+     *    examined, and the one with the inimum number of entries is
+     *    picked.
+     *
+     * Args:
+     *    a_path : ???
+     *    a_cp   : ???
+     *
+     * Returns:
+     *    0 if everything went well,
+     *   -1 if there was a problem.
+     */
+
 #endif /* _USS_PROCS_H_ */