summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2013-08-27 15:50:26 +0000
committerwill <will@FreeBSD.org>2013-08-27 15:50:26 +0000
commit7c6cb741cf1bbc1e6c4eca2bd651b938d4fed6c0 (patch)
treec47552be69a385e8d653c6234013d08f70466f46 /lib
parent3cb1daa96e571ed827820b4d87f32f1145ff53c1 (diff)
downloadFreeBSD-src-7c6cb741cf1bbc1e6c4eca2bd651b938d4fed6c0.zip
FreeBSD-src-7c6cb741cf1bbc1e6c4eca2bd651b938d4fed6c0.tar.gz
Make the PAM password strength checking module WARNS=2 safe.
lib/libpam/modules/pam_passwdqc/Makefile: Bump WARNS to 2. contrib/pam_modules/pam_passwdqc/pam_passwdqc.c: Bump _XOPEN_SOURCE and _XOPEN_VERSION from 500 to 600 so that vsnprint() is declared. Use the two new union types (pam_conv_item_t and pam_text_item_t) to resolve strict aliasing violations caused by casts to comply with the pam_get_item() API taking a "const void **" for all item types. Warnings are generated for casts that create "type puns" (pointers of conflicting sized types that are set to access the same memory location) since these pointers may be used in ways that violate C's strict aliasing rules. Casts to a new type must be performed through a union in order to be compliant, and access must be performed through only one of the union's data types during the lifetime of the union instance. Handle strict-aliasing warnings through pointer assignments, which drastically simplifies this change. Correct a CLANG "printf-like function with more arguments than format" error. Submitted by: gibbs Sponsored by: Spectra Logic
Diffstat (limited to 'lib')
-rw-r--r--lib/libpam/modules/pam_passwdqc/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpam/modules/pam_passwdqc/Makefile b/lib/libpam/modules/pam_passwdqc/Makefile
index 905afe1..c9cc30e 100644
--- a/lib/libpam/modules/pam_passwdqc/Makefile
+++ b/lib/libpam/modules/pam_passwdqc/Makefile
@@ -7,7 +7,7 @@ LIB= pam_passwdqc
SRCS= pam_passwdqc.c passwdqc_check.c passwdqc_random.c wordset_4k.c
MAN= pam_passwdqc.8
-WARNS?= 0
+WARNS?= 2
CFLAGS+= -I${SRCDIR}
DPADD= ${LIBCRYPT}
OpenPOWER on IntegriCloud