xref: /onnv-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/keytab/ktdefault.c (revision 7934:6aeeafc994de)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * lib/krb5/keytab/ktdefault.c
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * Copyright 1990 by the Massachusetts Institute of Technology.
50Sstevel@tonic-gate  * All Rights Reserved.
60Sstevel@tonic-gate  *
70Sstevel@tonic-gate  * Export of this software from the United States of America may
80Sstevel@tonic-gate  *   require a specific license from the United States Government.
90Sstevel@tonic-gate  *   It is the responsibility of any person or organization contemplating
100Sstevel@tonic-gate  *   export to obtain such a license before exporting.
11781Sgtb  *
120Sstevel@tonic-gate  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
130Sstevel@tonic-gate  * distribute this software and its documentation for any purpose and
140Sstevel@tonic-gate  * without fee is hereby granted, provided that the above copyright
150Sstevel@tonic-gate  * notice appear in all copies and that both that copyright notice and
160Sstevel@tonic-gate  * this permission notice appear in supporting documentation, and that
170Sstevel@tonic-gate  * the name of M.I.T. not be used in advertising or publicity pertaining
180Sstevel@tonic-gate  * to distribution of the software without specific, written prior
190Sstevel@tonic-gate  * permission.  Furthermore if you modify this software you must label
200Sstevel@tonic-gate  * your software as modified software and not distribute it in such a
210Sstevel@tonic-gate  * fashion that it might be confused with the original M.I.T. software.
220Sstevel@tonic-gate  * M.I.T. makes no representations about the suitability of
230Sstevel@tonic-gate  * this software for any purpose.  It is provided "as is" without express
240Sstevel@tonic-gate  * or implied warranty.
25*7934SMark.Phalan@Sun.COM  *
260Sstevel@tonic-gate  *
270Sstevel@tonic-gate  * Get a default keytab.
280Sstevel@tonic-gate  */
290Sstevel@tonic-gate 
30*7934SMark.Phalan@Sun.COM #include "k5-int.h"
310Sstevel@tonic-gate #include <stdio.h>
320Sstevel@tonic-gate 
33781Sgtb krb5_error_code KRB5_CALLCONV
krb5_kt_default(krb5_context context,krb5_keytab * id)34781Sgtb krb5_kt_default(krb5_context context, krb5_keytab *id)
350Sstevel@tonic-gate {
360Sstevel@tonic-gate     char defname[BUFSIZ];
370Sstevel@tonic-gate     krb5_error_code retval;
380Sstevel@tonic-gate 
390Sstevel@tonic-gate     if ((retval = krb5_kt_default_name(context, defname, sizeof(defname))))
400Sstevel@tonic-gate 	return retval;
410Sstevel@tonic-gate     return krb5_kt_resolve(context, defname, id);
420Sstevel@tonic-gate }
43781Sgtb 
44781Sgtb 
45781Sgtb 
46