summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-01 16:32:44 +0200
committerVolker Lendecke <vl@samba.org>2010-04-01 16:34:01 +0200
commit3475c61179b87fa5c48ffe24c2793137ad04c318 (patch)
treea743505bf895cb841bf1d1180c725f96ebd64581
parentc63440e040798722288a530a64e59d19344c63ee (diff)
downloadsamba-3475c61179b87fa5c48ffe24c2793137ad04c318.tar.gz
samba-3475c61179b87fa5c48ffe24c2793137ad04c318.tar.bz2
samba-3475c61179b87fa5c48ffe24c2793137ad04c318.zip
s3: Ensure NULL termination before printing in winbindd_pam_logoff
-rw-r--r--source3/winbindd/winbindd_pam.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index d660102655..d4dc5e58b9 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -2224,9 +2224,6 @@ void winbindd_pam_logoff(struct winbindd_cli_state *state)
uid_t caller_uid = (uid_t)-1;
uid_t request_uid = state->request->data.logoff.uid;
- DEBUG(3, ("[%5lu]: pam logoff %s\n", (unsigned long)state->pid,
- state->request->data.logoff.user));
-
/* Ensure null termination */
state->request->data.logoff.user
[sizeof(state->request->data.logoff.user)-1]='\0';
@@ -2234,6 +2231,9 @@ void winbindd_pam_logoff(struct winbindd_cli_state *state)
state->request->data.logoff.krb5ccname
[sizeof(state->request->data.logoff.krb5ccname)-1]='\0';
+ DEBUG(3, ("[%5lu]: pam logoff %s\n", (unsigned long)state->pid,
+ state->request->data.logoff.user));
+
if (request_uid == (uid_t)-1) {
goto failed;
}