summaryrefslogtreecommitdiff
path: root/kerberosIV/kadm/kadm_supp.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1997-12-01 04:47:01 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1997-12-01 04:47:01 +0000
commit3bcbf38101d656808bda3c5494982b40108eabb0 (patch)
tree1e6ec63561ce4885e74716b3aea09db79913ea32 /kerberosIV/kadm/kadm_supp.c
parent6a80c92a21d463b9cbde2b09b808d286f9fdde82 (diff)
Another minimal upgrade to kth-krb4-0.9.7.
Diffstat (limited to 'kerberosIV/kadm/kadm_supp.c')
-rw-r--r--kerberosIV/kadm/kadm_supp.c79
1 files changed, 32 insertions, 47 deletions
diff --git a/kerberosIV/kadm/kadm_supp.c b/kerberosIV/kadm/kadm_supp.c
index 8882b06d422..4a771ff5fca 100644
--- a/kerberosIV/kadm/kadm_supp.c
+++ b/kerberosIV/kadm/kadm_supp.c
@@ -1,24 +1,25 @@
-/* $Id: kadm_supp.c,v 1.1 1995/12/14 06:52:46 tholo Exp $ */
+/* $KTH: kadm_supp.c,v 1.8 1997/05/02 10:27:58 joda Exp $ */
-/*-
- * Copyright (C) 1989 by the Massachusetts Institute of Technology
- *
- * Export of this software from the United States of America is assumed
- * to 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. 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.
- */
+/*
+ Copyright (C) 1989 by the Massachusetts Institute of Technology
+
+ Export of this software from the United States of America is assumed
+ to 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. 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.
+
+ */
/*
* Support functions for Kerberos administration server & clients
@@ -34,52 +35,39 @@
structure
*/
-#include "kadm_local.h"
+#include "kadm_locl.h"
/*
prin_vals:
recieves : a vals structure
*/
void
-prin_vals(vals)
- Kadm_vals *vals;
+prin_vals(Kadm_vals *vals)
{
printf("Info in Database for %s.%s:\n", vals->name, vals->instance);
printf(" Max Life: %d (%s) Exp Date: %s\n",
vals->max_life,
krb_life_to_atime(vals->max_life),
asctime(k_localtime(&vals->exp_date)));
- printf(" Attribs: %.2x key: %lu %lu\n",
+ printf(" Attribs: %.2x key: %#lx %#lx\n",
vals->attributes,
(long)vals->key_low, (long)vals->key_high);
}
-#ifdef notdef
-nierror(s)
-int s;
-{
- printf("Kerberos admin server loses..... %s\n",error_message(s));
- return(s);
-}
-#endif
-
/* kadm_prin_to_vals takes a fields arguments, a Kadm_vals and a Principal,
it copies the fields in Principal specified by fields into Kadm_vals,
i.e from old to new */
void
-kadm_prin_to_vals(fields, new, old)
- u_char *fields;
- Kadm_vals *new;
- Principal *old;
+kadm_prin_to_vals(u_char *fields, Kadm_vals *new, Principal *old)
{
- bzero((char *)new, sizeof(*new));
+ memset(new, 0, sizeof(*new));
if (IS_FIELD(KADM_NAME,fields)) {
- (void) strncpy(new->name, old->name, ANAME_SZ);
+ strncpy(new->name, old->name, ANAME_SZ);
SET_FIELD(KADM_NAME, new->fields);
}
if (IS_FIELD(KADM_INST,fields)) {
- (void) strncpy(new->instance, old->instance, INST_SZ);
+ strncpy(new->instance, old->instance, INST_SZ);
SET_FIELD(KADM_INST, new->fields);
}
if (IS_FIELD(KADM_EXPDATE,fields)) {
@@ -102,17 +90,14 @@ kadm_prin_to_vals(fields, new, old)
}
void
-kadm_vals_to_prin(fields, new, old)
- u_char *fields;
- Principal *new;
- Kadm_vals *old;
+kadm_vals_to_prin(u_char *fields, Principal *new, Kadm_vals *old)
{
- bzero((char *)new, sizeof(*new));
+ memset(new, 0, sizeof(*new));
if (IS_FIELD(KADM_NAME,fields))
- (void) strncpy(new->name, old->name, ANAME_SZ);
+ strncpy(new->name, old->name, ANAME_SZ);
if (IS_FIELD(KADM_INST,fields))
- (void) strncpy(new->instance, old->instance, INST_SZ);
+ strncpy(new->instance, old->instance, INST_SZ);
if (IS_FIELD(KADM_EXPDATE,fields))
new->exp_date = old->exp_date;
if (IS_FIELD(KADM_ATTR,fields))