Skip to contentSkip to conversation

linux-pam: fix missing includes

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages May 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-pam: fix missing includes

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

Two patches taken from upstream fix e.g.
http://autobuild.buildroot.org/results/fa31431066ce0f9c554bdb923e59aa0458508224

These patches are in linux-pam 1.1.6 already, but since I don't know how to test it, I don't want to do a version bump.

---
 ...iables-are-no-longer-defined-unless-you-e.patch | 28 ++++++++++++++++
 ...pam_unix-fix-build-in-enable-selinux-mode.patch | 37 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 package/linux-pam/linux-pam-RLIMIT_-variables-are-no-longer-defined-unless-you-e.patch
 create mode 100644 package/linux-pam/linux-pam-pam_unix-fix-build-in-enable-selinux-mode.patch
package/linux-pam/linux-pam-RLIMIT_-variables-are-no-longer-defined-unless-you-e.patch new file +28 -0
new file mode 100644
index 0000000..a73ada6
@@ -0,0 +1,28 @@
+Date: Mon, 9 Jul 2012 09:43:11 +0200
+Subject: [PATCH] RLIMIT_* variables are no longer defined unless you
+ explicitly include sys/resource.h.
+
+Signed-off-by: Diego Elio Petten? <[email protected]>
+
+modules/pam_unix/pam_unix_acct.c: Include sys/resource.h.
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
+[This patch is in linux-pam 1.1.6]
+---
+ modules/pam_unix/pam_unix_acct.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
+index 8e90cc9..4a362f8 100644
+--- a/modules/pam_unix/pam_unix_acct.c
++++ b/modules/pam_unix/pam_unix_acct.c
+@@ -41,6 +41,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <sys/resource.h>
+ #include <syslog.h>
+ #include <pwd.h>
+ #include <shadow.h>
+-- 
+1.8.2.1
+
package/linux-pam/linux-pam-pam_unix-fix-build-in-enable-selinux-mode.patch new file +37 -0
new file mode 100644
index 0000000..550e02e
@@ -0,0 +1,37 @@
+From: "Dmitry V. Levin" <[email protected]>
+Date: Wed, 10 Oct 2012 18:13:07 +0000
+Subject: [PATCH] pam_unix: fix build in --enable-selinux mode
+
+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 <[email protected]>
+Reported-by: "Jory A. Pratt" <[email protected]>
+Reported-by: Diego Elio Petten? <[email protected]>
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
+[This patch is in linux-pam 1.1.6]
+---
+ modules/pam_unix/pam_unix_passwd.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+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>
+ 
+-- 
+1.8.2.1
+
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 linux-pam: fix missing includes

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> Arnout> Two patches taken from upstream fix e.g.
Arnout> http://autobuild.buildroot.org/results/fa31431066ce0f9c554bdb923e59aa0458508224

Arnout> These patches are in linux-pam 1.1.6 already, but since I don't know Arnout> how to test it, I don't want to do a version bump.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard