summaryrefslogtreecommitdiffstats
path: root/src/clients/ksu/ccache.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>1999-12-06 21:57:03 +0000
committerKen Raeburn <raeburn@mit.edu>1999-12-06 21:57:03 +0000
commit1c30f947f416fdcb0c390aca784741c0bd10bda3 (patch)
tree4e0961306b0eb5a9ea3357bf5097c45b8e879ddd /src/clients/ksu/ccache.c
parent179535282c21bb601c99db6a4d2f873f58df91ce (diff)
downloadkrb5-1c30f947f416fdcb0c390aca784741c0bd10bda3.tar.gz
krb5-1c30f947f416fdcb0c390aca784741c0bd10bda3.tar.xz
krb5-1c30f947f416fdcb0c390aca784741c0bd10bda3.zip
merge from 1.1 branch
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11952 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/clients/ksu/ccache.c')
-rw-r--r--src/clients/ksu/ccache.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/clients/ksu/ccache.c b/src/clients/ksu/ccache.c
index 69975204e..be77456f5 100644
--- a/src/clients/ksu/ccache.c
+++ b/src/clients/ksu/ccache.c
@@ -64,7 +64,7 @@ krb5_creds ** cc_def_creds_arr = NULL;
krb5_creds ** cc_other_creds_arr = NULL;
struct stat st_temp;
- cc_other = (krb5_ccache *) calloc(1, sizeof (krb5_ccache));
+ cc_other = (krb5_ccache *) xcalloc(1, sizeof (krb5_ccache));
if ((retval = krb5_cc_resolve(context, cc_other_tag, cc_other))){
com_err (prog_name, retval, "resolving ccache %s",
@@ -381,6 +381,10 @@ krb5_get_login_princ(luser, princ_list)
if ((pwd = getpwnam(luser)) == NULL) {
return 0;
}
+ if (strlen(pwd->pw_dir) + sizeof("/.k5login") > MAXPATHLEN) {
+ fprintf (stderr, "home directory path for %s too long\n", luser);
+ exit (1);
+ }
(void) strcpy(pbuf, pwd->pw_dir);
(void) strcat(pbuf, "/.k5login");
@@ -655,7 +659,7 @@ krb5_creds ** cc_def_creds_arr = NULL;
krb5_creds ** cc_other_creds_arr = NULL;
struct stat st_temp;
- cc_other = (krb5_ccache *) calloc(1, sizeof (krb5_ccache));
+ cc_other = (krb5_ccache *) xcalloc(1, sizeof (krb5_ccache));
if ((retval = krb5_cc_resolve(context, cc_other_tag, cc_other))){
com_err (prog_name, retval, "resolving ccache %s",
@@ -734,7 +738,7 @@ struct stat st_temp;
if ( ! stat(cc_name, &st_temp)){
if (auth_debug) {
- fprintf(stderr,"puting cache %s through a filter for -z option\n", cc_name);
+ fprintf(stderr,"putting cache %s through a filter for -z option\n", cc_name);
}
if ((retval = krb5_get_nonexp_tkts(context, cc, &cc_creds_arr))){