selinux: use kernel definition of PF_MAX in scripts
PATCH 1/1 selinux: use kernel definition of PF_MAX in scripts
From 1892b9ff8045bac6fe166802b2d8a8a3111c1e0c Mon Sep 17 00:00:00 2001
From: Johannes Brechtmann <[email protected]>
Date: Tue, 12 Mar 2019 17:50:12 +0100
Subject: [PATCH] selinux: use kernel definition of PF_MAX in scripts
Building selinux scripts of old releases on a current host fails with:
In file included from scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please update secclass_map.
Fix the issue by including linux/socket.h from kernel instead of sys/socket.h from host.
--- scripts/selinux/genheaders/genheaders.c | 2 +- scripts/selinux/mdp/mdp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/selinux/genheaders/genheaders.c +1 -1
@@ -9,7 +9,7 @@#include <string.h> #include <errno.h> #include <ctype.h> -#include <sys/socket.h> +#include <linux/socket.h> struct security_class_mapping {const char *name;
scripts/selinux/mdp/mdp.c +1 -1
@@ -32,7 +32,7 @@#include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/socket.h> +#include <linux/socket.h> static void usage (char *name) {
Signature · 1 line
2.21.0
Quoted 7 lines · Johannes Brechtmann
From
1892b9ff8045bac6fe166802b2d8a8a3111c1e0cMon Sep 17 00:00:00 2001
From: Johannes Brechtmann <[email protected]>
Date: Tue, 12 Mar 2019 17:50:12 +0100
Subject: [PATCH] selinux: use kernel definition ofPF_MAXin scriptsBuilding selinux scripts of old releases on a current host fails with:
Quoted 8 lines
In file included from
scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please updatesecclass_map.Fix the issue by including
linux/socket.hfrom kernel instead ofsys/socket.hfrom host.Signed-off-by Johannes Brechtmann <[email protected]>
Thanks, but already covered by
https://lore.kernel.org/selinux/[email protected]/
Quoted 32 lines
--- scripts/selinux/genheaders/genheaders.c | 2 +- scripts/selinux/mdp/mdp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)scripts/selinux/genheaders/genheaders.c +1
-1@@ -9,7 +9,7 @@#include <string.h> #include <errno.h> #include <ctype.h> -#include <sys/socket.h> +#include <linux/socket.h> struct security_class_mapping {const char *name;scripts/selinux/mdp/mdp.c +1
-1@@ -32,7 +32,7 @@#include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/socket.h> +#include <linux/socket.h> static void usage (char *name) {
Paul Moore
maintainerQuoted 12 lines · Stephen Smalley
Quoted 11 lines · Johannes Brechtmann
From
1892b9ff8045bac6fe166802b2d8a8a3111c1e0cMon Sep 17 00:00:00 2001
From: Johannes Brechtmann <[email protected]>
Date: Tue, 12 Mar 2019 17:50:12 +0100
Subject: [PATCH] selinux: use kernel definition ofPF_MAXin scriptsBuilding selinux scripts of old releases on a current host fails with:
In file included from
scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please updatesecclass_map.
Quoted 7 lines
Quoted 4 lines
Fix the issue by including
linux/socket.hfrom kernel instead ofsys/socket.hfrom host.Signed-off-by Johannes Brechtmann <[email protected]>Thanks, but already covered by
https://lore.kernel.org/selinux/[email protected]/
... and as of right now, the fix has been merged into selinux/next.
Signature · 2 lines
paul moore www.paul-moore.com