958b6d4
Binary files nsalibselinux/debugsources.list and libselinux-1.20.1/debugsources.list differ
ae6f77c
diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-1.20.1/include/selinux/selinux.h
ae6f77c
--- nsalibselinux/include/selinux/selinux.h	2004-12-03 14:40:05.000000000 -0500
958b6d4
+++ libselinux-1.20.1/include/selinux/selinux.h	2005-01-12 10:13:25.000000000 -0500
ae6f77c
@@ -226,6 +226,7 @@
ae6f77c
 extern const char *selinux_media_context_path(void);
ae6f77c
 extern const char *selinux_contexts_path(void);
ae6f77c
 extern const char *selinux_booleans_path(void);
ae6f77c
+extern const char *selinux_customizable_types_path(void);
ae6f77c
 
ae6f77c
 /* Check a permission in the passwd class.
ae6f77c
    Return 0 if granted or -1 otherwise. */
ae6f77c
@@ -242,6 +243,10 @@
ae6f77c
 		       const char *filename, 
ae6f77c
 		       char *const argv[], char *const envp[]);
ae6f77c
 
ae6f77c
+/* Returns whether a file context is customizable, and should not 
ae6f77c
+   be relabeled . */
ae6f77c
+extern int is_context_customizable (security_context_t scontext);
ae6f77c
+
ae6f77c
 #ifdef __cplusplus
ae6f77c
 }
ae6f77c
 #endif
ae6f77c
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/is_context_customizable.3 libselinux-1.20.1/man/man3/is_context_customizable.3
ae6f77c
--- nsalibselinux/man/man3/is_context_customizable.3	1969-12-31 19:00:00.000000000 -0500
958b6d4
+++ libselinux-1.20.1/man/man3/is_context_customizable.3	2005-01-12 10:13:25.000000000 -0500
ae6f77c
@@ -0,0 +1,22 @@
ae6f77c
+.TH "is_context_customizable" "3" "10 January 2005" "dwalsh@redhat.com" "SELinux API documentation"
ae6f77c
+.SH "NAME"
ae6f77c
+is_context_customizable \- check whether context type is customizable by the administrator.
ae6f77c
+.SH "SYNOPSIS"
ae6f77c
+.B #include <selinux/selinux.h>
ae6f77c
+.sp
ae6f77c
+.B int is_context_customizable(security_context_t scon);
ae6f77c
+
ae6f77c
+.SH "DESCRIPTION"
ae6f77c
+.B is_context_customizable
ae6f77c
+.br
ae6f77c
+This function checks whether the type of scon is in the /etc/selinux/SELINUXTYPE/context/customizable_types file.  A customizable type is a file context type that
ae6f77c
+administrators set on files, usually to allow certain domains to share the file content. restorecon and setfiles, by default, leave these context in place.
ae6f77c
+
ae6f77c
+ 
ae6f77c
+.SH "RETURN VALUE"
ae6f77c
+returns 1 if security context is customizable or 0 if it is not. 
ae6f77c
+returns -1 on error
ae6f77c
+
ae6f77c
+.SH "FILE"
ae6f77c
+/etc/selinux/SELINUXTYPE/context/customizable_types
ae6f77c
+
958b6d4
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/security_load_booleans.3 libselinux-1.20.1/man/man3/security_load_booleans.3
958b6d4
--- nsalibselinux/man/man3/security_load_booleans.3	2004-11-30 15:59:02.000000000 -0500
958b6d4
+++ libselinux-1.20.1/man/man3/security_load_booleans.3	2005-01-18 17:24:31.326454550 -0500
958b6d4
@@ -1,10 +1,8 @@
958b6d4
 .TH "security_get_boolean_names" "3" "15 November 2004" "dwalsh@redhat.com" "SELinux API Documentation"
958b6d4
 .SH "NAME"
958b6d4
 security_load_booleans, security_set_boolean, security_commit_booleans, 
958b6d4
-security_get_boolean_names, security_get_boolean_active, security_get_boolean_pending 
958b6d4
-.sp
958b6d4
-routines for manipulating SELinux boolean values
958b6d4
-
958b6d4
+security_get_boolean_names, security_get_boolean_active,
958b6d4
+security_get_boolean_pending \- routines for manipulating SELinux boolean values
958b6d4
 .SH "SYNOPSIS"
958b6d4
 .B #include <selinux/selinux.h>
958b6d4
 .sp
958b6d4
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_binary_policy_path.3 libselinux-1.20.1/man/man3/selinux_binary_policy_path.3
958b6d4
--- nsalibselinux/man/man3/selinux_binary_policy_path.3	2004-11-30 15:59:02.000000000 -0500
958b6d4
+++ libselinux-1.20.1/man/man3/selinux_binary_policy_path.3	2005-01-18 17:24:31.344452529 -0500
958b6d4
@@ -1,8 +1,10 @@
958b6d4
 .TH "selinux_binary_policy_path" "3" "15 November 2004" "dwalsh@redhat.com" "SELinux API Documentation"
958b6d4
 .SH "NAME"
958b6d4
-selinux_policy_root, selinux_binary_policy_path, selinux_failsafe_context_path, selinux_removable_context_path, selinux_default_context_path, selinux_user_contexts_path, selinux_file_context_path, selinux_media_context_path, selinux_contexts_path, selinux_booleans_path
958b6d4
-.sp
958b6d4
-These functions return the paths to the active policy configuration
958b6d4
+selinux_policy_root, selinux_binary_policy_path,
958b6d4
+selinux_failsafe_context_path, selinux_removable_context_path,
958b6d4
+selinux_default_context_path, selinux_user_contexts_path,
958b6d4
+selinux_file_context_path, selinux_media_context_path,
958b6d4
+selinux_contexts_path, selinux_booleans_path \- These functions return the paths to the active policy configuration
958b6d4
 directories and files.
958b6d4
 
958b6d4
 .SH "SYNOPSIS"
ae6f77c
diff --exclude-from=exclude -N -u -r nsalibselinux/src/file_path_suffixes.h libselinux-1.20.1/src/file_path_suffixes.h
ae6f77c
--- nsalibselinux/src/file_path_suffixes.h	2004-10-20 16:31:36.000000000 -0400
958b6d4
+++ libselinux-1.20.1/src/file_path_suffixes.h	2005-01-12 10:13:25.000000000 -0500
ae6f77c
@@ -9,3 +9,4 @@
ae6f77c
 S_(BOOLEANS, "/booleans")
ae6f77c
 S_(MEDIA_CONTEXTS, "/contexts/files/media")
ae6f77c
 S_(REMOVABLE_CONTEXT, "/contexts/removable_context")
ae6f77c
+S_(CUSTOMIZABLE_TYPES, "/contexts/customizable_types")
ae6f77c
diff --exclude-from=exclude -N -u -r nsalibselinux/src/is_customizable_type.c libselinux-1.20.1/src/is_customizable_type.c
ae6f77c
--- nsalibselinux/src/is_customizable_type.c	1969-12-31 19:00:00.000000000 -0500
958b6d4
+++ libselinux-1.20.1/src/is_customizable_type.c	2005-01-12 10:13:25.000000000 -0500
ae6f77c
@@ -0,0 +1,68 @@
ae6f77c
+#include <unistd.h>
ae6f77c
+#include <errno.h>
ae6f77c
+#include <stdio.h>
ae6f77c
+#include <stdlib.h>
ae6f77c
+#include <string.h>
ae6f77c
+#include <ctype.h>
ae6f77c
+#include <pwd.h>
ae6f77c
+#include <selinux/selinux.h>
ae6f77c
+
ae6f77c
+static int get_customizable_type_list (security_context_t **retlist)
ae6f77c
+{
ae6f77c
+	FILE *fp;
ae6f77c
+	char buf[4097];
ae6f77c
+	int ctr=0, i;
ae6f77c
+	security_context_t *list=NULL;
ae6f77c
+
ae6f77c
+	fp = fopen(selinux_customizable_types_path(), "r");
ae6f77c
+	if (!fp)
ae6f77c
+		return -1;
ae6f77c
+
ae6f77c
+	while (fgets_unlocked(buf, 4096, fp)) {
ae6f77c
+		ctr++;
ae6f77c
+	}
ae6f77c
+	rewind(fp);
ae6f77c
+	if (ctr) {
ae6f77c
+		list=(security_context_t *) calloc(sizeof(security_context_t *), ctr+1);
ae6f77c
+		if (list) {
ae6f77c
+		  i=0;
ae6f77c
+		  while (fgets_unlocked(buf, 4096, fp)) {
ae6f77c
+		    buf[strlen(buf)-1]=0;
ae6f77c
+		    list[i++]=(security_context_t) strdup(buf);
ae6f77c
+		    if (i>ctr) { 
ae6f77c
+		      /* Should never happen */
ae6f77c
+		      free(list);
ae6f77c
+		      list=NULL;
ae6f77c
+		      break;
ae6f77c
+		    }
ae6f77c
+		  }
ae6f77c
+		}
ae6f77c
+	}
ae6f77c
+	fclose(fp);
ae6f77c
+	if (!list)
ae6f77c
+		return -1;
ae6f77c
+	*retlist=list;
ae6f77c
+	return 0;
ae6f77c
+}
ae6f77c
+
ae6f77c
+static security_context_t *customizable_list=NULL;
ae6f77c
+
ae6f77c
+int is_context_customizable (security_context_t scontext) {
ae6f77c
+  int i;
ae6f77c
+  char *ptr;
ae6f77c
+  if (! customizable_list) {
ae6f77c
+    if (get_customizable_type_list(&customizable_list)!=0) 
ae6f77c
+      return -1;
ae6f77c
+  }
ae6f77c
+  
ae6f77c
+  ptr=strrchr(scontext, ':');
ae6f77c
+  if (ptr) {
ae6f77c
+	  ptr++;
ae6f77c
+  } else {
ae6f77c
+	  ptr=scontext;
ae6f77c
+  }
ae6f77c
+  for (i = 0; customizable_list[i]; i++) {
ae6f77c
+    if (strcmp(customizable_list[i],ptr) == 0) return 1;
ae6f77c
+  }
ae6f77c
+  return 0;
ae6f77c
+}
958b6d4
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.20.1/src/matchpathcon.c
958b6d4
--- nsalibselinux/src/matchpathcon.c	2004-12-29 11:51:23.000000000 -0500
958b6d4
+++ libselinux-1.20.1/src/matchpathcon.c	2005-01-12 10:13:25.000000000 -0500
958b6d4
@@ -207,15 +207,135 @@
958b6d4
 	}
958b6d4
 	return;
958b6d4
 }
