$(SRCTOP)/include/kdb_log.h $(SRCTOP)/include/krb5.h \
$(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
$(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
- adb_err.h kdb5.c kdb5.h
+ adb_err.h kdb5.c kdb5.h kdb5int.h
encrypt_key.so encrypt_key.po $(OUTPRE)encrypt_key.$(OBJEXT): \
$(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
$(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
$(SRCTOP)/include/kdb_log.h $(SRCTOP)/include/krb5.h \
$(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
$(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
- kdb5.h kdb_log.c
+ kdb5.h kdb5int.h kdb_log.c
keytab.so keytab.po $(OUTPRE)keytab.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
$(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
$(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
#include "kdb5.h"
#include <assert.h>
#include "kdb_log.h"
+#include "kdb5int.h"
/* Currently DB2 policy related errors are exported from DAL. But
other databases should set_err function to return string. */
upd->kdb_princ_name.utf8str_t_val = princ_name;
upd->kdb_princ_name.utf8str_t_len = strlen(princ_name);
- if (status = ulog_add_update(kcontext, upd))
+ if ((status = ulog_add_update(kcontext, upd)))
goto err_lock;
upd++;
}
--- /dev/null
+/*
+ * lib/kdb5/kdb5int.h
+ *
+ * Copyright (C) 2008 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
+ *
+ *
+ * Private header file for the kdb5 library for internal functions
+ */
+
+#ifndef __KDB5INT_H__
+#define __KDB5INT_H__
+
+#include "kdb5.h"
+
+krb5_error_code
+krb5int_put_principal_no_log(krb5_context kcontext,
+ krb5_db_entry *entries, int *nentries);
+
+krb5_error_code
+krb5int_delete_principal_no_log(krb5_context kcontext,
+ krb5_principal search_for,
+ int *nentries);
+
+#endif /* __KDB5INT_H__ */
#include <syslog.h>
#include "kdb5.h"
#include "kdb_log.h"
+#include "kdb5int.h"
/*
* This modules includes all the necessary functions that create and
(pagesize-1)) & (~(pagesize-1));
size = end - start;
- if (retval = msync((caddr_t)start, size, MS_SYNC)) {
+ if ((retval = msync((caddr_t)start, size, MS_SYNC))) {
return (retval);
}
recsize = sizeof (kdb_ent_header_t) + upd_size;
if (recsize > ulog->kdb_block) {
- if (retval = ulog_resize(ulog, ulogentries, ulogfd, recsize)) {
- /* Resize element array failed */
- return (retval);
- }
+ if ((retval = ulog_resize(ulog, ulogentries, ulogfd, recsize))) {
+ /* Resize element array failed */
+ return (retval);
+ }
}
cur_sno = ulog->kdb_last_sno;
if (!xdr_kdb_incr_update_t(&xdrs, upd))
return (KRB5_LOG_CONV);
- if (retval = ulog_sync_update(ulog, indx_log))
+ if ((retval = ulog_sync_update(ulog, indx_log)))
return (retval);
if (ulog->kdb_num < ulogentries)
ulog->kdb_state = KDB_STABLE;
- if (retval = ulog_sync_update(ulog, indx_log))
+ if ((retval = ulog_sync_update(ulog, indx_log)))
return (retval);
ulog_sync_header(ulog);
(upd->kdb_princ_name.utf8str_t_len + 1));
dbprincstr[upd->kdb_princ_name.utf8str_t_len] = 0;
- if (retval = krb5_parse_name(context, dbprincstr,
- &dbprinc)) {
+ if ((retval = krb5_parse_name(context, dbprincstr,
+ &dbprinc))) {
goto cleanup;
}
(void) memset(entry, 0, sizeof (krb5_db_entry));
- if (retval = ulog_conv_2dbentry(context, entry, upd, 1))
+ if ((retval = ulog_conv_2dbentry(context, entry, upd, 1)))
goto cleanup;
retval = krb5int_put_principal_no_log(context, entry,
{
XDR xdrs;
krb5_error_code retval = 0;
- int i;
+ unsigned int i;
kdb_ent_header_t *indx_log;
kdb_incr_update_t *upd = NULL;
kdb_incr_result_t *incr_ret = NULL;