From 388bba05cf2bf3674831409d781a65c1f90292fa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 1 Jun 2011 16:07:24 -0700 Subject: Remove a PATH_MAX. --- nsswitch/pam_winbind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nsswitch') diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index f7637e7ea7..7d5b70e1bd 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -1212,7 +1212,7 @@ out: static void _pam_setup_krb5_env(struct pwb_context *ctx, struct wbcLogonUserInfo *info) { - char var[PATH_MAX]; + char *var = NULL; int ret; uint32_t i; const char *krb5ccname = NULL; @@ -1239,7 +1239,7 @@ static void _pam_setup_krb5_env(struct pwb_context *ctx, _pam_log_debug(ctx, LOG_DEBUG, "request returned KRB5CCNAME: %s", krb5ccname); - if (snprintf(var, sizeof(var), "KRB5CCNAME=%s", krb5ccname) == -1) { + if (asprintf(&var, "KRB5CCNAME=%s", krb5ccname) == -1) { return; } @@ -1249,6 +1249,7 @@ static void _pam_setup_krb5_env(struct pwb_context *ctx, "failed to set KRB5CCNAME to %s: %s", var, pam_strerror(ctx->pamh, ret)); } + free(var); } /** -- cgit