diff options
author | markm <markm@FreeBSD.org> | 1995-08-25 22:52:32 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1995-08-25 22:52:32 +0000 |
commit | a83b802bada404e3b2eccf92c3499966deaad171 (patch) | |
tree | 45f2ba147600b7d47d9e9695cf572877c7fa4773 /eBones/lib/libkdb/krb_cache.c | |
parent | 2d8492d7c86b21502ee9277e20ef1e6e931b7c44 (diff) | |
download | FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.zip FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.tar.gz |
Start the eBones cleanup ball rolling.
These are the start of a lot of work to clean up the FreeBSD eBones code.
these changes include, but are not limited to:
- Create prototypes for all the library routines
- Make all the libraries compile clean with -Wall set
- Fix numerous small bugs shown up in the above process
- Prepare the code for libdes's removal to secure/
- add register, registerd and make_keypair to the make
Lots more will follow in days to come.
OK'ed by: rgrimes
Diffstat (limited to 'eBones/lib/libkdb/krb_cache.c')
-rw-r--r-- | eBones/lib/libkdb/krb_cache.c | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/eBones/lib/libkdb/krb_cache.c b/eBones/lib/libkdb/krb_cache.c index 8da1d7d..0dafb140 100644 --- a/eBones/lib/libkdb/krb_cache.c +++ b/eBones/lib/libkdb/krb_cache.c @@ -6,13 +6,15 @@ * This is where a cache would be implemented, if it were necessary. * * from: krb_cache.c,v 4.5 89/01/24 18:12:34 jon Exp $ - * $Id: krb_cache.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ + * $Id: krb_cache.c,v 1.3 1995/07/18 16:37:12 mark Exp $ */ +#if 0 #ifndef lint static char rcsid[] = -"$Id: krb_cache.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $"; +"$Id: krb_cache.c,v 1.3 1995/07/18 16:37:12 mark Exp $"; #endif lint +#endif #include <stdio.h> #include <sys/types.h> @@ -25,8 +27,6 @@ static char rcsid[] = #include <krb.h> #include <krb_db.h> -extern char *strncpy(); - #ifdef DEBUG extern int debug; extern long kerb_debug; @@ -49,15 +49,10 @@ kerb_cache_init() */ int -kerb_cache_get_principal(serv, inst, principal, max) - char *serv; /* could have wild card */ - char *inst; /* could have wild card */ - Principal *principal; - unsigned int max; /* max number of name structs to return */ - +kerb_cache_get_principal(char *serv, char *inst, Principal *principal, + unsigned int max) { int found = 0; - u_long i; if (!init) kerb_cache_init(); @@ -70,7 +65,7 @@ kerb_cache_get_principal(serv, inst, principal, max) #ifdef DEBUG if (kerb_debug & 2) { if (found) { - fprintf(stderr, "cache get %s %s found %s %s sid = %d\n", + fprintf(stderr, "cache get %s %s found %s %s\n", serv, inst, principal->name, principal->instance); } else { fprintf(stderr, "cache %s %s not found\n", serv, @@ -87,13 +82,8 @@ kerb_cache_get_principal(serv, inst, principal, max) */ int -kerb_cache_put_principal(principal, max) - Principal *principal; - unsigned int max; /* max number of principal structs to - * insert */ - +kerb_cache_put_principal(Principal *principal, unsigned int max) { - int found = 0; u_long i; int count = 0; @@ -125,15 +115,9 @@ kerb_cache_put_principal(principal, max) */ int -kerb_cache_get_dba(serv, inst, dba, max) - char *serv; /* could have wild card */ - char *inst; /* could have wild card */ - Dba *dba; - unsigned int max; /* max number of name structs to return */ - +kerb_cache_get_dba(char *serv, char *inst, Dba *dba, unsigned int max) { int found = 0; - u_long i; if (!init) kerb_cache_init(); @@ -147,7 +131,7 @@ kerb_cache_get_dba(serv, inst, dba, max) #ifdef DEBUG if (kerb_debug & 2) { if (found) { - fprintf(stderr, "cache get %s %s found %s %s sid = %d\n", + fprintf(stderr, "cache get %s %s found %s %s\n", serv, inst, dba->name, dba->instance); } else { fprintf(stderr, "cache %s %s not found\n", serv, inst); @@ -162,12 +146,8 @@ kerb_cache_get_dba(serv, inst, dba, max) */ int -kerb_cache_put_dba(dba, max) - Dba *dba; - unsigned int max; /* max number of dba structs to insert */ - +kerb_cache_put_dba(Dba *dba, unsigned int max) { - int found = 0; u_long i; int count = 0; @@ -190,4 +170,3 @@ kerb_cache_put_dba(dba, max) } return count; } - |