git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c06a31d
)
Remove a PATH_MAX.
author
Jeremy Allison
<jra@samba.org>
Wed, 1 Jun 2011 23:07:24 +0000
(16:07 -0700)
committer
Jeremy Allison
<jra@samba.org>
Wed, 1 Jun 2011 23:07:42 +0000
(16:07 -0700)
nsswitch/pam_winbind.c
patch
|
blob
|
history
diff --git
a/nsswitch/pam_winbind.c
b/nsswitch/pam_winbind.c
index f7637e7ea70fca21e6351566d2a72677ed43d063..7d5b70e1bdf56f80217a74008595b4ced6c71c6b 100644
(file)
--- 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)
{
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;
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);
_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;
}
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));
}
"failed to set KRB5CCNAME to %s: %s",
var, pam_strerror(ctx->pamh, ret));
}
+ free(var);
}
/**
}
/**