From: Simon Wilkinson Date: Tue, 28 Jul 2009 11:13:10 +0000 (+0100) Subject: Cleanup for the USS directory X-Git-Tag: openafs-devel-1_5_61~17 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=fb96e13d6f93fd7f7d833b4c66753b63a50c9003;p=packages%2Fo%2Fopenafs.git Cleanup for the USS directory 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 Reviewed-by: Derrick Brashear --- diff --git a/src/uss/grammar.y b/src/uss/grammar.y index 7abb30c32..c943c6b5d 100644 --- a/src/uss/grammar.y +++ b/src/uss/grammar.y @@ -12,12 +12,15 @@ #include #include #include +#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; diff --git a/src/uss/lex.l b/src/uss/lex.l index 976211fb7..503da07b1 100644 --- a/src/uss/lex.l +++ b/src/uss/lex.l @@ -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); } diff --git a/src/uss/uss_fs.c b/src/uss/uss_fs.c index 82b117d66..d3743a11a 100644 --- a/src/uss/uss_fs.c +++ b/src/uss/uss_fs.c @@ -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; diff --git a/src/uss/uss_kauth.h b/src/uss/uss_kauth.h index efc79685e..e6e660ad9 100644 --- a/src/uss/uss_kauth.h +++ b/src/uss/uss_kauth.h @@ -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_ */ diff --git a/src/uss/uss_procs.h b/src/uss/uss_procs.h index 091a075bd..82ca78fd2 100644 --- a/src/uss/uss_procs.h +++ b/src/uss/uss_procs.h @@ -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_ */