958b6d4
-
958b6d4
+static int process_line( const char *path, char *line_buf, int pass, int lineno) {
958b6d4
+	int items, len, regerr;
958b6d4
+	char *buf_p;
958b6d4
+	char *regex, *type, *context;
958b6d4
+	char *anchored_regex;
958b6d4
+	len = strlen(line_buf);
958b6d4
+	if (line_buf[len - 1] != '\n') {
958b6d4
+		myprintf("%s:  line %d is too long, would be truncated, skipping\n", path, lineno); 
958b6d4
+		return 0;
958b6d4
+	}
958b6d4
+	line_buf[len - 1] = 0;
958b6d4
+	buf_p = line_buf;
958b6d4
+	while (isspace(*buf_p))
958b6d4
+		buf_p++;
958b6d4
+	/* Skip comment lines and empty lines. */
958b6d4
+	if (*buf_p == '#' || *buf_p == 0)
958b6d4
+		return 0;
958b6d4
+	items =
958b6d4
+		sscanf(line_buf, "%as %as %as", &regex, &type,
958b6d4
+		       &context);
958b6d4
+	if (items < 2) {
958b6d4
+		myprintf("%s:  line %d is missing fields\n, skipping", path, lineno); 
958b6d4
+		return 0;
958b6d4
+	} else if (items == 2) {
958b6d4
+		/* The type field is optional. */
958b6d4
+		free(context);
958b6d4
+		context = type;
958b6d4
+		type = 0;
958b6d4
+	}
958b6d4
+	
958b6d4
+	if (pass == 1) {
958b6d4
+		/* On the second pass, compile and store the specification in spec. */
958b6d4
+		const char *reg_buf = regex;
958b6d4
+		char *cp;
958b6d4
+		spec_arr[nspec].stem_id = find_stem_from_spec(&reg_buf);
958b6d4
+		spec_arr[nspec].regex_str = regex;
958b6d4
+		
958b6d4
+		/* Anchor the regular expression. */
958b6d4
+		len = strlen(reg_buf);
958b6d4
+		cp = anchored_regex = malloc(len + 3);
958b6d4
+		if (!anchored_regex)
958b6d4
+			return -1;
958b6d4
+		/* Create ^...$ regexp.  */
958b6d4
+		*cp++ = '^';
958b6d4
+		cp = mempcpy(cp, reg_buf, len);
958b6d4
+		*cp++ = '$';
958b6d4
+		*cp = '\0';
958b6d4
+		
958b6d4
+		/* Compile the regular expression. */
958b6d4
+		regerr =
958b6d4
+			regcomp(&spec_arr[nspec].regex,
958b6d4
+				anchored_regex,
958b6d4
+				REG_EXTENDED | REG_NOSUB);
958b6d4
+		free(anchored_regex);
958b6d4
+		if (regerr < 0) {
958b6d4
+			myprintf("%s:  line %d has invalid regex %s\n", path, lineno, anchored_regex); 
958b6d4
+			return 0;
958b6d4
+		}
958b6d4
+		
958b6d4
+		/* Convert the type string to a mode format */
958b6d4
+		spec_arr[nspec].type_str = type;
958b6d4
+		spec_arr[nspec].mode = 0;
958b6d4
+		if (!type)
958b6d4
+			goto skip_type;
958b6d4
+		len = strlen(type);
958b6d4
+		if (type[0] != '-' || len != 2) {
958b6d4
+			myprintf("%s:  line %d has invalid file type %s\n", path, lineno, type); 
958b6d4
+			return 0;
958b6d4
+		}
958b6d4
+		switch (type[1]) {
958b6d4
+		case 'b':
958b6d4
+			spec_arr[nspec].mode = S_IFBLK;
958b6d4
+			break;
958b6d4
+		case 'c':
958b6d4
+			spec_arr[nspec].mode = S_IFCHR;
958b6d4
+			break;
958b6d4
+		case 'd':
958b6d4
+			spec_arr[nspec].mode = S_IFDIR;
958b6d4
+			break;
958b6d4
+		case 'p':
958b6d4
+			spec_arr[nspec].mode = S_IFIFO;
958b6d4
+			break;
958b6d4
+		case 'l':
958b6d4
+			spec_arr[nspec].mode = S_IFLNK;
958b6d4
+			break;
958b6d4
+		case 's':
958b6d4
+			spec_arr[nspec].mode = S_IFSOCK;
958b6d4
+			break;
958b6d4
+		case '-':
958b6d4
+			spec_arr[nspec].mode = S_IFREG;
958b6d4
+			break;
958b6d4
+		default:
958b6d4
+			myprintf("%s:  line %d has invalid file type %s\n", path, lineno, type); 
958b6d4
+			return 0;
958b6d4
+		}
958b6d4
+		
958b6d4
+	skip_type:
958b6d4
+		
958b6d4
+		spec_arr[nspec].context = context;
958b6d4
+		
958b6d4
+		if (strcmp(context, "<<none>>")) {
958b6d4
+			if (security_check_context(context) < 0 && errno != ENOENT) {
958b6d4
+				myprintf("%s:  line %d has invalid context %s\n", path, lineno, context); 
958b6d4
+				return 0;
958b6d4
+			}
958b6d4
+		}
958b6d4
+		
958b6d4
+		/* Determine if specification has 
958b6d4
+		 * any meta characters in the RE */
958b6d4
+		spec_hasMetaChars(&spec_arr[nspec]);
958b6d4
+	}
958b6d4
+	
958b6d4
+	nspec++;
958b6d4
+	if (pass == 0) {
958b6d4
+		free(regex);
958b6d4
+		if (type)
958b6d4
+			free(type);
958b6d4
+		free(context);
958b6d4
+	}
958b6d4
+	return 0;
958b6d4
+}
958b6d4
 static int matchpathcon_init(void)
