From 1c30f947f416fdcb0c390aca784741c0bd10bda3 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 6 Dec 1999 21:57:03 +0000 Subject: merge from 1.1 branch git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11952 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/ksu/ccache.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/clients/ksu/ccache.c') 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))){ -- cgit