krb5_ccache.c revision 45aeb924ec3ac448bb8d174a5cc061ed98b147c7
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen Kerberos 5 Backend Module -- ccache related utilities
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen Sumit Bose <sbose@redhat.com>
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen Jakub Hrozek <jhrozek@redhat.com>
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen Copyright (C) 2014 Red Hat
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen This program is free software; you can redistribute it and/or modify
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen it under the terms of the GNU General Public License as published by
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen the Free Software Foundation; either version 3 of the License, or
along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef HAVE_KRB5_KRB5_H
#include <krb5.h>
#include "providers/krb5/krb5_ccache.h"
#include "util/sss_krb5.h"
static errno_t
0, 0, NULL, 0);
if (ret == 0) {
return EINVAL;
return EOK;
return EFAULT;
struct string_list {
const char *ccdirname,
char *end;
return EINVAL;
return EOK;
return ret;
return ENOMEM;
return ENOMEM;
return ENOMEM;
goto done;
done:
return ret;
return EINVAL;
return EINVAL;
return EINVAL;
return EOK;
return ENOMEM;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
done:
return ret;
const char *filename;
char *ccdirname;
char *end;
return EOK;
goto done;
goto done;
done:
return ret;
struct sss_krb5_ccache {
const char *ccname,
if (!cc) {
return ENOMEM;
if (ret) {
goto done;
if (kerr) {
goto done;
goto done;
} else if (kerr != 0) {
goto done;
done:
if (ret) {
return ret;
if (kerr) {
return ret;
return ENOMEM;
if (ret) {
goto done;
done:
return ret;
const char *cc_type;
return ENOMEM;
if (ret) {
goto done;
if (kerr != 0) {
goto done;
if (kerr != 0) {
if (ccprinc) {
goto done;
#ifdef HAVE_KRB5_CC_COLLECTION
if (kerr != 0) {
if (kerr == 0) {
goto done;
done:
if (cc) {
return ret;
const char *filename;
int ret;
return EOK;
return EOK;
char *tgt_name;
if (ret) {
return ret;
return ENOMEM;
if (ret) {
goto done;
if (!tgt_name) {
goto done;
if (kerr) {
goto done;
if (kerr) {
goto done;
if (kerr) {
done:
return ret;
char *server_name;
const char *realm_name;
int realm_length;
if (kerr != 0) {
goto done;
if (kerr != 0) {
goto done;
goto done;
if (kerr != 0) {
goto done;
if (kerr != 0) {
goto done;
if (kerr != 0) {
goto done;
if (kerr != 0) {
goto done;
kerr = 0;
done:
if (kerr != 0) {
return EIO;
return EOK;
const char *new_ccache,
return EOK;