selinux: Build policy on systems not supporting DCCP protocol

Commit 3895fbbe0c ("selinux: Add support
for portcon dccp protocol") added support for the (portcon dccp ..)
statement. This fix will allow policy to be built on platforms
(see [1]) that do not have DCCP support by defining the IANA
assigned IP Protocol Number 33 to IPPROTO_DCCP.

[1] https://android-review.googlesource.com/#/c/219568/

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
This commit is contained in:
Richard Haines 2016-04-24 10:34:47 +01:00 committed by Stephen Smalley
parent 6327d62fd0
commit aac9360581
5 changed files with 15 additions and 0 deletions

View File

@ -64,6 +64,9 @@
#include <sys/stat.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef IPPROTO_DCCP
#define IPPROTO_DCCP 33
#endif
#include <arpa/inet.h>
#include <fcntl.h>
#include <stdio.h>

View File

@ -36,6 +36,9 @@
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef IPPROTO_DCCP
#define IPPROTO_DCCP 33
#endif
#include <arpa/inet.h>
#include <stdlib.h>
#include <limits.h>

View File

@ -31,6 +31,9 @@
#include <stdio.h>
#include <assert.h>
#include <netinet/in.h>
#ifndef IPPROTO_DCCP
#define IPPROTO_DCCP 33
#endif
#include <sepol/policydb/policydb.h>
#include <sepol/policydb/polcaps.h>

View File

@ -26,6 +26,9 @@
#include <getopt.h>
#include <libgen.h>
#include <netinet/in.h>
#ifndef IPPROTO_DCCP
#define IPPROTO_DCCP 33
#endif
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>

View File

@ -1,4 +1,7 @@
#include <netinet/in.h>
#ifndef IPPROTO_DCCP
#define IPPROTO_DCCP 33
#endif
#include <stdlib.h>
#include "debug.h"