diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2023-12-06 19:50:35 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-12-06 18:52:00 +0000 |
commit | 982dab88350732b60eb54a91b76927b0b044ab9d (patch) | |
tree | 7ad6e3cceb18e0c1a6205b94682f35b0caf18180 /libpam | |
parent | be9f2fce28c75e8b700c56c37c7e4c2386f726ec (diff) | |
download | pam-982dab88350732b60eb54a91b76927b0b044ab9d.tar.gz pam-982dab88350732b60eb54a91b76927b0b044ab9d.tar.bz2 pam-982dab88350732b60eb54a91b76927b0b044ab9d.zip |
libpam: rename _pam_StrTok to _pam_tokenize
The _pam_StrTok function resembles strtok_r instead of strtok. For
upcoming changes the naming should not relate to strtok anymore.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'libpam')
-rw-r--r-- | libpam/pam_handlers.c | 8 | ||||
-rw-r--r-- | libpam/pam_misc.c | 4 | ||||
-rw-r--r-- | libpam/pam_private.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c index bb6268b3..860a1abf 100644 --- a/libpam/pam_handlers.c +++ b/libpam/pam_handlers.c @@ -85,7 +85,7 @@ static int _pam_parse_conf_file(pam_handle_t *pamh, FILE *f /* No service field: all lines are for the known service. */ this_service = known_service; } else { - this_service = tok = _pam_StrTok(buf, " \n\t", &nexttok); + this_service = tok = _pam_tokenize(buf, " \n\t", &nexttok); } #ifdef PAM_READ_BOTH_CONFS @@ -103,7 +103,7 @@ static int _pam_parse_conf_file(pam_handle_t *pamh, FILE *f /* This is a service we are looking for */ D(("Found PAM config entry for: %s", this_service)); - tok = _pam_StrTok(NULL, " \n\t", &nexttok); + tok = _pam_tokenize(NULL, " \n\t", &nexttok); if (tok == NULL) { /* module type does not exist */ D(("empty module type for %s", this_service)); @@ -150,7 +150,7 @@ static int _pam_parse_conf_file(pam_handle_t *pamh, FILE *f for (i=0; i<_PAM_RETURN_VALUES; actions[i++] = _PAM_ACTION_UNDEF); } - tok = _pam_StrTok(NULL, " \n\t", &nexttok); + tok = _pam_tokenize(NULL, " \n\t", &nexttok); if (tok == NULL) { /* no module name given */ D(("no control flag supplied")); @@ -195,7 +195,7 @@ static int _pam_parse_conf_file(pam_handle_t *pamh, FILE *f _pam_set_default_control(actions, _PAM_ACTION_BAD); } - tok = _pam_StrTok(NULL, " \n\t", &nexttok); + tok = _pam_tokenize(NULL, " \n\t", &nexttok); if (pam_include) { if (substack) { res = _pam_add_handler(pamh, PAM_HT_SUBSTACK, other, diff --git a/libpam/pam_misc.c b/libpam/pam_misc.c index 9588be17..8cf2214e 100644 --- a/libpam/pam_misc.c +++ b/libpam/pam_misc.c @@ -45,7 +45,7 @@ #include <syslog.h> #include <ctype.h> -char *_pam_StrTok(char *from, const char *format, char **next) +char *_pam_tokenize(char *from, const char *format, char **next) /* * this function is a variant of the standard strtok, it differs in that * it takes an additional argument and doesn't nul terminate tokens until @@ -198,7 +198,7 @@ int _pam_mkargv(const char *s, char ***argv, int *argc) argvbufp = (char *) argvbuf + (l * sizeof(char *)); D(("[%s]",sbuf)); - while ((sbuf = _pam_StrTok(sbuf, " \n\t", &tmp))) { + while ((sbuf = _pam_tokenize(sbuf, " \n\t", &tmp))) { D(("arg #%d",++count)); D(("->[%s]",sbuf)); strcpy(argvbufp, sbuf); diff --git a/libpam/pam_private.h b/libpam/pam_private.h index 576edcfb..1ddb7f9f 100644 --- a/libpam/pam_private.h +++ b/libpam/pam_private.h @@ -266,7 +266,7 @@ struct pam_data { void _pam_free_data(pam_handle_t *pamh, int status); -char *_pam_StrTok(char *from, const char *format, char **next); +char *_pam_tokenize(char *from, const char *format, char **next); char *_pam_strdup(const char *s); |