summaryrefslogtreecommitdiff
path: root/modules/pam_ftp/pam_ftp.c
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2007-03-29 13:45:38 +0000
committerTomas Mraz <tm@t8m.info>2007-03-29 13:45:38 +0000
commite2546c9b5832a738be84e5882c1804ff3b05c569 (patch)
treefcb49336e9f0b23ca9e5cfb3c011c3a5ad33d793 /modules/pam_ftp/pam_ftp.c
parenta1063929e59148c38b8caefa1e8c6097385dc9a4 (diff)
Relevant BUGIDs:
Purpose of commit: cleanup Commit summary: --------------- 2007-03-29 Tomas Mraz <t8m@centrum.cz> * modules/pam_access/pam_access.c (login_access, list_match): Replace strtok with strtok_r. * modules/pam_cracklib/pam_cracklib.c (check_old_password): Likewise. * modules/pam_ftp/pam_ftp.c (lookup, pam_authenticate): Likewise. * modules/pam_unix/pam_unix_passwd.c (check_old_password, save_old_password): Likewise.
Diffstat (limited to 'modules/pam_ftp/pam_ftp.c')
-rw-r--r--modules/pam_ftp/pam_ftp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c
index 4f4231c2..11cdf590 100644
--- a/modules/pam_ftp/pam_ftp.c
+++ b/modules/pam_ftp/pam_ftp.c
@@ -79,10 +79,11 @@ static int lookup(const char *name, const char *list, const char **_user)
if (list && *list) {
const char *l;
char *list_copy, *x;
+ char *sptr;
list_copy = x_strdup(list);
x = list_copy;
- while (list_copy && (l = strtok(x, ","))) {
+ while (list_copy && (l = strtok_r(x, ",", &sptr))) {
x = NULL;
if (!strcmp(name, l)) {
*_user = list;
@@ -170,11 +171,12 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
/* XXX: Some effort should be made to verify this email address! */
if (!(ctrl & PAM_IGNORE_EMAIL)) {
- token = strtok(resp, "@");
+ char *sptr;
+ token = strtok_r(resp, "@", &sptr);
retval = pam_set_item(pamh, PAM_RUSER, token);
if ((token) && (retval == PAM_SUCCESS)) {
- token = strtok(NULL, "@");
+ token = strtok_r(NULL, "@", &sptr);
retval = pam_set_item(pamh, PAM_RHOST, token);
}
}