From: "Jory A. Pratt" anarchy@gentoo.org
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- modules/pam_unix/pam_unix_passwd.c | 1 + 1 file modificato, 1 inserzione(+)
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 9e1302d..b5f5ae9 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -46,6 +46,7 @@ #include <unistd.h> #include <errno.h> #include <sys/types.h> +#include <sys/resource.h> #include <pwd.h> #include <syslog.h> #include <shadow.h>
On Sun, Oct 07, 2012 at 11:44:34AM -0700, Diego Elio Pettenò wrote:
From: "Jory A. Pratt" anarchy@gentoo.org
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu
modules/pam_unix/pam_unix_passwd.c | 1 + 1 file modificato, 1 inserzione(+)
glibc's <sys/wait.h> starting with commit http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=glibc-2.15-231-gd94a46... does not include <sys/resource.h>.
When pam is being built with SELinux enabled, pam_unix_passwd.c uses getrlimit(2) and therefore should include <sys/resource.h> without relying on other headers.
Similar fix was made for pam_unix_acct.c by commit Linux-PAM-1_1_5-37-g8e508f2.
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 9e1302d..b5f5ae9 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -46,6 +46,7 @@ #include <unistd.h> #include <errno.h> #include <sys/types.h> +#include <sys/resource.h> #include <pwd.h> #include <syslog.h> #include <shadow.h>
I think it's OK to install this patch with a proper commit message.
glibc's <sys/wait.h> starting with commit http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=glibc-2.15-231-gd94a46... 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 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 9e1302d..94bc3ec 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -58,6 +58,7 @@ #include <signal.h> #include <errno.h> #include <sys/wait.h> +#include <sys/resource.h>
#include <security/_pam_macros.h>
On Wed, 2012-10-10 at 22:28 +0400, Dmitry V. Levin wrote:
glibc's <sys/wait.h> starting with commit http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=glibc-2.15-231-gd94a46... 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.
Obviously OK, please commit.
pam-developers@lists.fedorahosted.org