buf gixes

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@309 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-03-18 00:16:45 +00:00
parent 538b7cf6e5
commit 289e276d49
2 changed files with 12 additions and 12 deletions

12
cache.c
View File

@@ -9,7 +9,7 @@ krb5_cc_resolve(krb5_context context,
krb5_ccache p; krb5_ccache p;
krb5_fcache *f; krb5_fcache *f;
if(strncpy(residual, "FILE:", 5)){ if(strncmp(residual, "FILE:", 5)){
return -1; return -1;
} }
@@ -375,8 +375,7 @@ krb5_error_code
krb5_cc_close(krb5_context context, krb5_cc_close(krb5_context context,
krb5_ccache id) krb5_ccache id)
{ {
free(id->data.data); krb5_data_free (&id->data);
free(id->data);
free(id); free(id);
return 0; return 0;
} }
@@ -387,10 +386,11 @@ krb5_cc_store_cred(krb5_context context,
krb5_creds *creds) krb5_creds *creds)
{ {
int fd; int fd;
char *f; krb5_fcache *f;
f = (char*)id->data.data; f = (krb5_fcache *)id->data.data;
fd = open(f, O_WRONLY | O_APPEND);
fd = open(f->filename, O_WRONLY | O_APPEND);
if(fd < 0) if(fd < 0)
return errno; return errno;
store_principal(fd, creds->client); store_principal(fd, creds->client);

View File

@@ -9,7 +9,7 @@ krb5_cc_resolve(krb5_context context,
krb5_ccache p; krb5_ccache p;
krb5_fcache *f; krb5_fcache *f;
if(strncpy(residual, "FILE:", 5)){ if(strncmp(residual, "FILE:", 5)){
return -1; return -1;
} }
@@ -375,8 +375,7 @@ krb5_error_code
krb5_cc_close(krb5_context context, krb5_cc_close(krb5_context context,
krb5_ccache id) krb5_ccache id)
{ {
free(id->data.data); krb5_data_free (&id->data);
free(id->data);
free(id); free(id);
return 0; return 0;
} }
@@ -387,10 +386,11 @@ krb5_cc_store_cred(krb5_context context,
krb5_creds *creds) krb5_creds *creds)
{ {
int fd; int fd;
char *f; krb5_fcache *f;
f = (char*)id->data.data; f = (krb5_fcache *)id->data.data;
fd = open(f, O_WRONLY | O_APPEND);
fd = open(f->filename, O_WRONLY | O_APPEND);
if(fd < 0) if(fd < 0)
return errno; return errno;
store_principal(fd, creds->client); store_principal(fd, creds->client);