958b6d4
 {
958b6d4
 	FILE *fp;
958b6d4
 	const char *path;
958b6d4
-	char line_buf[BUFSIZ + 1], *buf_p;
958b6d4
-	char *regex, *type, *context;
958b6d4
-	char *anchored_regex;
958b6d4
-	int items, len, lineno, pass, regerr, i, j;
958b6d4
+	FILE *localfp;
958b6d4
+	char local_path[PATH_MAX + 1];
958b6d4
+	char line_buf[BUFSIZ + 1];
958b6d4
+	int lineno, pass, i, j;
958b6d4
 	spec_t *spec_copy;
958b6d4
 
958b6d4
 	/* Open the specification file. */
958b6d4
@@ -223,6 +343,9 @@
958b6d4
 	if ((fp = fopen(path, "r")) == NULL)
958b6d4
 		return -1;
958b6d4
 
958b6d4
+	snprintf(local_path, sizeof(local_path), "%s.local", path);
958b6d4
+	localfp = fopen(local_path, "r");
958b6d4
+
958b6d4
 	/* 
958b6d4
 	 * Perform two passes over the specification file.
958b6d4
 	 * The first pass counts the number of specifications and
958b6d4
@@ -235,123 +358,15 @@
958b6d4
 		lineno = 0;
958b6d4
 		nspec = 0;
958b6d4
 		while (fgets_unlocked(line_buf, sizeof line_buf, fp)) {
958b6d4
-			lineno++;
958b6d4
-			len = strlen(line_buf);
958b6d4
-			if (line_buf[len - 1] != '\n') {
958b6d4
-				myprintf("%s:  line %d is too long, would be truncated, skipping\n", path, lineno); 
958b6d4
-				continue;
958b6d4
-			}
958b6d4
-			line_buf[len - 1] = 0;
958b6d4
-			buf_p = line_buf;
958b6d4
-			while (isspace(*buf_p))
958b6d4
-				buf_p++;
958b6d4
-			/* Skip comment lines and empty lines. */
958b6d4
-			if (*buf_p == '#' || *buf_p == 0)
958b6d4
-				continue;
958b6d4
-			items =
958b6d4
-			    sscanf(line_buf, "%as %as %as", &regex, &type,
958b6d4
-				   &context);
958b6d4
-			if (items < 2) {
958b6d4
-				myprintf("%s:  line %d is missing fields\n, skipping", path, lineno); 
958b6d4
-				continue;
958b6d4
-			} else if (items == 2) {
958b6d4
-				/* The type field is optional. */
958b6d4
-				free(context);
958b6d4
-				context = type;
958b6d4
-				type = 0;
958b6d4
-			}
958b6d4
-
958b6d4
-			if (pass == 1) {
958b6d4
-				/* On the second pass, compile and store the specification in spec. */
958b6d4
-				const char *reg_buf = regex;
958b6d4
-				char *cp;
958b6d4
-				spec_arr[nspec].stem_id = find_stem_from_spec(&reg_buf);
958b6d4
-				spec_arr[nspec].regex_str = regex;
958b6d4
-
958b6d4
-				/* Anchor the regular expression. */
958b6d4
-				len = strlen(reg_buf);
958b6d4
-				cp = anchored_regex = malloc(len + 3);
958b6d4
-				if (!anchored_regex)
958b6d4
+			if (process_line(path, line_buf, pass, ++lineno) != 0)
958b6d4
+				return -1;
958b6d4
+		}
958b6d4
+		if (localfp) 
958b6d4
+			while (fgets_unlocked(line_buf, sizeof line_buf, localfp)) {
958b6d4
+				if (process_line(local_path, line_buf, pass, ++lineno) != 0)
958b6d4
 					return -1;
958b6d4
-				/* Create ^...$ regexp.  */
958b6d4
-				*cp++ = '^';
958b6d4
-				cp = mempcpy(cp, reg_buf, len);
958b6d4
-				*cp++ = '$';
958b6d4
-				*cp = '\0';
958b6d4
-
958b6d4
-				/* Compile the regular expression. */
958b6d4
-				regerr =
958b6d4
-				    regcomp(&spec_arr[nspec].regex,
958b6d4
-					    anchored_regex,
958b6d4
-					    REG_EXTENDED | REG_NOSUB);
958b6d4
-				free(anchored_regex);
958b6d4
-				if (regerr < 0) {
958b6d4
-					myprintf("%s:  line %d has invalid regex %s\n", path, lineno, anchored_regex); 
958b6d4
-					continue;
958b6d4
-				}
958b6d4
-
958b6d4
-				/* Convert the type string to a mode format */
958b6d4
-				spec_arr[nspec].type_str = type;
958b6d4
-				spec_arr[nspec].mode = 0;
958b6d4
-				if (!type)
958b6d4
-					goto skip_type;
958b6d4
-				len = strlen(type);
958b6d4
-				if (type[0] != '-' || len != 2) {
958b6d4
-					myprintf("%s:  line %d has invalid file type %s\n", path, lineno, type); 
958b6d4
-					continue;
958b6d4
-				}
958b6d4
-				switch (type[1]) {
958b6d4
-				case 'b':
958b6d4
-					spec_arr[nspec].mode = S_IFBLK;
958b6d4
-					break;
958b6d4
-				case 'c':
958b6d4
-					spec_arr[nspec].mode = S_IFCHR;
958b6d4
-					break;
958b6d4
-				case 'd':
958b6d4
-					spec_arr[nspec].mode = S_IFDIR;
958b6d4
-					break;
958b6d4
-				case 'p':
958b6d4
-					spec_arr[nspec].mode = S_IFIFO;
958b6d4
-					break;
958b6d4
-				case 'l':
958b6d4
-					spec_arr[nspec].mode = S_IFLNK;
958b6d4
-					break;
958b6d4
-				case 's':
958b6d4
-					spec_arr[nspec].mode = S_IFSOCK;
958b6d4
-					break;
958b6d4
-				case '-':
958b6d4
-					spec_arr[nspec].mode = S_IFREG;
958b6d4
-					break;
958b6d4
-				default:
958b6d4
-					myprintf("%s:  line %d has invalid file type %s\n", path, lineno, type); 
958b6d4
-					continue;
958b6d4
-				}
958b6d4
-
958b6d4
-			      skip_type:
958b6d4
-
958b6d4
-				spec_arr[nspec].context = context;
958b6d4
-
958b6d4
-				if (strcmp(context, "<<none>>")) {
958b6d4
-					if (security_check_context(context) < 0 && errno != ENOENT) {
958b6d4
-						myprintf("%s:  line %d has invalid context %s\n", path, lineno, context); 
958b6d4
-						continue;
958b6d4
-					}
958b6d4
-				}
958b6d4
-
958b6d4
-				/* Determine if specification has 
958b6d4
-				 * any meta characters in the RE */
958b6d4
-				spec_hasMetaChars(&spec_arr[nspec]);
958b6d4
 			}
958b6d4
 
958b6d4
-			nspec++;
958b6d4
-			if (pass == 0) {
958b6d4
-				free(regex);
958b6d4
-				if (type)
958b6d4
-					free(type);
958b6d4
-				free(context);
958b6d4
-			}
958b6d4
-		}
958b6d4
-
958b6d4
 		if (pass == 0) {
958b6d4
 			if (nspec == 0)
958b6d4
 				return 0;
958b6d4
@@ -360,9 +375,11 @@
958b6d4
 				return -1;
958b6d4
 			memset(spec_arr, '\0', sizeof(spec_t) * nspec);
958b6d4
 			rewind(fp);
958b6d4
+			if (localfp) rewind(localfp);
958b6d4
 		}
