diff options
| author | Rodney W. Grimes <rgrimes@FreeBSD.org> | 1995-05-30 06:41:30 +0000 |
|---|---|---|
| committer | Rodney W. Grimes <rgrimes@FreeBSD.org> | 1995-05-30 06:41:30 +0000 |
| commit | 7799f52a32f592a7efe259bc3411ba52d13db797 (patch) | |
| tree | 350f6f98843363254f9afe467ae0c92d5a9d7f43 /eBones/lib/libkdb | |
| parent | 5ebc7e6281887681c3a348a5a4c902e262ccd656 (diff) | |
Notes
Diffstat (limited to 'eBones/lib/libkdb')
| -rw-r--r-- | eBones/lib/libkdb/krb_cache.c | 24 | ||||
| -rw-r--r-- | eBones/lib/libkdb/krb_dbm.c | 40 | ||||
| -rw-r--r-- | eBones/lib/libkdb/krb_kdb_utils.c | 10 | ||||
| -rw-r--r-- | eBones/lib/libkdb/krb_lib.c | 26 | ||||
| -rw-r--r-- | eBones/lib/libkdb/print_princ.c | 10 |
5 files changed, 55 insertions, 55 deletions
diff --git a/eBones/lib/libkdb/krb_cache.c b/eBones/lib/libkdb/krb_cache.c index 4d8c594dc24b..8da1d7ddc43e 100644 --- a/eBones/lib/libkdb/krb_cache.c +++ b/eBones/lib/libkdb/krb_cache.c @@ -1,17 +1,17 @@ /* - * Copyright 1988 by the Massachusetts Institute of Technology. + * Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file * <Copyright.MIT>. * * 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.2 1994/07/19 19:23:35 g89r4222 Exp $ + * $Id: krb_cache.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: krb_cache.c,v 1.2 1994/07/19 19:23:35 g89r4222 Exp $"; +"$Id: krb_cache.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $"; #endif lint #include <stdio.h> @@ -34,7 +34,7 @@ extern long kerb_debug; static init = 0; /* - * initialization routine for cache + * initialization routine for cache */ int @@ -45,7 +45,7 @@ kerb_cache_init() } /* - * look up a principal in the cache returns number of principals found + * look up a principal in the cache returns number of principals found */ int @@ -66,7 +66,7 @@ kerb_cache_get_principal(serv, inst, principal, max) fprintf(stderr, "cache_get_principal for %s %s max = %d\n", serv, inst, max); #endif DEBUG - + #ifdef DEBUG if (kerb_debug & 2) { if (found) { @@ -83,7 +83,7 @@ kerb_cache_get_principal(serv, inst, principal, max) /* * insert/replace a principal in the cache returns number of principals - * inserted + * inserted */ int @@ -106,13 +106,13 @@ kerb_cache_put_principal(principal, max) max); } #endif - + for (i = 0; i < max; i++) { #ifdef DEBUG if (kerb_debug & 2) fprintf(stderr, "\n %s %s", principal->name, principal->instance); -#endif +#endif /* DO IT */ count++; principal++; @@ -121,7 +121,7 @@ kerb_cache_put_principal(principal, max) } /* - * look up a dba in the cache returns number of dbas found + * look up a dba in the cache returns number of dbas found */ int @@ -158,7 +158,7 @@ kerb_cache_get_dba(serv, inst, dba, max) } /* - * insert/replace a dba in the cache returns number of dbas inserted + * insert/replace a dba in the cache returns number of dbas inserted */ int @@ -183,7 +183,7 @@ kerb_cache_put_dba(dba, max) if (kerb_debug & 2) fprintf(stderr, "\n %s %s", dba->name, dba->instance); -#endif +#endif /* DO IT */ count++; dba++; diff --git a/eBones/lib/libkdb/krb_dbm.c b/eBones/lib/libkdb/krb_dbm.c index 25ec48f8b53e..8bc283b98d76 100644 --- a/eBones/lib/libkdb/krb_dbm.c +++ b/eBones/lib/libkdb/krb_dbm.c @@ -1,15 +1,15 @@ /* - * Copyright 1988 by the Massachusetts Institute of Technology. + * Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file - * <Copyright.MIT>. + * <Copyright.MIT>. * * from: krb_dbm.c,v 4.9 89/04/18 16:15:13 wesommer Exp $ - * $Id: krb_dbm.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ + * $Id: krb_dbm.c,v 1.2 1995/01/25 19:45:25 ache Exp $ */ #ifndef lint static char rcsid[] = -"$Id: krb_dbm.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $"; +"$Id: krb_dbm.c,v 1.2 1995/01/25 19:45:25 ache Exp $"; #endif lint #if defined(__FreeBSD__) @@ -69,14 +69,14 @@ static int non_blocking = 0; /* * Locking: - * + * * There are two distinct locking protocols used. One is designed to * lock against processes (the admin_server, for one) which make * incremental changes to the database; the other is designed to lock * against utilities (kdb_util, kpropd) which replace the entire * database in one fell swoop. * - * The first locking protocol is implemented using flock() in the + * The first locking protocol is implemented using flock() in the * krb_dbl_lock() and krb_dbl_unlock routines. * * The second locking protocol is necessary because DBM "files" are @@ -93,12 +93,12 @@ static int non_blocking = 0; * either time, the reader sleeps for a second to let things * stabilize, and then tries again; if it does not succeed after * KERB_DB_MAX_RETRY attempts, it gives up. - * + * * On update, the semaphore file is deleted (if it exists) before any * update takes place; at the end of the update, it is replaced, with * a version number strictly greater than the version number which * existed at the start of the update. - * + * * If the system crashes in the middle of an update, the semaphore * file is not automatically created on reboot; this is a feature, not * a bug, since the database may be inconsistant. Note that the @@ -140,7 +140,7 @@ static char *gen_dbsuffix(db_name, sfx) char *sfx; { char *dbsuffix; - + if (sfx == NULL) sfx = ".ok"; @@ -162,7 +162,7 @@ kerb_db_init() /* * gracefully shut down database--must be called by ANY program that does - * a kerb_db_init + * a kerb_db_init */ kerb_db_fini() @@ -201,7 +201,7 @@ long kerb_get_db_age() struct stat st; char *okname; long age; - + okname = gen_dbsuffix(current_db_name, ".ok"); if (stat (okname, &st) < 0) @@ -226,7 +226,7 @@ static long kerb_start_update(db_name) { char *okname = gen_dbsuffix(db_name, ".ok"); long age = kerb_get_db_age(); - + if (unlink(okname) < 0 && errno != ENOENT) { age = -1; @@ -243,7 +243,7 @@ static long kerb_end_update(db_name, age) int retval = 0; char *new_okname = gen_dbsuffix(db_name, ".ok#"); char *okname = gen_dbsuffix(db_name, ".ok"); - + fd = open (new_okname, O_CREAT|O_RDWR|O_TRUNC, 0600); if (fd < 0) retval = errno; @@ -355,7 +355,7 @@ kerb_db_rename(from, to) char *fromok = gen_dbsuffix(from, ".ok"); long trans = kerb_start_update(to); int ok; - + #ifndef __FreeBSD__ if ((rename (fromdir, todir) == 0) && (rename (frompag, topag) == 0)) { @@ -384,7 +384,7 @@ kerb_db_rename(from, to) /* * look up a principal in the data base returns number of principals - * found , and whether there were more than requested. + * found , and whether there were more than requested. */ kerb_db_get_principal(name, inst, principal, max, more) @@ -627,7 +627,7 @@ delta_stat(a, b, c) /* * look up a dba in the data base returns number of dbas found , and - * whether there were more than requested. + * whether there were more than requested. */ kerb_db_get_dba(dba_name, dba_inst, dba, max, more) @@ -650,7 +650,7 @@ kerb_db_iterate (func, arg) Principal *principal; int code; DBM *db; - + kerb_db_init(); /* initialize and open the database */ if ((code = kerb_dbl_lock(KERB_DBL_SHARED)) != 0) return code; @@ -701,7 +701,7 @@ static int kerb_dbl_lock(mode) int mode; { int flock_mode; - + if (!inited) kerb_dbl_init(); if (mylock) { /* Detect lock call when lock already @@ -723,8 +723,8 @@ static int kerb_dbl_lock(mode) } if (non_blocking) flock_mode |= LOCK_NB; - - if (flock(dblfd, flock_mode) < 0) + + if (flock(dblfd, flock_mode) < 0) return errno; mylock++; return 0; diff --git a/eBones/lib/libkdb/krb_kdb_utils.c b/eBones/lib/libkdb/krb_kdb_utils.c index 5fccc537e44c..c283e0f7aa8d 100644 --- a/eBones/lib/libkdb/krb_kdb_utils.c +++ b/eBones/lib/libkdb/krb_kdb_utils.c @@ -10,12 +10,12 @@ * Jon Rochlis, MIT Telecom, March 1988 * * from: krb_kdb_utils.c,v 4.1 89/07/26 11:01:12 jtkohl Exp $ - * $Id: krb_kdb_utils.c,v 1.2 1994/07/19 19:23:38 g89r4222 Exp $ + * $Id: krb_kdb_utils.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: krb_kdb_utils.c,v 1.2 1994/07/19 19:23:38 g89r4222 Exp $"; +"$Id: krb_kdb_utils.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $"; #endif lint #include <des.h> @@ -79,7 +79,7 @@ long kdb_verify_master_key (master_key, master_key_sched, out) n = kerb_get_principal(KERB_M_NAME, KERB_M_INST, principal_data, 1 /* only one please */, &more); if ((n != 1) || more) { - if (out != (FILE *) NULL) + if (out != (FILE *) NULL) fprintf(out, "verify_master_key: %s, %d found.\n", "Kerberos error on master key version lookup", @@ -96,11 +96,11 @@ long kdb_verify_master_key (master_key, master_key_sched, out) /* * now use the master key to decrypt the key in the db, had better - * be the same! + * be the same! */ bcopy(&principal_data[0].key_low, key_from_db, 4); bcopy(&principal_data[0].key_high, ((long *) key_from_db) + 1, 4); - kdb_encrypt_key (key_from_db, key_from_db, + kdb_encrypt_key (key_from_db, key_from_db, master_key, master_key_sched, DECRYPT); /* the decrypted database key had better equal the master key */ diff --git a/eBones/lib/libkdb/krb_lib.c b/eBones/lib/libkdb/krb_lib.c index f0f1f6f67dcb..b90d1a5cf8bb 100644 --- a/eBones/lib/libkdb/krb_lib.c +++ b/eBones/lib/libkdb/krb_lib.c @@ -1,16 +1,16 @@ /* - * $Source: /home/CVS/src/eBones/kdb/krb_lib.c,v $ - * $Author: g89r4222 $ + * $Source: /home/ncvs/src/eBones/kdb/krb_lib.c,v $ + * $Author: csgr $ * - * Copyright 1988 by the Massachusetts Institute of Technology. + * Copyright 1988 by the Massachusetts Institute of Technology. * * For copying and distribution information, please see the file - * <mit-copyright.h>. + * <mit-copyright.h>. */ #ifndef lint static char rcsid[] = -"$Id: krb_lib.c,v 1.2 1994/07/19 19:23:39 g89r4222 Exp $"; +"$Id: krb_lib.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $"; #endif lint #include <stdio.h> @@ -37,7 +37,7 @@ extern char *getenv(); static init = 0; /* - * initialization routine for data base + * initialization routine for data base */ int @@ -64,7 +64,7 @@ kerb_init() /* * finalization routine for database -- NOTE: MUST be called by any * program using kerb_init. ALSO will have to be modified to finalize - * caches, if they're ever really implemented. + * caches, if they're ever really implemented. */ int @@ -75,7 +75,7 @@ kerb_fini() /* * look up a principal in the cache or data base returns number of - * principals found + * principals found */ int @@ -99,10 +99,10 @@ kerb_get_principal(name, inst, principal, max, more) fprintf(stderr, "\n%s: kerb_get_principal for %s %s max = %d\n", progname, name, inst, max); #endif - + /* * if this is a request including a wild card, have to go to db - * since the cache may not be exhaustive. + * since the cache may not be exhaustive. */ /* clear the principal area */ @@ -111,7 +111,7 @@ kerb_get_principal(name, inst, principal, max, more) #ifdef CACHE /* * so check to see if the name contains a wildcard "*" or "?", not - * preceeded by a backslash. + * preceeded by a backslash. */ wild = 0; if (index(name, '*') || index(name, '?') || @@ -206,7 +206,7 @@ kerb_get_dba(name, inst, dba, max, more) #endif /* * if this is a request including a wild card, have to go to db - * since the cache may not be exhaustive. + * since the cache may not be exhaustive. */ /* clear the dba area */ @@ -215,7 +215,7 @@ kerb_get_dba(name, inst, dba, max, more) #ifdef CACHE /* * so check to see if the name contains a wildcard "*" or "?", not - * preceeded by a backslash. + * preceeded by a backslash. */ wild = 0; diff --git a/eBones/lib/libkdb/print_princ.c b/eBones/lib/libkdb/print_princ.c index 730cfb7dbf83..d04ca39474fd 100644 --- a/eBones/lib/libkdb/print_princ.c +++ b/eBones/lib/libkdb/print_princ.c @@ -1,15 +1,15 @@ /* - * Copyright 1988 by the Massachusetts Institute of Technology. + * Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file - * <Copyright.MIT>. + * <Copyright.MIT>. * - * from: $Header: /home/CVS/src/eBones/kdb/print_princ.c,v 1.2 1994/07/19 19:23:41 g89r4222 Exp $ - * $Id: print_princ.c,v 1.2 1994/07/19 19:23:41 g89r4222 Exp $ + * from: $Header: /home/ncvs/src/eBones/kdb/print_princ.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ + * $Id: print_princ.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: print_princ.c,v 1.2 1994/07/19 19:23:41 g89r4222 Exp $"; +"$Id: print_princ.c,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $"; #endif lint #include <stdio.h> |
