diff options
| author | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
| commit | 02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch) | |
| tree | 61b9147863cd8be3eff63903dc36cae168254bd5 /src/plugins/kdb | |
| parent | 162ab371748cba0cc6f172419bd6e71fa04bb878 (diff) | |
make mark-cstyle
make reindent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/kdb')
67 files changed, 331 insertions, 352 deletions
diff --git a/src/plugins/kdb/db2/adb_openclose.c b/src/plugins/kdb/db2/adb_openclose.c index 453c73b02..58c49328c 100644 --- a/src/plugins/kdb/db2/adb_openclose.c +++ b/src/plugins/kdb/db2/adb_openclose.c @@ -1,7 +1,7 @@ /* * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved * - * $Header$ + * $Header$ */ #if !defined(lint) && !defined(__CODECENTER__) @@ -29,7 +29,7 @@ krb5_error_code osa_adb_create_db(char *filename, char *lockfilename, int lf; DB *db; BTREEINFO btinfo; - + memset(&btinfo, 0, sizeof(btinfo)); btinfo.flags = 0; btinfo.cachesize = 0; @@ -49,7 +49,7 @@ krb5_error_code osa_adb_create_db(char *filename, char *lockfilename, if (lf == -1) return errno; (void) close(lf); - + return OSA_ADB_OK; } @@ -104,7 +104,7 @@ krb5_error_code osa_adb_rename_db(char *filefrom, char *lockfrom, (void) osa_adb_fini_db(todb, magic); return ret; } - + (void) osa_adb_fini_db(fromdb, magic); (void) osa_adb_fini_db(todb, magic); return 0; @@ -117,7 +117,7 @@ krb5_error_code osa_adb_init_db(osa_adb_db_t *dbp, char *filename, static struct _locklist *locklist = NULL; struct _locklist *lockp; krb5_error_code code; - + if (dbp == NULL || filename == NULL) return EINVAL; @@ -222,7 +222,7 @@ krb5_error_code osa_adb_init_db(osa_adb_db_t *dbp, char *filename, db->magic = magic; *dbp = db; - + return OSA_ADB_OK; } @@ -255,8 +255,8 @@ krb5_error_code osa_adb_fini_db(osa_adb_db_t db, int magic) free(db->filename); free(db); return OSA_ADB_OK; -} - +} + krb5_error_code osa_adb_get_lock(osa_adb_db_t db, int mode) { int tries, gotlock, perm, krb5_mode, ret = 0; @@ -314,9 +314,9 @@ krb5_error_code osa_adb_get_lock(osa_adb_db_t db, int mode) KRB5_LOCKMODE_UNLOCK); return OSA_ADB_NOLOCKFILE; } - + /* we have the shared/exclusive lock */ - + if (perm) { if (unlink(db->lock->filename) < 0) { /* somehow we can't delete the file, but we already */ @@ -326,7 +326,7 @@ krb5_error_code osa_adb_get_lock(osa_adb_db_t db, int mode) (void) krb5_lock_file(db->lock->context, fileno(db->lock->lockfile), KRB5_LOCKMODE_UNLOCK); - + /* maybe we should return CANTLOCK_DB.. but that would */ /* look just like the db was already locked */ return ret; @@ -336,7 +336,7 @@ krb5_error_code osa_adb_get_lock(osa_adb_db_t db, int mode) /* now no one else can get one either */ (void) fclose(db->lock->lockfile); } - + db->lock->lockmode = mode; db->lock->lockcnt++; return OSA_ADB_OK; @@ -345,7 +345,7 @@ krb5_error_code osa_adb_get_lock(osa_adb_db_t db, int mode) krb5_error_code osa_adb_release_lock(osa_adb_db_t db) { int ret, fd; - + if (!db->lock->lockcnt) /* lock already unlocked */ return OSA_ADB_NOTLOCKED; @@ -363,7 +363,7 @@ krb5_error_code osa_adb_release_lock(osa_adb_db_t db) fileno(db->lock->lockfile), KRB5_LOCKMODE_UNLOCK))) return ret; - + db->lock->lockmode = 0; } return OSA_ADB_OK; diff --git a/src/plugins/kdb/db2/adb_policy.c b/src/plugins/kdb/db2/adb_policy.c index 04cc48970..d585c0852 100644 --- a/src/plugins/kdb/db2/adb_policy.c +++ b/src/plugins/kdb/db2/adb_policy.c @@ -36,7 +36,7 @@ static char *rcsid = "$Header$"; /* * Function: osa_adb_create_policy - * + * * Purpose: create a policy entry in the policy db. * * Arguments: @@ -45,13 +45,13 @@ static char *rcsid = "$Header$"; * * Requires: * entry have a valid name. - * + * * Effects: * creates the entry in the db * * Modifies: * the policy db. - * + * */ krb5_error_code osa_adb_create_policy(osa_adb_policy_t db, osa_policy_ent_t entry) @@ -69,7 +69,7 @@ osa_adb_create_policy(osa_adb_policy_t db, osa_policy_ent_t entry) } dbkey.data = entry->name; dbkey.size = (strlen(entry->name) + 1); - + switch(db->db->get(db->db, &dbkey, &dbdata, 0)) { case 0: ret = OSA_ADB_DUP; @@ -110,7 +110,7 @@ error: /* * Function: osa_adb_destroy_policy - * + * * Purpose: destroy a policy entry * * Arguments: @@ -126,7 +126,7 @@ error: * * Modifies: * policy db. - * + * */ krb5_error_code osa_adb_destroy_policy(osa_adb_policy_t db, char *name) @@ -135,7 +135,7 @@ osa_adb_destroy_policy(osa_adb_policy_t db, char *name) int status, ret; OPENLOCK(db, KRB5_DB_LOCKMODE_EXCLUSIVE); - + if(name == NULL) { ret = EINVAL; goto error; @@ -167,7 +167,7 @@ error: /* * Function: osa_adb_get_policy - * + * * Purpose: retrieve policy * * Arguments: @@ -222,10 +222,10 @@ osa_adb_get_policy(osa_adb_policy_t db, char *name, ret = ENOMEM; goto error; } - memcpy(aligned_data, dbdata.data, dbdata.size); + memcpy(aligned_data, dbdata.data, dbdata.size); memset(*entry, 0, sizeof(osa_policy_ent_rec)); xdrmem_create(&xdrs, aligned_data, dbdata.size, XDR_DECODE); - if (!xdr_osa_policy_ent_rec(&xdrs, *entry)) + if (!xdr_osa_policy_ent_rec(&xdrs, *entry)) ret = OSA_ADB_FAILURE; else ret = OSA_ADB_OK; xdr_destroy(&xdrs); @@ -238,7 +238,7 @@ error: /* * Function: osa_adb_put_policy - * + * * Purpose: update a policy in the dababase * * Arguments: @@ -248,13 +248,13 @@ error: * * Requires: * [requires] - * + * * Effects: * [effects] * * Modifies: * [modifies] - * + * */ krb5_error_code osa_adb_put_policy(osa_adb_policy_t db, osa_policy_ent_t entry) @@ -266,7 +266,7 @@ osa_adb_put_policy(osa_adb_policy_t db, osa_policy_ent_t entry) int ret; OPENLOCK(db, KRB5_DB_LOCKMODE_EXCLUSIVE); - + if(entry->name == NULL) { ret = EINVAL; goto error; @@ -310,7 +310,7 @@ error: /* * Function: osa_adb_iter_policy - * + * * Purpose: iterate over the policy database. * * Arguments: @@ -352,7 +352,7 @@ osa_adb_iter_policy(osa_adb_policy_t db, osa_adb_iter_policy_func func, goto error; } memcpy(aligned_data, dbdata.data, dbdata.size); - + memset(entry, 0, sizeof(osa_policy_ent_rec)); xdrmem_create(&xdrs, aligned_data, dbdata.size, XDR_DECODE); if(!xdr_osa_policy_ent_rec(&xdrs, entry)) { @@ -364,7 +364,7 @@ osa_adb_iter_policy(osa_adb_policy_t db, osa_adb_iter_policy_func func, } (*func)(data, entry); xdr_destroy(&xdrs); - free(aligned_data); + free(aligned_data); osa_free_policy_ent(entry); ret = db->db->seq(db->db, &dbkey, &dbdata, R_NEXT); } diff --git a/src/plugins/kdb/db2/db2_exp.c b/src/plugins/kdb/db2/db2_exp.c index 2e1f3b519..356f6dfca 100644 --- a/src/plugins/kdb/db2/db2_exp.c +++ b/src/plugins/kdb/db2/db2_exp.c @@ -6,7 +6,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -26,7 +26,7 @@ * * C %name: db2_exp.c % * Instance: idc_sec_2 -* Description: +* Description: * %created_by: spradeep % * %date_created: Tue Apr 5 11:44:00 2005 % * @@ -110,8 +110,8 @@ WRAP_K (krb5_db2_db_get_age, time_t *t), (ctx, s, t)); WRAP_K (krb5_db2_db_set_option, - ( krb5_context kcontext, - int option, + ( krb5_context kcontext, + int option, void *value ), (kcontext, option, value)); diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c index b987039d1..363a1f3d1 100644 --- a/src/plugins/kdb/db2/kdb_db2.c +++ b/src/plugins/kdb/db2/kdb_db2.c @@ -246,7 +246,7 @@ k5db2_dbopen(krb5_db2_context *dbc, char *fname, int flags, int mode, int tempdb errno = ENOMEM; return NULL; } - + hashi.bsize = 4096; hashi.cachesize = 0; @@ -2009,4 +2009,3 @@ errout: return retval; } - diff --git a/src/plugins/kdb/db2/kdb_db2.h b/src/plugins/kdb/db2/kdb_db2.h index cef7b648a..9f3cbc5c9 100644 --- a/src/plugins/kdb/db2/kdb_db2.h +++ b/src/plugins/kdb/db2/kdb_db2.h @@ -8,7 +8,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -22,7 +22,7 @@ * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. - * + * * * KDC Database backend definitions for Berkely DB. */ @@ -53,37 +53,37 @@ typedef struct _krb5_db2_context { #define KDB2_LOCK_EXT ".ok" #define KDB2_TEMP_LOCK_EXT "~.ok" -krb5_error_code krb5_db2_db_init +krb5_error_code krb5_db2_db_init (krb5_context); -krb5_error_code krb5_db2_db_fini +krb5_error_code krb5_db2_db_fini (krb5_context); -krb5_error_code krb5_db2_db_get_age +krb5_error_code krb5_db2_db_get_age (krb5_context, char *, time_t * ); -krb5_error_code krb5_db2_db_create +krb5_error_code krb5_db2_db_create (krb5_context, char *, krb5_int32); -krb5_error_code krb5_db2_db_destroy +krb5_error_code krb5_db2_db_destroy (krb5_context, char * ); -krb5_error_code krb5_db2_db_rename +krb5_error_code krb5_db2_db_rename (krb5_context, char *, char *, int ); -krb5_error_code krb5_db2_db_get_principal +krb5_error_code krb5_db2_db_get_principal (krb5_context, krb5_const_principal, krb5_db_entry *, int *, krb5_boolean * ); -krb5_error_code krb5_db2_db_free_principal +krb5_error_code krb5_db2_db_free_principal (krb5_context, krb5_db_entry *, int ); -krb5_error_code krb5_db2_db_put_principal +krb5_error_code krb5_db2_db_put_principal (krb5_context, krb5_db_entry *, int *, @@ -99,21 +99,21 @@ krb5_error_code krb5_db2_db_iterate krb5_error_code (*) (krb5_pointer, krb5_db_entry *), krb5_pointer ); -krb5_error_code krb5_db2_db_set_nonblocking +krb5_error_code krb5_db2_db_set_nonblocking (krb5_context, krb5_boolean, krb5_boolean * ); krb5_boolean krb5_db2_db_set_lockmode (krb5_context, krb5_boolean ); -krb5_error_code krb5_db2_db_open_database +krb5_error_code krb5_db2_db_open_database (krb5_context); -krb5_error_code krb5_db2_db_close_database +krb5_error_code krb5_db2_db_close_database (krb5_context); -krb5_error_code -krb5_db2_set_master_key_ext ( krb5_context kcontext, - char *pwd, +krb5_error_code +krb5_db2_set_master_key_ext ( krb5_context kcontext, + char *pwd, krb5_keyblock *key); krb5_error_code @@ -146,7 +146,7 @@ krb5_error_code krb5_db2_lib_init(void); krb5_error_code krb5_db2_lib_cleanup(void); -krb5_error_code +krb5_error_code krb5_db2_db_unlock(krb5_context); krb5_error_code @@ -154,9 +154,9 @@ krb5_db2_promote_db(krb5_context kcontext, char *conf_section, char **db_args); -krb5_error_code -krb5_db2_db_set_option ( krb5_context kcontext, - int option, +krb5_error_code +krb5_db2_db_set_option ( krb5_context kcontext, + int option, void *value ); krb5_error_code @@ -164,7 +164,7 @@ krb5_db2_db_lock( krb5_context context, int in_mode); -krb5_error_code +krb5_error_code krb5_db2_open( krb5_context kcontext, char *conf_section, char **db_args, @@ -181,13 +181,13 @@ krb5_error_code krb5_db2_destroy( krb5_context kcontext, const char * krb5_db2_err2str( krb5_context kcontext, long err_code ); -void * -krb5_db2_alloc( krb5_context kcontext, - void *ptr, +void * +krb5_db2_alloc( krb5_context kcontext, + void *ptr, size_t size ); -void -krb5_db2_free( krb5_context kcontext, +void +krb5_db2_free( krb5_context kcontext, void *ptr ); diff --git a/src/plugins/kdb/db2/kdb_ext.c b/src/plugins/kdb/db2/kdb_ext.c index 9d73966b4..69c5522ac 100644 --- a/src/plugins/kdb/db2/kdb_ext.c +++ b/src/plugins/kdb/db2/kdb_ext.c @@ -96,4 +96,3 @@ krb5_db2_invoke(krb5_context context, return code; } - diff --git a/src/plugins/kdb/db2/kdb_xdr.c b/src/plugins/kdb/db2/kdb_xdr.c index f00131a00..38dc658fd 100644 --- a/src/plugins/kdb/db2/kdb_xdr.c +++ b/src/plugins/kdb/db2/kdb_xdr.c @@ -1,14 +1,14 @@ /* * lib/kdb/kdb_xdr.c * - * Copyright 1995 by the Massachusetts Institute of Technology. + * Copyright 1995 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -22,7 +22,7 @@ * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. - * + * */ #include "k5-int.h" @@ -42,7 +42,7 @@ krb5_encode_princ_dbkey(context, key, principal) if (!(retval = krb5_unparse_name(context, principal, &princ_name))) { /* need to store the NULL for decoding */ - key->length = strlen(princ_name)+1; + key->length = strlen(princ_name)+1; key->data = princ_name; } return(retval); @@ -76,8 +76,8 @@ krb5_encode_princ_contents(context, content, entry) * compact and extensible. */ - /* - * First allocate enough space for all the data. + /* + * First allocate enough space for all the data. * Need 2 bytes for the length of the base structure * then 36 [ 8 * 4 + 2 * 2] bytes for the base information * [ attributes, max_life, max_renewable_life, expiration, @@ -95,7 +95,7 @@ krb5_encode_princ_contents(context, content, entry) unparse_princ_size = strlen(unparse_princ) + 1; content->length += unparse_princ_size; - content->length += 2; + content->length += 2; i = 0; /* tl_data is a linked list */ @@ -118,14 +118,14 @@ krb5_encode_princ_contents(context, content, entry) content->length += 4; /* type + length */ } } - + if ((content->data = malloc(content->length)) == NULL) { retval = ENOMEM; goto epc_error; } - /* - * Now we go through entry again, this time copying data + /* + * Now we go through entry again, this time copying data * These first entries are always saved regardless of version */ nextloc = (unsigned char *)content->data; @@ -137,31 +137,31 @@ krb5_encode_princ_contents(context, content, entry) /* Attributes */ krb5_kdb_encode_int32(entry->attributes, nextloc); nextloc += 4; - + /* Max Life */ krb5_kdb_encode_int32(entry->max_life, nextloc); nextloc += 4; - + /* Max Renewable Life */ krb5_kdb_encode_int32(entry->max_renewable_life, nextloc); nextloc += 4; - + /* When the client expires */ krb5_kdb_encode_int32(entry->expiration, nextloc); nextloc += 4; - + /* When its passwd expires */ krb5_kdb_encode_int32(entry->pw_expiration, nextloc); nextloc += 4; - + /* Last successful passwd */ krb5_kdb_encode_int32(entry->last_success, nextloc); nextloc += 4; - + /* Last failed passwd attempt */ krb5_kdb_encode_int32(entry->last_failed, nextloc); nextloc += 4; - + /* # of failed passwd attempt */ krb5_kdb_encode_int32(entry->fail_auth_count, nextloc); nextloc += 4; @@ -169,11 +169,11 @@ krb5_encode_princ_contents(context, content, entry) /* # tl_data strutures */ krb5_kdb_encode_int16(entry->n_tl_data, nextloc); nextloc += 2; - + /* # key_data strutures */ krb5_kdb_encode_int16(entry->n_key_data, nextloc); nextloc += 2; - + /* Put extended fields here */ if (entry->len != KRB5_KDB_V1_BASE_LENGTH) abort(); @@ -183,8 +183,8 @@ krb5_encode_princ_contents(context, content, entry) memcpy(nextloc, entry->e_data, entry->e_length); nextloc += entry->e_length; } - - /* + + /* * Now we get to the principal. * To squeze a few extra bytes out it is always assumed to come * after the base type. @@ -228,7 +228,7 @@ krb5_encode_princ_contents(context, content, entry) } } } - + epc_error:; free(unparse_princ); return retval; @@ -271,7 +271,7 @@ krb5_decode_princ_contents(context, content, entry) /* First do the easy stuff */ nextloc = (unsigned char *)content->data; sizeleft = content->length; - if ((sizeleft -= KRB5_KDB_V1_BASE_LENGTH) < 0) + if ((sizeleft -= KRB5_KDB_V1_BASE_LENGTH) < 0) return KRB5_KDB_TRUNCATED_RECORD; /* Base Length */ @@ -336,7 +336,7 @@ krb5_decode_princ_contents(context, content, entry) } /* - * Get the principal name for the entry + * Get the principal name for the entry * (stored as a string which gets unparsed.) */ if ((sizeleft -= 2) < 0) { @@ -434,7 +434,7 @@ krb5_decode_princ_contents(context, content, entry) retval = ENOMEM; goto error_out; } - memcpy(key_data->key_data_contents[j], nextloc, + memcpy(key_data->key_data_contents[j], nextloc, key_data->key_data_length[j]); nextloc += key_data->key_data_length[j]; } @@ -450,10 +450,10 @@ error_out:; krb5_dbe_free_contents(context, entry); return retval; } - + void krb5_dbe_free_contents(context, entry) - krb5_context context; + krb5_context context; krb5_db_entry * entry; { krb5_tl_data * tl_data_next; @@ -475,8 +475,8 @@ krb5_dbe_free_contents(context, entry) for (j = 0; j < entry->key_data[i].key_data_ver; j++) { if (entry->key_data[i].key_data_length[j]) { if (entry->key_data[i].key_data_contents[j]) { - memset(entry->key_data[i].key_data_contents[j], - 0, + memset(entry->key_data[i].key_data_contents[j], + 0, (unsigned) entry->key_data[i].key_data_length[j]); free (entry->key_data[i].key_data_contents[j]); } diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_delete.c b/src/plugins/kdb/db2/libdb2/btree/bt_delete.c index d002a66ed..02ae2e9be 100644 --- a/src/plugins/kdb/db2/libdb2/btree/bt_delete.c +++ b/src/plugins/kdb/db2/libdb2/btree/bt_delete.c @@ -154,7 +154,7 @@ __bt_stkacq(t, hp, c) db_pgno_t pgno; recno_t nextpg, prevpg; int exact, level; - + /* * Find the first occurrence of the key in the tree. Toss the * currently locked page so we don't hit an already-locked page. @@ -270,7 +270,7 @@ __bt_stkacq(t, hp, c) if ((h = mpool_get(t->bt_mp, prevpg, 0)) == NULL) return (1); } - + ret: mpool_put(t->bt_mp, h, 0); return ((*hp = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL); @@ -402,7 +402,7 @@ __bt_pdelete(t, h) /* Get the parent page. */ if ((pg = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL) return (RET_ERROR); - + idx = parent->index; bi = GETBINTERNAL(pg, idx); @@ -571,7 +571,7 @@ __bt_curdel(t, key, h, idx) key = &c->key; } /* Check previous key, if not at the beginning of the page. */ - if (idx > 0) { + if (idx > 0) { e.page = h; e.index = idx - 1; if (__bt_cmp(t, key, &e) == 0) { diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_open.c b/src/plugins/kdb/db2/libdb2/btree/bt_open.c index 0f848d8ad..069b2dfde 100644 --- a/src/plugins/kdb/db2/libdb2/btree/bt_open.c +++ b/src/plugins/kdb/db2/libdb2/btree/bt_open.c @@ -202,7 +202,7 @@ __bt_open(fname, flags, mode, openinfo, dflags) default: goto einval; } - + if ((t->bt_fd = open(fname, flags | O_BINARY, mode)) < 0) goto err; diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_seq.c b/src/plugins/kdb/db2/libdb2/btree/bt_seq.c index bbfb9c6c6..6124f968b 100644 --- a/src/plugins/kdb/db2/libdb2/btree/bt_seq.c +++ b/src/plugins/kdb/db2/libdb2/btree/bt_seq.c @@ -6,7 +6,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -419,7 +419,7 @@ __bt_first(t, key, erval, exactp) *erval = *ep; return (RET_SUCCESS); } - + /* * Walk backwards, as long as the entry matches and there are * keys left in the tree. Save a copy of each match in case diff --git a/src/plugins/kdb/db2/libdb2/hash/hash.c b/src/plugins/kdb/db2/libdb2/hash/hash.c index c1a66088a..2343d223c 100644 --- a/src/plugins/kdb/db2/libdb2/hash/hash.c +++ b/src/plugins/kdb/db2/libdb2/hash/hash.c @@ -428,7 +428,7 @@ hget_header(hashp, page_size) hdr_dest = (u_int8_t *)&hashp->hdr; - /* + /* * XXX * This should not be printing to stderr on a "normal" error case. */ @@ -514,14 +514,14 @@ hdestroy(hashp) free(hashp->bigkey_buf); if (hashp->bigdata_buf) free(hashp->bigdata_buf); - + /* XXX This should really iterate over the cursor queue, but it's not clear how to do that, and the only cursor a hash table ever creates is the one used by hash_seq(). Passing NULL as the first arg is also a kludge, but I know that it's never used, so I do it. The intent is to plug the memory leak. Correctness can come later. */ - + if (hashp->seq_cursor) hashp->seq_cursor->delete(NULL, hashp->seq_cursor, 0); @@ -532,7 +532,7 @@ hdestroy(hashp) if (hashp->fp != -1) (void)close(hashp->fp); - /* + /* * *** This may cause problems if hashp->fname is set in any case * other than the case that we are generating a temporary file name. * Note that the new version of mpool should support temporary @@ -704,7 +704,7 @@ hash_access(hashp, action, key, val) num_items = 0; - /* + /* * Set up item_info so that we're looking for space to add an item * as we cycle through the pages looking for the key. */ @@ -868,7 +868,7 @@ cursor_get(dbp, cursorp, key, val, flags) /* * This needs to be changed around. As is, get_item_next advances * the pointers on the page but this function actually advances - * bucket pointers. This works, since the only other place we + * bucket pointers. This works, since the only other place we * use get_item_next is in hash_access which only deals with one * bucket at a time. However, there is the problem that certain other * functions (such as find_bigpair and delpair) depend on the @@ -920,7 +920,7 @@ cursor_delete(dbp, cursor, flags) /* XXX this is empirically determined, so it might not be completely correct, but it seems to work. At the very least it fixes a memory leak */ - + free(cursor->internal); free(cursor); @@ -937,7 +937,7 @@ hash_seq(dbp, key, val, flag) /* * Seq just uses the default cursor to go sequecing through the - * database. Note that the default cursor is the first in the list. + * database. Note that the default cursor is the first in the list. */ hashp = (HTAB *)dbp->internal; diff --git a/src/plugins/kdb/db2/libdb2/hash/hash.h b/src/plugins/kdb/db2/libdb2/hash/hash.h index b202fc9f2..32793ca5b 100644 --- a/src/plugins/kdb/db2/libdb2/hash/hash.h +++ b/src/plugins/kdb/db2/libdb2/hash/hash.h @@ -193,4 +193,4 @@ typedef struct item_info { #define ITEM_GET_N 4 #define UNKNOWN 0xffffffff /* for num_items */ -#define NO_EXPAND 0xfffffffe +#define NO_EXPAND 0xfffffffe diff --git a/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c b/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c index 06210a57c..6874f4703 100644 --- a/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c +++ b/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c @@ -75,7 +75,7 @@ static int32_t collect_data __P((HTAB *, PAGE16 *, int32_t)); /* * Big_insert * - * You need to do an insert and the key/data pair is greater than + * You need to do an insert and the key/data pair is greater than * MINFILL * the bucket size * * Returns: diff --git a/src/plugins/kdb/db2/libdb2/hash/hash_page.c b/src/plugins/kdb/db2/libdb2/hash/hash_page.c index e25115d3f..f27e7dd86 100644 --- a/src/plugins/kdb/db2/libdb2/hash/hash_page.c +++ b/src/plugins/kdb/db2/libdb2/hash/hash_page.c @@ -102,7 +102,7 @@ __get_item(hashp, cursorp, key, val, item_info) cursorp->pgno = ADDR(cursorp->pagep); cursorp->ndx = 0; cursorp->pgndx = 0; - } else + } else cursorp->pagep = __get_page(hashp, cursorp->pgno, A_RAW); if (!cursorp->pagep) { @@ -140,7 +140,7 @@ __get_item(hashp, cursorp, key, val, item_info) KEY_OFF(cursorp->pagep, cursorp->pgndx); } - /* + /* * All of this information will be set incorrectly for big keys, but * it will be ignored anyway. */ @@ -183,7 +183,7 @@ __get_item_done(hashp, cursorp) __put_page(hashp, cursorp->pagep, A_RAW, 0); cursorp->pagep = NULL; - /* + /* * We don't throw out the page number since we might want to * continue getting on this page. */ @@ -354,7 +354,7 @@ __delpair(hashp, cursorp, item_info) * item on the page. */ src = (u_int8_t *)pagep + OFFSET(pagep) + 1; - /* + /* * Length is the distance between where to start * deleting and end of the data on the page. */ @@ -399,7 +399,7 @@ __delpair(hashp, cursorp, item_info) db_pgno_t to_find, next_pgno, link_page; /* - * We need to go back to the first page in the chain and + * We need to go back to the first page in the chain and * look for this page so that we can update the previous * page's NEXT_PGNO field. */ @@ -511,7 +511,7 @@ __split_page(hashp, obucket, nbucket) } /* - * Add the given pair to the page. + * Add the given pair to the page. * * * Returns: @@ -545,7 +545,7 @@ __addel(hashp, item_info, key, val, num_items, expanding) /* Advance to first page in chain with room for item. */ while (NUM_ENT(pagep) && NEXT_PGNO(pagep) != INVALID_PGNO) { - /* + /* * This may not be the end of the chain, but the pair may fit * anyway. */ @@ -577,9 +577,9 @@ __addel(hashp, item_info, key, val, num_items, expanding) return (-1); } } - + /* At this point, we know the page fits, so we just add it */ - + if (ISBIG(PAIRSIZE(key, val), hashp)) { if (__big_insert(hashp, pagep, key, val)) return (-1); @@ -624,7 +624,7 @@ __addel(hashp, item_info, key, val, num_items, expanding) return (0); } -/* +/* * Special __addel used in big splitting; this one just puts the pointer * to an already-allocated big page in the appropriate bucket. */ @@ -866,8 +866,8 @@ __pgin_routine(pg_cookie, pgno, page) pagep = (PAGE16 *)page; hashp = (HTAB *)pg_cookie; - /* - * There are the following cases for swapping: + /* + * There are the following cases for swapping: * 0) New page that may be unitialized. * 1) Bucket page or overflow page. Either swap * the header or initialize the page. @@ -906,8 +906,8 @@ __pgout_routine(pg_cookie, pgno, page) pagep = (PAGE16 *)page; hashp = (HTAB *)pg_cookie; - /* - * There are the following cases for swapping: + /* + * There are the following cases for swapping: * 1) Bucket page or overflow page. Just swap the header. * 2) Bitmap page. Swap the whole page! * 3) Header pages. Not handled here; these are written directly diff --git a/src/plugins/kdb/db2/libdb2/hash/page.h b/src/plugins/kdb/db2/libdb2/hash/page.h index 8ef8a2e29..989f967c5 100644 --- a/src/plugins/kdb/db2/libdb2/hash/page.h +++ b/src/plugins/kdb/db2/libdb2/hash/page.h @@ -57,7 +57,7 @@ * other (since we use that fact to compute key lengths). In the accessor * macros below, P means a pointer to the page, I means an index of the * particular entry being accessed. - * + * * Hash base page format * BYTE ITEM NBYTES TYPE ACCESSOR MACRO * ---- ------------------ ------ -------- -------------- @@ -167,7 +167,7 @@ typedef unsigned char PAGE8; #define FREESPACE(P) \ ((OFFSET((P)) + 1 - PAGE_OVERHEAD - (NUM_ENT((P)) * PAIR_OVERHEAD))) -/* +/* * Overhead on header pages is just one word -- the length of the * header info stored on that page. */ diff --git a/src/plugins/kdb/db2/libdb2/include/db-queue.h b/src/plugins/kdb/db2/libdb2/include/db-queue.h index 40d32ccb6..65612ce6f 100644 --- a/src/plugins/kdb/db2/libdb2/include/db-queue.h +++ b/src/plugins/kdb/db2/libdb2/include/db-queue.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/src/plugins/kdb/db2/libdb2/include/db.hin b/src/plugins/kdb/db2/libdb2/include/db.hin index ad86d0af9..dca0b0067 100644 --- a/src/plugins/kdb/db2/libdb2/include/db.hin +++ b/src/plugins/kdb/db2/libdb2/include/db.hin @@ -154,7 +154,7 @@ typedef struct { int lorder; /* byte order */ size_t reclen; /* record length (fixed-length records) */ u_char bval; /* delimiting byte (variable-length records */ - char *bfname; /* btree file name */ + char *bfname; /* btree file name */ } RECNOINFO; #if defined(__cplusplus) diff --git a/src/plugins/kdb/db2/libdb2/mpool/mpool.c b/src/plugins/kdb/db2/libdb2/mpool/mpool.c index 3b0be3f55..acdc1b827 100644 --- a/src/plugins/kdb/db2/libdb2/mpool/mpool.c +++ b/src/plugins/kdb/db2/libdb2/mpool/mpool.c @@ -106,7 +106,7 @@ mpool_filter(mp, pgin, pgout, pgcookie) mp->pgout = pgout; mp->pgcookie = pgcookie; } - + /* * mpool_new -- * Get a new page of memory. @@ -173,8 +173,8 @@ mpool_delete(mp, page) free(bp); return (RET_SUCCESS); -} - +} + /* * mpool_get * Get a page. @@ -486,7 +486,7 @@ mpool_stat(mp) mp->pagealloc, mp->pageflush); if (mp->cachehit + mp->cachemiss) (void)fprintf(stderr, - "%.0f%% cache hit rate (%lu hits, %lu misses)\n", + "%.0f%% cache hit rate (%lu hits, %lu misses)\n", ((double)mp->cachehit / (mp->cachehit + mp->cachemiss)) * 100, mp->cachehit, mp->cachemiss); (void)fprintf(stderr, "%lu page reads, %lu page writes\n", @@ -506,7 +506,7 @@ mpool_stat(mp) cnt = 0; } else sep = ", "; - + } (void)fprintf(stderr, "\n"); } diff --git a/src/plugins/kdb/db2/libdb2/recno/rec_put.c b/src/plugins/kdb/db2/libdb2/recno/rec_put.c index e7fa75882..bd710df84 100644 --- a/src/plugins/kdb/db2/libdb2/recno/rec_put.c +++ b/src/plugins/kdb/db2/libdb2/recno/rec_put.c @@ -170,7 +170,7 @@ einval: errno = EINVAL; if (flags == R_SETCURSOR) t->bt_cursor.rcursor = nrec; - + F_SET(t, R_MODIFIED); return (__rec_ret(t, NULL, nrec, key, NULL)); } diff --git a/src/plugins/kdb/db2/libdb2/recno/rec_search.c b/src/plugins/kdb/db2/libdb2/recno/rec_search.c index a328f1be0..15042627d 100644 --- a/src/plugins/kdb/db2/libdb2/recno/rec_search.c +++ b/src/plugins/kdb/db2/libdb2/recno/rec_search.c @@ -92,7 +92,7 @@ __rec_search(t, recno, op) } BT_PUSH(t, pg, idx - 1); - + pg = r->pgno; switch (op) { case SDELETE: diff --git a/src/plugins/kdb/db2/libdb2/recno/rec_seq.c b/src/plugins/kdb/db2/libdb2/recno/rec_seq.c index 1edaa998e..8af1378c3 100644 --- a/src/plugins/kdb/db2/libdb2/recno/rec_seq.c +++ b/src/plugins/kdb/db2/libdb2/recno/rec_seq.c @@ -107,7 +107,7 @@ __rec_seq(dbp, key, data, flags) einval: errno = EINVAL; return (RET_ERROR); } - + if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) { if (!F_ISSET(t, R_EOF | R_INMEM) && (status = t->bt_irec(t, nrec)) != RET_SUCCESS) diff --git a/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c b/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c index f77b676f1..cfd1a4211 100644 --- a/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c +++ b/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c @@ -8,7 +8,7 @@ #include <stdlib.h> #include <string.h> - + void main(int argc, char *argv[]) { char id1[] = {" "}, id2[] = {" "}; int i; @@ -27,13 +27,13 @@ void main(int argc, char *argv[]) { printf("\n Open error on test.db %d %s\n",errno,strerror(errno)); exit(25); } - + while (fscanf(fin," %10s%10s",id1,id2) > 0) { key.size = 11; data.size = 11; key.data = id1; data.data = id2; - printf("%10s %10s\n",key.data,data.data); + printf("%10s %10s\n",key.data,data.data); if (dbp->put(dbp, &key, &data,R_NOOVERWRITE) != 0) { printf("Error writing output\n"); } @@ -41,7 +41,7 @@ void main(int argc, char *argv[]) { } printf("%d Records in\n",out); dbp->close(dbp); - + if ((dbp = dbopen("test.db", O_RDWR | O_BINARY, 0664 , DB_BTREE, NULL )) == NULL) { printf("\n Error on dbopen %d %s\n",errno,strerror(errno)); @@ -56,7 +56,7 @@ void main(int argc, char *argv[]) { strcpy(id2,data.data); id2[0] = 'U'; datao.data=id2; - printf("%10s %10s\n",key.data,data.data); + printf("%10s %10s\n",key.data,data.data); in++; if (in > 10) break; #ifdef notdef @@ -74,11 +74,11 @@ void main(int argc, char *argv[]) { printf("%d Records copied\n",in); in = 0; dbp->seq(dbp, &key, &data,R_FIRST); - printf("%10s %10s\n",key.data,data.data); + printf("%10s %10s\n",key.data,data.data); in++; while (dbp->seq(dbp, &key, &data,R_NEXT) == 0) { in++; - printf("%10s %10s\n",key.data,data.data); + printf("%10s %10s\n",key.data,data.data); } printf("%d Records read\n",in); dbp->close(dbp); diff --git a/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c b/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c index 06f02b3ad..0d78d5934 100644 --- a/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c +++ b/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c @@ -691,7 +691,7 @@ load(db, argv) key.size = sizeof(recno_t); data.data = lp; data.size = len + 1; - } else { + } else { key.data = lp; key.size = len + 1; for (p = lp + len - 1, t = buf; p >= lp; *t++ = *p--); diff --git a/src/plugins/kdb/db2/libdb2/test/dbtest.c b/src/plugins/kdb/db2/libdb2/test/dbtest.c index b0aee708d..df92cd79e 100644 --- a/src/plugins/kdb/db2/libdb2/test/dbtest.c +++ b/src/plugins/kdb/db2/libdb2/test/dbtest.c @@ -390,7 +390,7 @@ get(dbp, kp) exit(1); } else (void)fprintf(stderr, "%lu: %.*s: %s", - lineno, (int) MIN(kp->size, 20), (char *) kp->data, + lineno, (int) MIN(kp->size, 20), (char *) kp->data, NOSUCHKEY); #undef NOSUCHKEY break; @@ -447,8 +447,8 @@ rem(dbp, kp) if (ofd != STDOUT_FILENO) (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); else if (flags != R_CURSOR) - (void)fprintf(stderr, "%lu: %.*s: %s", - lineno, (int) MIN(kp->size, 20), (char *) kp->data, + (void)fprintf(stderr, "%lu: %.*s: %s", + lineno, (int) MIN(kp->size, 20), (char *) kp->data, NOSUCHKEY); else (void)fprintf(stderr, @@ -492,8 +492,8 @@ seq(dbp, kp) if (ofd != STDOUT_FILENO) (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1); else if (flags == R_CURSOR) - (void)fprintf(stderr, "%lu: %.*s: %s", - lineno, (int) MIN(kp->size, 20), (char *) kp->data, + (void)fprintf(stderr, "%lu: %.*s: %s", + lineno, (int) MIN(kp->size, 20), (char *) kp->data, NOSUCHKEY); else (void)fprintf(stderr, @@ -534,7 +534,7 @@ dump(dbp, rev) } done: return; } - + u_int setflags(s) char *s; @@ -578,7 +578,7 @@ sflags(lflags) return ("UNKNOWN!"); } - + DBTYPE dbtype(s) char *s; @@ -608,7 +608,7 @@ setinfo(db_type, s) *eq++ = '\0'; if (!isdigit((int) *eq)) err("%s: structure set statement must be a number", s); - + switch (db_type) { case DB_BTREE: if (!strcmp("flags", s)) { diff --git a/src/plugins/kdb/db2/libdb2/test/hash1.tests/driver2.c b/src/plugins/kdb/db2/libdb2/test/hash1.tests/driver2.c index 34397ecaa..02982b162 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash1.tests/driver2.c +++ b/src/plugins/kdb/db2/libdb2/test/hash1.tests/driver2.c @@ -109,6 +109,3 @@ main(argc, argv) } exit(0); } - - - diff --git a/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c b/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c index f11487b32..6767de5e9 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c +++ b/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c @@ -97,7 +97,7 @@ char **argv; fprintf(stderr, "cannot enter: key %s\n", item.data); exit(1); - } + } } (dbp->close)(dbp); diff --git a/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c b/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c index 826611486..32d8250fc 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c +++ b/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c @@ -99,7 +99,7 @@ char **argv; fprintf(stderr, "cannot enter: key %s\n", item.data); exit(1); - } + } } if ( --argc ) { @@ -113,7 +113,7 @@ char **argv; if (stat) { fprintf ( stderr, "Error retrieving %s\n", key.data ); exit(1); - } + } } fclose(fp); } diff --git a/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c b/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c index b15b617bc..830d7a185 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c +++ b/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c @@ -85,8 +85,8 @@ char **argv; key.data = wp1; item.data = wp2; - while ( fgets(wp1, 8192, stdin) && - fgets(wp2, 8192, stdin) && + while ( fgets(wp1, 8192, stdin) && + fgets(wp2, 8192, stdin) && i++ < MAXWORDS) { /* * put info in structure, and structure in the item @@ -102,14 +102,14 @@ char **argv; item.data); fprintf(stderr, "\terrno: %d\n", errno); exit(1); - } + } } if ( --argc ) { fp = fopen ( argv[0], "r"); i = 0; - while ( fgets(wp1, 256, fp) && - fgets(wp2, 8192, fp) && + while ( fgets(wp1, 256, fp) && + fgets(wp2, 8192, fp) && i++ < MAXWORDS) { key.size = strlen(wp1); diff --git a/src/plugins/kdb/db2/libdb2/test/hash1.tests/tseq.c b/src/plugins/kdb/db2/libdb2/test/hash1.tests/tseq.c index d2d36862d..bee41961e 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash1.tests/tseq.c +++ b/src/plugins/kdb/db2/libdb2/test/hash1.tests/tseq.c @@ -72,7 +72,7 @@ char **argv; /* * put info in structure, and structure in the item */ - for ( stat = (dbp->seq) (dbp, &res, &item, 1 ); + for ( stat = (dbp->seq) (dbp, &res, &item, 1 ); stat == 0; stat = (dbp->seq) (dbp, &res, &item, 0 ) ) { diff --git a/src/plugins/kdb/db2/libdb2/test/hash2.tests/bigtest.c b/src/plugins/kdb/db2/libdb2/test/hash2.tests/bigtest.c index 81c559ad2..c8070c503 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash2.tests/bigtest.c +++ b/src/plugins/kdb/db2/libdb2/test/hash2.tests/bigtest.c @@ -33,9 +33,9 @@ main(void) returned.data = NULL; if (n == 4627) printf(""); - if (n % 50 == 0) + if (n % 50 == 0) printf("put n = %d\n", n); - if (db->put(db, &key, &value, 0) != 0) + if (db->put(db, &key, &value, 0) != 0) printf("put error, n = %d\n", n); if (db->get(db, &key, &returned, 0) != 0) printf("Immediate get error, n = %d\n", n); @@ -47,7 +47,7 @@ main(void) } for (n = 0; n < 200000; n++) { - if (n % 50 == 0) + if (n % 50 == 0) printf("seq n = %d\n", n); if ((db->seq(db, &key, &returned, 0)) != 0) printf("Seq error, n = %d\n", n); @@ -57,10 +57,10 @@ main(void) for (i = 0; i < 800; i++) if (((int *)returned.data)[i] != 0xDEADBEEF) printf("ERRORRRRRR!!! seq %d\n", n); - } + } for (n = 0; n < 2000; n++) { - if (n % 50 == 0) + if (n % 50 == 0) printf("get n = %d\n", n); if (db->get(db, &key, &returned, 0) != 0) printf("Late get error, n = %d\n", n); @@ -73,4 +73,3 @@ main(void) free(value.data); return(0); } - diff --git a/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c b/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c index adb72c004..43895a429 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c +++ b/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c @@ -14,7 +14,7 @@ main(void) char *key_line, *val_line, *get_key, *get_val, *old, *key2; HASHINFO passwd; int n = 0, i = 0, expected; - + key_line = (char *)malloc(100); val_line = (char *)malloc(300); old = (char *)malloc(300); @@ -28,15 +28,15 @@ main(void) passwd.hash = NULL; passwd.nelem = 0; passwd.lorder = 4321; - - db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0664, DB_HASH, + + db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0664, DB_HASH, &passwd); if (!db) { fprintf(stderr, "create_db: couldn't create database file\n"); exit(1); } - + while ((key_line = fgets(key_line, 100, keys)) != NULL) { if (n % 1000 == 0) fprintf(stderr, "Putting #%d.\n", n); @@ -52,7 +52,7 @@ main(void) fprintf(stderr, "Immediate get error, n = %d\n", n); } fprintf(stderr, "Done with put!\n"); - free(key_line); + free(key_line); free(val_line); fclose(keys); fclose(vals); @@ -60,7 +60,7 @@ main(void) - + keys = fopen("yp.keys", "rt"); vals = fopen("yp.total", "rt"); get_key = (char *)malloc(100); @@ -81,7 +81,7 @@ main(void) fgets(get_val, 300, vals); if (memcmp(val.data, (void *)get_val, val.size)) { fprintf(stderr, "Unmatched get on %s.\n", get_key); - fprintf(stderr, "Input = %s\nOutput = %s\n", get_val, + fprintf(stderr, "Input = %s\nOutput = %s\n", get_val, (char *)val.data); } } @@ -107,7 +107,7 @@ main(void) if (n % 1000 == 0) fprintf(stderr, "Sequence getting #%d.\n", n); if (db->seq(db, &key, &val, 0) != 0) { - fprintf(stderr, + fprintf(stderr, "Exiting sequence retrieve; n = %d, expected = %d\n", n - 1 , expected); break; @@ -131,7 +131,7 @@ main(void) n+=2; key2 = fgets(get_key, 100, keys); if (!key2) - break; + break; key.data = (void *)key2; key.size = strlen(key2); if (db->del(db, &key, 0) != 0) @@ -150,7 +150,7 @@ main(void) keys = fopen("yp.keys", "rt"); vals = fopen("yp.total", "rt"); - + db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_BINARY, 0664, DB_HASH, &passwd); n = 0; while ((get_key = fgets(get_key, 100, keys)) != NULL) { @@ -160,14 +160,14 @@ main(void) key2 = fgets(key2, 100, keys); if (!key2) break; - key.data = (void *)get_key; + key.data = (void *)get_key; key.size = strlen(get_key); - if (db->get(db, &key, &val, 0) != 0) + if (db->get(db, &key, &val, 0) != 0) fprintf(stderr, "Retrieval after delete error on %d\n", n); fgets(get_val, 300, vals); if (memcmp(val.data, (void *)get_val, val.size)) { fprintf(stderr, "Unmatched get after delete on %s.\n", get_key); - fprintf(stderr, "Input = %s\nOutput = %s\n", get_val, + fprintf(stderr, "Input = %s\nOutput = %s\n", get_val, (char *)val.data); } fgets(get_val, 300, vals); diff --git a/src/plugins/kdb/db2/libdb2/test/hash2.tests/passwd/genpass.c b/src/plugins/kdb/db2/libdb2/test/hash2.tests/passwd/genpass.c index da3767687..7d03e609c 100644 --- a/src/plugins/kdb/db2/libdb2/test/hash2.tests/passwd/genpass.c +++ b/src/plugins/kdb/db2/libdb2/test/hash2.tests/passwd/genpass.c @@ -6,7 +6,7 @@ main(int argc, char **argv) { int i,j,n; char *pass[8], r; - + n = atoi(argv[1]); srandom(101173); @@ -20,4 +20,3 @@ main(int argc, char **argv) printf("\n"); } } - diff --git a/src/plugins/kdb/db2/lockout.c b/src/plugins/kdb/db2/lockout.c index 1e6602dcc..e6c4b65e0 100644 --- a/src/plugins/kdb/db2/lockout.c +++ b/src/plugins/kdb/db2/lockout.c @@ -193,4 +193,3 @@ krb5_db2_lockout_audit(krb5_context context, return 0; } - diff --git a/src/plugins/kdb/db2/pol_xdr.c b/src/plugins/kdb/db2/pol_xdr.c index 31856fbd2..315d0d1c5 100644 --- a/src/plugins/kdb/db2/pol_xdr.c +++ b/src/plugins/kdb/db2/pol_xdr.c @@ -8,11 +8,11 @@ #endif #include <string.h> -static +static bool_t xdr_nullstring(XDR *xdrs, char **objp) { u_int size; - + if (xdrs->x_op == XDR_ENCODE) { if (*objp == NULL) size = 0; @@ -35,22 +35,22 @@ bool_t xdr_nullstring(XDR *xdrs, char **objp) } } return (xdr_opaque(xdrs, *objp, size)); - + case XDR_ENCODE: if (size != 0) return (xdr_opaque(xdrs, *objp, size)); return TRUE; - + case XDR_FREE: if (*objp != NULL) mem_free(*objp, size); *objp = NULL; return TRUE; } - + return FALSE; } - + static int osa_policy_min_vers(osa_policy_ent_t objp) { @@ -85,7 +85,7 @@ xdr_osa_policy_ent_rec(XDR *xdrs, osa_policy_ent_t objp) return FALSE; break; } - + if(!xdr_nullstring(xdrs, &objp->name)) return (FALSE); if (!xdr_u_int32(xdrs, &objp->pw_min_life)) diff --git a/src/plugins/kdb/db2/policy_db.h b/src/plugins/kdb/db2/policy_db.h index d841d7376..54af70cd6 100644 --- a/src/plugins/kdb/db2/policy_db.h +++ b/src/plugins/kdb/db2/policy_db.h @@ -63,7 +63,7 @@ typedef struct _osa_adb_db_ent_t { /* * Return Code (the rest are in adb_err.h) */ - + #define OSA_ADB_OK 0 /* diff --git a/src/plugins/kdb/hdb/hdb.h b/src/plugins/kdb/hdb/hdb.h index 39fbec7e5..620080888 100644 --- a/src/plugins/kdb/hdb/hdb.h +++ b/src/plugins/kdb/hdb/hdb.h @@ -1,34 +1,34 @@ /* * Copyright (c) 1997 - 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* $Id: hdb.h 22198 2007-12-07 13:09:25Z lha $ */ @@ -77,7 +77,7 @@ typedef struct HDB{ struct HDB*, int, mode_t); - krb5_error_code (*hdb_close)(heim_context, + krb5_error_code (*hdb_close)(heim_context, struct HDB*); void (*hdb_free)(heim_context, struct HDB*, @@ -116,10 +116,10 @@ typedef struct HDB{ heim_octet_string*); krb5_error_code (*hdb__put)(heim_context, struct HDB*, - int, + int, heim_octet_string, heim_octet_string); - krb5_error_code (*hdb__del)(heim_context, + krb5_error_code (*hdb__del)(heim_context, struct HDB*, heim_octet_string); krb5_error_code (*hdb_destroy)(heim_context, diff --git a/src/plugins/kdb/hdb/kdb_hdb.c b/src/plugins/kdb/hdb/kdb_hdb.c index d22489eec..e42b05586 100644 --- a/src/plugins/kdb/hdb/kdb_hdb.c +++ b/src/plugins/kdb/hdb/kdb_hdb.c @@ -173,7 +173,7 @@ kh_db_context_init(krb5_context context, GET_PLUGIN_FUNC(libkrb5, "krb5_pac_parse", heim_pac_parse); GET_PLUGIN_FUNC(libkrb5, "krb5_pac_verify", heim_pac_verify); GET_PLUGIN_FUNC(libkrb5, "_krb5_pac_sign", heim_pac_sign); - + if (asprintf(&libhdb, "%s/libhdb%s", libdir, SHLIBEXT) < 0) goto cleanup; @@ -1423,4 +1423,3 @@ kdb_vftabl kdb_function_table = { kh_dbekd_encrypt_key_data, kh_db_invoke, }; - diff --git a/src/plugins/kdb/hdb/kdb_hdb.h b/src/plugins/kdb/hdb/kdb_hdb.h index 9cfbef6a3..6ba5fbcb5 100644 --- a/src/plugins/kdb/hdb/kdb_hdb.h +++ b/src/plugins/kdb/hdb/kdb_hdb.h @@ -169,4 +169,3 @@ kh_hdb_windc_init(krb5_context context, kh_db_context *kh); #endif /* KRB5_KDB_HDB_H */ - diff --git a/src/plugins/kdb/hdb/kdb_marshal.c b/src/plugins/kdb/hdb/kdb_marshal.c index 17bbdc808..d5e469347 100644 --- a/src/plugins/kdb/hdb/kdb_marshal.c +++ b/src/plugins/kdb/hdb/kdb_marshal.c @@ -108,7 +108,7 @@ kh_unmarshal_octet_string(krb5_context context, krb5_error_code code; *out_data = k5alloc(sizeof(krb5_data), &code); - if (code != 0) + if (code != 0) return code; code = kh_unmarshal_octet_string_contents(context, in_data, *out_data); @@ -807,4 +807,3 @@ cleanup: return code; } - diff --git a/src/plugins/kdb/hdb/kdb_windc.c b/src/plugins/kdb/hdb/kdb_windc.c index a419d29de..9481876c6 100644 --- a/src/plugins/kdb/hdb/kdb_windc.c +++ b/src/plugins/kdb/hdb/kdb_windc.c @@ -370,7 +370,7 @@ kh_db_sign_auth_data(krb5_context context, &rep->auth_data); if (code != 0) goto cleanup; - + cleanup: if (req->client == NULL) kh_free_Principal(context, client_hprinc); @@ -612,4 +612,3 @@ kh_hdb_windc_init(krb5_context context, return code; } - diff --git a/src/plugins/kdb/hdb/windc_plugin.h b/src/plugins/kdb/hdb/windc_plugin.h index 7df2a2147..d2d549703 100644 --- a/src/plugins/kdb/hdb/windc_plugin.h +++ b/src/plugins/kdb/hdb/windc_plugin.h @@ -1,34 +1,34 @@ /* * Copyright (c) 2006 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* $Id: windc_plugin.h 22693 2008-03-19 08:57:49Z lha $ */ @@ -52,17 +52,17 @@ struct hdb_entry_ex; struct _heim_pac_data; typedef struct _heim_pac_data *heim_pac; -typedef krb5_error_code +typedef krb5_error_code (*krb5plugin_windc_pac_generate)(void *, heim_context, struct hdb_entry_ex *, heim_pac *); -typedef krb5_error_code +typedef krb5_error_code (*krb5plugin_windc_pac_verify)(void *, heim_context, const Principal *, - struct hdb_entry_ex *, + struct hdb_entry_ex *, struct hdb_entry_ex *, heim_pac *); -typedef krb5_error_code +typedef krb5_error_code (*krb5plugin_windc_client_access)( void *, heim_context, struct hdb_entry_ex *, KDC_REQ *, heim_octet_string *); @@ -79,4 +79,3 @@ typedef struct krb5plugin_windc_ftable { } krb5plugin_windc_ftable; #endif /* HEIMDAL_WINDC_PLUGIN_H */ - diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.c index 835b2350b..09b50797d 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.c @@ -284,4 +284,3 @@ int list_modify_int_array(destlist, sourcelist, mode) return tcount; } - diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.h b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.h index b6402e592..a251fde3f 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.h +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_list.h @@ -1,33 +1,32 @@ - /* * kadmin/ldap_util/kdb5_ldap_list.h */ - + /* Copyright (c) 2004-2005, Novell, Inc. * All rights reserved. * - * Redistribution and use in source and binary forms, with or without + * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * The copyright holder's name is not used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * POSSIBILITY OF SUCH DAMAGE. */ @@ -43,5 +42,5 @@ extern void krb5_free_list_entries(char **list); extern void list_modify_str_array(char ***destlist, const char **sourcelist, int mode); extern int list_modify_int_array(int *destlist, const int *sourcelist, int mode); extern int list_count_str_array(char **list); -extern int list_count_int_array(int *list); +extern int list_count_int_array(int *list); extern int compare_int(const void*, const void *); diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c index e794e6159..b22e63184 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c @@ -47,7 +47,7 @@ static char *strdur(time_t duration); extern char *yes; extern kadm5_config_params global_params; - + static krb5_error_code init_ldap_realm (int argc, char *argv[]) { /* This operation is being performed in the context of a realm. So, * initialize the realm */ @@ -55,14 +55,14 @@ static krb5_error_code init_ldap_realm (int argc, char *argv[]) { krb5_error_code retval = 0; kdb5_dal_handle *dal_handle = NULL; krb5_ldap_context *ldap_context=NULL; - + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!ldap_context) { retval = EINVAL; goto cleanup; } - + if (ldap_context->krbcontainer == NULL) { retval = krb5_ldap_read_krbcontainer_params (util_context, &(ldap_context->krbcontainer)); @@ -71,13 +71,13 @@ static krb5_error_code init_ldap_realm (int argc, char *argv[]) { goto cleanup; } } - + if (ldap_context->lrparams == NULL) { retval = krb5_ldap_read_realm_params(util_context, global_params.realm, &(ldap_context->lrparams), &mask); - + if (retval != 0) { goto cleanup; } diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c index 60d9e25f7..017a5cddf 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c @@ -939,7 +939,7 @@ void kdb5_ldap_modify(argc, argv) char **newadmindns = NULL; char **newpwddns = NULL; char **oldsubtrees = NULL; - char *oldcontainerref = NULL; + char *oldcontainerref = NULL; int rightsmask = 0; int subtree_changed = 0; #endif @@ -1558,7 +1558,7 @@ void kdb5_ldap_modify(argc, argv) } } } - + if (subtree_changed && (mask & LDAP_REALM_KDCSERVERS)) { char **newdns = rparams->kdcservers; @@ -1591,7 +1591,7 @@ void kdb5_ldap_modify(argc, argv) } if (subtree_changed || (mask & LDAP_REALM_ADMINSERVERS)) { - + if (!(mask & LDAP_REALM_ADMINSERVERS)) { if (rparams->adminservers != NULL) { char **admindns = rparams->adminservers; @@ -1692,7 +1692,7 @@ void kdb5_ldap_modify(argc, argv) } } } - + if (subtree_changed && (mask & LDAP_REALM_ADMINSERVERS)) { char **newdns = rparams->adminservers; @@ -1725,7 +1725,7 @@ void kdb5_ldap_modify(argc, argv) } if (subtree_changed || (mask & LDAP_REALM_PASSWDSERVERS)) { - + if (!(mask & LDAP_REALM_PASSWDSERVERS)) { if (rparams->passwdservers != NULL) { char **passwddns = rparams->passwdservers; @@ -1826,7 +1826,7 @@ void kdb5_ldap_modify(argc, argv) } } } - + if (subtree_changed && (mask & LDAP_REALM_PASSWDSERVERS)) { char **newdns = rparams->passwdservers; diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.c index 273400c18..48cbe5a88 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.c @@ -509,7 +509,7 @@ void kdb5_ldap_modify_service(argc, argv) int argc; char *argv[]; { - char *me = progname; + char *me = progname; krb5_error_code retval = 0; krb5_ldap_service_params *srvparams = NULL; krb5_boolean print_usage = FALSE; diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.h b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.h index 934f1abea..0322558cc 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.h +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.h @@ -66,4 +66,3 @@ extern void kdb5_ldap_view_service(int argc, char **argv); extern int kdb5_ldap_set_service_password(int argc, char **argv); extern void kdb5_ldap_set_service_certificate(int argc, char **argv); extern void kdb5_ldap_stash_service_password(int argc, char **argv); - diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h index d27dd5247..8eb65af5d 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h @@ -1,4 +1,4 @@ -/* +/* * kadmin/ldap_util/kdb5_ldap_util.h */ @@ -42,7 +42,7 @@ #define LIST_REALM 5 #ifdef HAVE_EDIRECTORY -# define CREATE_SERVICE 6 +# define CREATE_SERVICE 6 # define MODIFY_SERVICE 7 # define VIEW_SERVICE 8 # define DESTROY_SERVICE 9 diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ext.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ext.c index 0009b59d6..717daee22 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ext.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ext.c @@ -96,4 +96,3 @@ krb5_ldap_invoke(krb5_context context, return code; } - diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c index 0d86801d6..8f7e3bdd3 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c @@ -105,7 +105,7 @@ krb5_ldap_read_startup_information(krb5_context context) kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; int mask = 0; - + SETUP_CONTEXT(); if ((retval=krb5_ldap_read_krbcontainer_params(context, &(ldap_context->krbcontainer)))) { prepend_err_str (context, "Unable to read Kerberos container", retval, retval); @@ -450,7 +450,7 @@ krb5_error_code krb5_ldap_open(krb5_context context, /* ignore hash argument. Might have been passed from create */ status = EINVAL; if (opt && !strcmp(opt, "temporary")) { - /* + /* * temporary is passed in when kdb5_util load without -update is done. * This is unsupported by the LDAP plugin. */ diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h index d14b48bf9..ea6d3706a 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h @@ -161,7 +161,7 @@ extern void prepend_err_str (krb5_context ctx, const char *s, krb5_error_code er && ldap_context->server_info_list)) { \ return KRB5_KDB_DBNOTINITED; \ } - + #define HNDL_LOCK(lcontext) k5_mutex_lock(&lcontext->hndl_lock) #define HNDL_UNLOCK(lcontext) k5_mutex_unlock(&lcontext->hndl_lock) @@ -204,7 +204,7 @@ struct _krb5_ldap_server_info { /* ldap server structure */ -typedef enum {SERVICE_DN_TYPE_SERVER, SERVICE_DN_TYPE_CLIENT} krb5_ldap_servicetype; +typedef enum {SERVICE_DN_TYPE_SERVER, SERVICE_DN_TYPE_CLIENT} krb5_ldap_servicetype; typedef struct _krb5_ldap_context { krb5_ldap_servicetype service_type; @@ -250,16 +250,16 @@ krb5_ldap_rebind(krb5_ldap_context *, krb5_ldap_server_handle **); krb5_error_code krb5_ldap_db_get_age(krb5_context, char *, time_t *); -krb5_error_code +krb5_error_code krb5_ldap_lib_init(void); -krb5_error_code +krb5_error_code krb5_ldap_lib_cleanup(void); -void * +void * krb5_ldap_alloc( krb5_context kcontext, void *ptr, size_t size ); -void +void krb5_ldap_free( krb5_context kcontext, void *ptr ); krb5_error_code krb5_ldap_get_mkey(krb5_context, krb5_keyblock **); @@ -276,11 +276,11 @@ krb5_ldap_set_mkey_list(krb5_context, krb5_keylist_node *); krb5_error_code krb5_ldap_create(krb5_context , char *, char **); -krb5_error_code +krb5_error_code krb5_ldap_open( krb5_context , char *, char **db_args, int mode ); -krb5_error_code +krb5_error_code krb5_ldap_close( krb5_context ); krb5_error_code diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c index db1f76a69..d757a6ee3 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c @@ -129,9 +129,9 @@ krb5_ldap_bind(ldap_context, ldap_server_handle) /* password based simple bind */ bv.bv_val = ldap_context->bind_pwd; bv.bv_len = strlen(ldap_context->bind_pwd); - st = ldap_sasl_bind_s(ldap_server_handle->ldap_handle, + st = ldap_sasl_bind_s(ldap_server_handle->ldap_handle, ldap_context->bind_dn, - NULL, &bv, NULL, + NULL, &bv, NULL, NULL, NULL); } return st; diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c index c048c9340..9974b1721 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c @@ -39,7 +39,7 @@ #include "ldap_krbcontainer.h" #include "ldap_err.h" -/* +/* * ****************************************************************************** * DAL functions * ****************************************************************************** @@ -214,7 +214,7 @@ krb5_ldap_create (krb5_context context, char *conf_section, char **db_args) /* ignore hash argument. Might have been passed from create */ status = EINVAL; if (opt && !strcmp(opt, "temporary")) { - /* + /* * temporary is passed in when kdb5_util load without -update is done. * This is unsupported by the LDAP plugin. */ diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_err.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_err.c index 15ea6b4b9..5bfaa7801 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_err.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_err.c @@ -13,7 +13,7 @@ #define LDAP_NAME_ERROR(x) (0) #endif #endif - + #ifndef LDAP_SECURITY_ERROR #define LDAP_SECURITY_ERROR(x) (0) #endif diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c index 6da080664..ad90109da 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c @@ -139,4 +139,3 @@ krb5_ldap_set_mkey_list(krb5_context context, krb5_keylist_node *key_list) r_params->mkey_list = key_list; return 0; } - diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.c index dac02498d..8187cdc02 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.c @@ -275,4 +275,3 @@ krb5_ldap_put_handle_to_pool(ldap_context, ldap_server_handle) } return; } - diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.h index a3b0885f4..c351c1fd7 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_handle.h @@ -31,7 +31,7 @@ #ifndef _LDAP_HANDLE_H_ #define _LDAP_HANDLE_H_ -krb5_error_code +krb5_error_code krb5_update_ldap_handle(krb5_ldap_server_handle *, krb5_ldap_server_info *); krb5_error_code diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h index 7177af601..27531a8da 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h @@ -86,7 +86,7 @@ krb5_error_code is_principal_in_realm(krb5_ldap_context *, krb5_const_principal); krb5_error_code -krb5_get_subtree_info(krb5_ldap_context *, char ***, unsigned int *); +krb5_get_subtree_info(krb5_ldap_context *, char ***, unsigned int *); krb5_error_code krb5_ldap_read_server_params(krb5_context , char *, int); @@ -100,16 +100,16 @@ copy_arrays(char **, char ***, int); krb5_error_code krb5_ldap_list(krb5_context, char ***, char *, char *); -krb5_error_code +krb5_error_code krb5_ldap_get_value(LDAP *, LDAPMessage *, char *, int *); -krb5_error_code +krb5_error_code krb5_ldap_get_string(LDAP *, LDAPMessage *, char *, char **, krb5_boolean *); -krb5_error_code +krb5_error_code krb5_ldap_get_strings(LDAP *, LDAPMessage *, char *, char ***, krb5_boolean *); -krb5_error_code +krb5_error_code krb5_ldap_get_time(LDAP *, LDAPMessage *, char *, krb5_timestamp *, krb5_boolean *); krb5_error_code diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c index 1cf67629b..ecc4d3c8a 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c @@ -143,7 +143,7 @@ krb5_ldap_iterate(context, match_expr, func, func_arg) { krb5_db_entry entry; krb5_principal principal; - char **subtree=NULL, *princ_name=NULL, *realm=NULL, **values=NULL, *filter=NULL; + char **subtree=NULL, *princ_name=NULL, *realm=NULL, **values=NULL, *filter=NULL; unsigned int tree=0, ntree=1, i=0; krb5_error_code st=0, tempst=0; LDAP *ld=NULL; @@ -169,7 +169,7 @@ krb5_ldap_iterate(context, match_expr, func, func_arg) } } - /* + /* * If no match_expr then iterate through all krb princs like the db2 plugin */ if (match_expr == NULL) @@ -179,7 +179,7 @@ krb5_ldap_iterate(context, match_expr, func, func_arg) filter = NULL; CHECK_NULL(filter); - if ((st = krb5_get_subtree_info(ldap_context, &subtree, &ntree)) != 0) + if ((st = krb5_get_subtree_info(ldap_context, &subtree, &ntree)) != 0) goto cleanup; GET_HANDLE(); diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c index f81d39904..42a76859a 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c @@ -294,11 +294,11 @@ process_db_args(context, db_args, xargs, optype) dptr = &xargs->tktpolicydn; } else { if (strcmp(arg, USERDN_ARG) == 0) { - if (optype == MODIFY_PRINCIPAL || - xargs->dn != NULL || xargs->containerdn != NULL || + if (optype == MODIFY_PRINCIPAL || + xargs->dn != NULL || xargs->containerdn != NULL || xargs->linkdn != NULL) { st = EINVAL; - snprintf(errbuf, sizeof(errbuf), + snprintf(errbuf, sizeof(errbuf), "%s option not supported", arg); krb5_set_error_message(context, st, "%s", errbuf); goto cleanup; @@ -308,7 +308,7 @@ process_db_args(context, db_args, xargs, optype) if (optype == MODIFY_PRINCIPAL || xargs->dn != NULL || xargs->containerdn != NULL) { st = EINVAL; - snprintf(errbuf, sizeof(errbuf), + snprintf(errbuf, sizeof(errbuf), "%s option not supported", arg); krb5_set_error_message(context, st, "%s", errbuf); goto cleanup; @@ -317,7 +317,7 @@ process_db_args(context, db_args, xargs, optype) } else if (strcmp(arg, LINKDN_ARG) == 0) { if (xargs->dn != NULL || xargs->linkdn != NULL) { st = EINVAL; - snprintf(errbuf, sizeof(errbuf), + snprintf(errbuf, sizeof(errbuf), "%s option not supported", arg); krb5_set_error_message(context, st, "%s", errbuf); goto cleanup; @@ -329,11 +329,11 @@ process_db_args(context, db_args, xargs, optype) krb5_set_error_message(context, st, "%s", errbuf); goto cleanup; } - + xargs->dn_from_kbd = TRUE; if (arg_val == NULL || strlen(arg_val) == 0) { st = EINVAL; - snprintf(errbuf, sizeof(errbuf), + snprintf(errbuf, sizeof(errbuf), "%s option value missing", arg); krb5_set_error_message(context, st, "%s", errbuf); goto cleanup; @@ -342,7 +342,7 @@ process_db_args(context, db_args, xargs, optype) if (arg_val == NULL) { st = EINVAL; - snprintf(errbuf, sizeof(errbuf), + snprintf(errbuf, sizeof(errbuf), "%s option value missing", arg); krb5_set_error_message(context, st, "%s", errbuf); goto cleanup; @@ -350,8 +350,8 @@ process_db_args(context, db_args, xargs, optype) arg_val_len = strlen(arg_val) + 1; if (strcmp(arg, TKTPOLICY_ARG) == 0) { - if ((st = krb5_ldap_name_to_policydn (context, - arg_val, + if ((st = krb5_ldap_name_to_policydn (context, + arg_val, dptr)) != 0) goto cleanup; } else { @@ -639,7 +639,7 @@ krb5_ldap_put_principal(context, entries, nentries, db_args) free(filter); goto cleanup; } - /* + /* * If it isn't found then assume a standalone princ entry is to * be created. */ @@ -648,7 +648,7 @@ krb5_ldap_put_principal(context, entries, nentries, db_args) free(filter); if (found_entry == FALSE && principal_dn != NULL) { - /* + /* * if principal_dn is null then there is code further down to * deal with setting standalone_principal_dn. Also note that * this will set create_standalone_prinicipal true for @@ -1011,7 +1011,7 @@ krb5_ldap_put_principal(context, entries, nentries, db_args) goto cleanup; } } else if (entries->mask & KADM5_LOAD && found_entry == TRUE) { - /* + /* * a load is special in that existing entries must have attrs that * removed. */ @@ -1403,4 +1403,3 @@ getstringtime(epochtime) strftime(strtime, 50, "%Y%m%d%H%M%SZ", &tme); return strtime; } - diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.h index 49fa85ecb..846014eb6 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.h @@ -30,7 +30,7 @@ #ifndef _LDAP_KRBPWDPOLICY_H_ #define _LDAP_KRBPWDPOLICY_H_ - + krb5_error_code krb5_ldap_get_password_policy (krb5_context , char *, osa_policy_ent_t *, int *); @@ -44,7 +44,7 @@ krb5_error_code krb5_ldap_delete_password_policy ( krb5_context kcontext, char *policy ); krb5_error_code -krb5_ldap_iterate_password_policy(krb5_context, char *, +krb5_ldap_iterate_password_policy(krb5_context, char *, void (*) (krb5_pointer, osa_policy_ent_t ), krb5_pointer); diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c index e02a51a4a..fc84019e5 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c @@ -40,7 +40,7 @@ #include "ldap_err.h" #define END_OF_LIST -1 -char *realm_attributes[] = {"krbSearchScope","krbSubTrees", "krbPrincContainerRef", +char *realm_attributes[] = {"krbSearchScope","krbSubTrees", "krbPrincContainerRef", "krbMaxTicketLife", "krbMaxRenewableAge", "krbTicketFlags", "krbUpEnabled", "krbTicketPolicyReference", @@ -953,9 +953,9 @@ krb5_ldap_create_realm(context, rparams, mask) krb5_error_code st=0; char *dn=NULL; char *strval[4]={NULL}; - char *contref[2]={NULL}; + char *contref[2]={NULL}; LDAPMod **mods = NULL; - int i=0, objectmask=0, subtreecount=0; + int i=0, objectmask=0, subtreecount=0; kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; krb5_ldap_server_handle *ldap_server_handle=NULL; @@ -972,7 +972,7 @@ krb5_ldap_create_realm(context, rparams, mask) rparams == NULL || rparams->realm_name == NULL || ((mask & LDAP_REALM_SUBTREE) && rparams->subtree == NULL) || - ((mask & LDAP_REALM_CONTREF) && rparams->containerref == NULL) || + ((mask & LDAP_REALM_CONTREF) && rparams->containerref == NULL) || ((mask & LDAP_REALM_POLICYREFERENCE) && rparams->policyreference == NULL) || #ifdef HAVE_EDIRECTORY ((mask & LDAP_REALM_KDCSERVERS) && rparams->kdcservers == NULL) || @@ -1007,7 +1007,7 @@ krb5_ldap_create_realm(context, rparams, mask) strval[0] = "top"; strval[1] = "krbrealmcontainer"; - strval[2] = "krbticketpolicyaux"; + strval[2] = "krbticketpolicyaux"; strval[3] = NULL; if ((st=krb5_add_str_mem_ldap_mod(&mods, "objectclass", LDAP_MOD_ADD, strval)) != 0) @@ -1476,7 +1476,7 @@ krb5_ldap_free_realm_params(rparams) return; } -/* +/* * ****************************************************************************** * DAL functions * ****************************************************************************** diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h index db17509ae..cfdf39c55 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h @@ -43,7 +43,7 @@ #define LDAP_REALM_MAXTICKETLIFE 0x0100 #define LDAP_REALM_MAXRENEWLIFE 0x0200 #define LDAP_REALM_KRBTICKETFLAGS 0x0400 -#define LDAP_REALM_CONTREF 0x0800 +#define LDAP_REALM_CONTREF 0x0800 extern char *policy_attributes[]; @@ -54,8 +54,8 @@ extern char *realm_attributes[]; typedef struct _krb5_ldap_realm_params { char *realmdn; char *realm_name; - char **subtree; - char *containerref; + char **subtree; + char *containerref; char *policyreference; int search_scope; int upenabled; diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_rights.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_rights.c index d670f59fb..8d87d46ac 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_rights.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_rights.c @@ -133,7 +133,7 @@ static char *kdcrights_realmcontainer[][2]={ {"2#subtree#","#krbMKey"}, {"2#subtree#","#krbUPEnabled"}, {"2#subtree#","#krbSubTrees"}, - {"2#subtree#","#krbPrincContainerRef"}, + {"2#subtree#","#krbPrincContainerRef"}, {"2#subtree#","#krbSearchScope"}, {"2#subtree#","#krbLdapServers"}, {"2#subtree#","#krbKdcServers"}, @@ -167,7 +167,7 @@ static char *adminrights_realmcontainer[][2]={ {"2#subtree#","#krbMKey"}, {"6#subtree#","#krbUPEnabled"}, {"2#subtree#","#krbSubTrees"}, - {"2#subtree#","#krbPrincContainerRef"}, + {"2#subtree#","#krbPrincContainerRef"}, {"2#subtree#","#krbSearchScope"}, {"2#subtree#","#krbLdapServers"}, {"2#subtree#","#krbKdcServers"}, @@ -208,7 +208,7 @@ static char *pwdrights_realmcontainer[][2]={ {"2#subtree#","#krbMKey"}, {"2#subtree#","#krbUPEnabled"}, {"2#subtree#","#krbSubTrees"}, - {"2#subtree#","#krbPrincContainerRef"}, + {"2#subtree#","#krbPrincContainerRef"}, {"2#subtree#","#krbSearchScope"}, {"2#subtree#","#krbLdapServers"}, {"2#subtree#","#krbKdcServers"}, @@ -271,8 +271,8 @@ krb5_ldap_add_service_rights(context, servicetype, serviceobjdn, realmname, subt int servicetype; char *serviceobjdn; char *realmname; - char **subtreeparam; - char *contref; + char **subtreeparam; + char *contref; int mask; { @@ -559,7 +559,7 @@ krb5_ldap_delete_service_rights(context, servicetype, serviceobjdn, realmname, s int servicetype; char *serviceobjdn; char *realmname; - char **subtreeparam; + char **subtreeparam; char *contref; int mask; { @@ -574,7 +574,7 @@ krb5_ldap_delete_service_rights(context, servicetype, serviceobjdn, realmname, s kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; krb5_ldap_server_handle *ldap_server_handle=NULL; - int subtreecount = 0; + int subtreecount = 0; SETUP_CONTEXT(); GET_HANDLE(); diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.h index bd7e3dc63..05dd40a95 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.h @@ -42,14 +42,13 @@ struct data{ #define ERR_PWD_BAD 3 #define ERR_PWD_NOT_HEX 4 -int +int dec_password(struct data, struct data *); krb5_error_code krb5_ldap_readpassword(krb5_context, krb5_ldap_context *, unsigned char **); -int +int tohex(krb5_data, krb5_data *); #endif - diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_services.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_services.h index 0ad580d13..5f0b1d7e6 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_services.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_services.h @@ -87,7 +87,7 @@ krb5_ldap_free_service( krb5_context, krb5_ldap_service_params *); krb5_error_code krb5_ldap_set_service_passwd( krb5_context, char *, char *); -krb5_error_code +krb5_error_code krb5_ldap_add_service_rights( krb5_context, int, char *, char *, char **, char *, int); krb5_error_code diff --git a/src/plugins/kdb/ldap/libkdb_ldap/princ_xdr.h b/src/plugins/kdb/ldap/libkdb_ldap/princ_xdr.h index 65a03f7dd..5f40e4330 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/princ_xdr.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/princ_xdr.h @@ -34,7 +34,7 @@ ldap_xdr_krb5_ui_2(XDR *xdrs, krb5_ui_2 *objp); bool_t ldap_xdr_krb5_int16(XDR *xdrs, krb5_int16 *objp); -bool_t +bool_t ldap_xdr_nullstring(XDR *xdrs, char **objp); bool_t |