958b6d4
 	}
958b6d4
 	fclose(fp);
958b6d4
+	if (localfp) fclose(localfp);
958b6d4
 
958b6d4
 	/* Move exact pathname specifications to the end. */
958b6d4
 	spec_copy = malloc(sizeof(spec_t) * nspec);
ae6f77c
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_config.c libselinux-1.20.1/src/selinux_config.c
ae6f77c
--- nsalibselinux/src/selinux_config.c	2004-10-20 16:31:36.000000000 -0400
958b6d4
+++ libselinux-1.20.1/src/selinux_config.c	2005-01-12 10:13:25.000000000 -0500
ae6f77c
@@ -26,7 +26,8 @@
ae6f77c
 #define BOOLEANS          7
ae6f77c
 #define MEDIA_CONTEXTS    8
ae6f77c
 #define REMOVABLE_CONTEXT 9
ae6f77c
-#define NEL               10
ae6f77c
+#define CUSTOMIZABLE_TYPES    10
ae6f77c
+#define NEL               11
ae6f77c
 
ae6f77c
 /* New layout is relative to SELINUXDIR/policytype. */
ae6f77c
 static char *file_paths[NEL];
ae6f77c
@@ -211,6 +212,10 @@
ae6f77c
   return get_path(MEDIA_CONTEXTS);
ae6f77c
 }
ae6f77c
 
ae6f77c
+const char *selinux_customizable_types_path() {
ae6f77c
+  return get_path(CUSTOMIZABLE_TYPES);
ae6f77c
+}
ae6f77c
+
ae6f77c
 const char *selinux_contexts_path() {
ae6f77c
   return get_path(CONTEXTS_DIR);
ae6f77c
 }