Jesse Keating 7a32965
diff -up linux-2.6.24.sparc64/security/selinux/hooks.c.BAD linux-2.6.24.sparc64/security/selinux/hooks.c
Jesse Keating 7a32965
--- linux-2.6.24.sparc64/security/selinux/hooks.c.BAD	2008-03-21 14:28:06.000000000 -0400
Jesse Keating 7a32965
+++ linux-2.6.24.sparc64/security/selinux/hooks.c	2008-03-21 14:29:10.000000000 -0400
Jesse Keating 7a32965
@@ -3018,6 +3018,7 @@ static int file_map_prot_check(struct fi
Jesse Keating 7a32965
 	const struct cred *cred = current_cred();
Jesse Keating 7a32965
 	int rc = 0;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+#ifndef CONFIG_SPARC
Jesse Keating 7a32965
 	if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
Jesse Keating 7a32965
 		/*
Jesse Keating 7a32965
 		 * We are making executable an anonymous mapping or a
Jesse Keating 7a32965
@@ -3028,6 +3029,7 @@ static int file_map_prot_check(struct fi
Jesse Keating 7a32965
 		if (rc)
Jesse Keating 7a32965
 			goto error;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
+#endif
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	if (file) {
Jesse Keating 7a32965
 		/* read access is always possible with a mapping */
Jesse Keating 7a32965
@@ -3081,6 +3081,7 @@ static int selinux_file_mprotect(struct 
Jesse Keating 7a32965
 	if (selinux_checkreqprot)
Jesse Keating 7a32965
 		prot = reqprot;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+#ifndef CONFIG_SPARC
Jesse Keating 7a32965
 	if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) {
Jesse Keating 7a32965
 		rc = 0;
Jesse Keating 7a32965
 		if (vma->vm_start >= vma->vm_mm->start_brk &&
Jesse Keating 7a32965
@@ -3103,6 +3103,7 @@ static int selinux_file_mprotect(struct 
Jesse Keating 7a32965
 		if (rc)
Jesse Keating 7a32965
 			return rc;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
+#endif
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
Jesse Keating 7a32965
 }