]> granicus.if.org Git - linux-pam/commitdiff
pam_unix: fix build in --enable-selinux mode
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Oct 2012 18:13:07 +0000 (18:13 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Oct 2012 18:13:07 +0000 (18:13 +0000)
glibc's <sys/wait.h> starting with commit
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=glibc-2.15-231-gd94a467
does not include <sys/resource.h> for POSIX 2008 conformance reasons, so
when pam is being built with SELinux support enabled, pam_unix_passwd.c
uses getrlimit(2) and therefore should include <sys/resource.h> without
relying on other headers.

* modules/pam_unix/pam_unix_passwd.c: Include <sys/resource.h>.

Reported-by: Guido Trentalancia <guido@trentalancia.com>
Reported-by: "Jory A. Pratt" <anarchy@gentoo.org>
Reported-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
modules/pam_unix/pam_unix_passwd.c

index 9e1302d5db8efb0e280b64f8d2d47100884615a2..94bc3ec8a58b6ea05284a908f0766704d11641cf 100644 (file)
@@ -58,6 +58,7 @@
 #include <signal.h>
 #include <errno.h>
 #include <sys/wait.h>
+#include <sys/resource.h>
 
 #include <security/_pam_macros.h>