From: John Kohl Date: Fri, 11 May 1990 16:44:32 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: krb5-1.0-alpha2~555 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b7f20de6c8c9da72526349f797e0f3dd0a14095e;p=krb5.git *** empty log message *** git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@850 dc483132-0cff-0310-8789-dd5450dbe970 --- 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; +} +