/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* lib/krb5/os/ccdefname.c
*
* Copyright 1990 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.
*
*
* Return default cred. cache name.
*/
/*
* SUNW14resync - because of changes specific to Solaris, future
* resyncs should leave this file "as is" if possible.
*/
#include <k5-int.h>
#include <stdio.h>
/*
* Solaris kerberos: use dirent.h to get maximum filename length MAXNAMLEN
*/
#include <dirent.h>
char *name_buf,
int name_size)
{
/*
* Solaris Kerberos
* Use krb5_getuid() to select the mechanism to obtain the uid.
*/
krb5_getuid());
if (retval < 0)
return retval;
else
return 0;
}
/*ARGSUSED*/
const char *name)
{
int name_length;
return KV5M_CONTEXT;
/*
* Solaris kerberos:
* Use the following in this order
* 1) name from arg
* 2) name from environment variable
* 3) name from os based on UID
* resulting string is pointed to by name
*/
if (!name) {
/* use environment variable or default */
if (new_name != 0) { /* so that it is in env variable */
} else {
if (retval)
return retval;
}
}
"bad file size %d\n", name_length);
return -1;
}
if (!new_name)
return ENOMEM;
if (os_ctx->default_ccname)
return 0;
}
const char * KRB5_CALLCONV
{
return NULL;
/*
* Solaris kerberos: this is a bug fix for service principals.
* We need to always fetch the ccache name.
*/
return(os_ctx->default_ccname);
}