summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-06-01 16:07:24 -0700
committerJeremy Allison <jra@samba.org>2011-06-01 16:07:42 -0700
commit388bba05cf2bf3674831409d781a65c1f90292fa (patch)
tree715ac86c5ec3a8091d8f5a27d99ff21519b740ea /nsswitch
parentc06a31dd65900f183e880cb5d135584aecbcc479 (diff)
downloadsamba-388bba05cf2bf3674831409d781a65c1f90292fa.tar.gz
samba-388bba05cf2bf3674831409d781a65c1f90292fa.tar.bz2
samba-388bba05cf2bf3674831409d781a65c1f90292fa.zip
Remove a PATH_MAX.
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/pam_winbind.c5
1 files changed, 3 insertions, 2 deletions
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);
}
/**