diff options
author | des <des@FreeBSD.org> | 2016-01-16 19:48:03 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2016-01-16 19:48:03 +0000 |
commit | 5e1cc08a89aa7ec23c6c934d6a6b41065bd9ac72 (patch) | |
tree | ab2cb7025b0de37c1541f8b01e92c19b5b1fb7c6 /contrib/openpam/lib | |
parent | dc5c74f3f12a6f57440056448e551a0f1c335299 (diff) | |
download | FreeBSD-src-5e1cc08a89aa7ec23c6c934d6a6b41065bd9ac72.zip FreeBSD-src-5e1cc08a89aa7ec23c6c934d6a6b41065bd9ac72.tar.gz |
MFH (r262530): fix is_upper() predicate (almost two years late...)
MFH (r271614): remove incorrect svn properties
MFH (r274145): cast-qual bugs in tests
MFH (r288070): restore correct module search path semantics
Also merge upstream r854, committed to head as part of r280031, which
fixes cast-qual bugs in libpam itself.
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r-- | contrib/openpam/lib/libpam/openpam_constants.c | 3 | ||||
-rw-r--r-- | contrib/openpam/lib/libpam/openpam_ctype.h | 10 | ||||
-rw-r--r-- | contrib/openpam/lib/libpam/openpam_dispatch.c | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/contrib/openpam/lib/libpam/openpam_constants.c b/contrib/openpam/lib/libpam/openpam_constants.c index 1cdd810..b718af9 100644 --- a/contrib/openpam/lib/libpam/openpam_constants.c +++ b/contrib/openpam/lib/libpam/openpam_constants.c @@ -137,6 +137,9 @@ const char *openpam_policy_path[] = { const char *openpam_module_path[] = { #ifdef OPENPAM_MODULES_DIRECTORY OPENPAM_MODULES_DIRECTORY, +#elif COMPAT_32BIT + "/usr/lib32", + "/usr/local/lib32", #else "/usr/lib", "/usr/local/lib", diff --git a/contrib/openpam/lib/libpam/openpam_ctype.h b/contrib/openpam/lib/libpam/openpam_ctype.h index 5c62185..d99d34b 100644 --- a/contrib/openpam/lib/libpam/openpam_ctype.h +++ b/contrib/openpam/lib/libpam/openpam_ctype.h @@ -39,10 +39,18 @@ (ch >= '0' && ch <= '9') /* + * Evaluates to non-zero if the argument is a hex digit. + */ +#define is_xdigit(ch) \ + ((ch >= '0' && ch <= '9') || \ + (ch >= 'a' && ch <= 'f') || \ + (ch >= 'A' && ch <= 'F')) + +/* * Evaluates to non-zero if the argument is an uppercase letter. */ #define is_upper(ch) \ - (ch >= 'A' && ch <= 'A') + (ch >= 'A' && ch <= 'Z') /* * Evaluates to non-zero if the argument is a lowercase letter. diff --git a/contrib/openpam/lib/libpam/openpam_dispatch.c b/contrib/openpam/lib/libpam/openpam_dispatch.c index 5fa068f..0cff631 100644 --- a/contrib/openpam/lib/libpam/openpam_dispatch.c +++ b/contrib/openpam/lib/libpam/openpam_dispatch.c @@ -117,7 +117,7 @@ openpam_dispatch(pam_handle_t *pamh, openpam_log(PAM_LOG_LIBDEBUG, "calling %s() in %s", pam_sm_func_name[primitive], chain->module->path); r = (chain->module->func[primitive])(pamh, flags, - chain->optc, (const char **)chain->optv); + chain->optc, (const char **)(intptr_t)chain->optv); pamh->current = NULL; openpam_log(PAM_LOG_LIBDEBUG, "%s: %s(): %s", chain->module->path, pam_sm_func_name[primitive], |