diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | modules/pam_namespace/pam_namespace.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2006-10-24 Thorsten Kukuk <kukuk@thkukuk.de> + * modules/pam_namespace/pam_namespace.c: Reserve space for + trailing zero. + +2006-10-24 Thorsten Kukuk <kukuk@thkukuk.de> + * modules/pam_unix/support.c (_unix_verify_password): Try system crypt() if we don't know the hash alogorithm. * modules/pam_unix/unix_chkpwd.c (_unix_verify_password): Likewise. diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c index 6bcd0916..e4e4a5d8 100644 --- a/modules/pam_namespace/pam_namespace.c +++ b/modules/pam_namespace/pam_namespace.c @@ -1206,7 +1206,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED, * Add the user info to the instance data so we can refer to them later. */ idata.user[0] = 0; - strncat(idata.user, user_name, sizeof(idata.user)); + strncat(idata.user, user_name, sizeof(idata.user) - 1); idata.uid = pwd->pw_uid; /* @@ -1290,7 +1290,7 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED, * Add the user info to the instance data so we can refer to them later. */ idata.user[0] = 0; - strncat(idata.user, user_name, sizeof(idata.user)); + strncat(idata.user, user_name, sizeof(idata.user) - 1); idata.uid = pwd->pw_uid; /* |