From b7f20de6c8c9da72526349f797e0f3dd0a14095e Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 11 May 1990 16:44:32 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@850 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ktdefname.c | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/lib/krb5/os/ktdefname.c diff --git a/src/lib/krb5/os/ktdefname.c b/src/lib/krb5/os/ktdefname.c new file mode 100644 index 000000000..2b1974b43 --- /dev/null +++ b/src/lib/krb5/os/ktdefname.c @@ -0,0 +1,42 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * Return default keytab file name. + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_ktdefname_c[] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include +#include + +#include +#include + +#ifndef min +#define min(a,b) ((a) < (b) ? (a) : (b)) +#endif + +static char krb5_defkeyname[] = DEFAULT_KEYTAB_NAME; + +krb5_error_code +krb5_kt_default_name(name, namesize) +char *name; +int namesize; +{ + strncpy(name, krb5_defkeyname, min(namesize, sizeof(krb5_defkeyname))); + if (namesize < sizeof(krb5_defkeyname)) + return KRB5_CONFIG_NOTENUFSPACE; + else + return 0; +} + -- 2.26.2