PERFORCE change 20063 for review

Brian Feldman green at freebsd.org
Thu Oct 24 18:41:49 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=20063

Change 20063 by green at green_laptop_2 on 2002/10/24 11:41:02

	Remove debugging output from the mmap_downgrade check, which
	evidently _does_ work.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#16 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#16 (text+ko) ====

@@ -1953,30 +1953,6 @@
 	return (0);
 }
 
-static __inline const char *
-prot2str(vm_prot_t prot)
-{
-
-	switch (prot & VM_PROT_ALL) {
-	case VM_PROT_READ:
-		return ("r--");
-	case VM_PROT_READ | VM_PROT_WRITE:
-		return ("rw-");
-	case VM_PROT_READ | VM_PROT_EXECUTE:
-		return ("r-x");
-	case VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE:
-		return ("rwx");
-	case VM_PROT_WRITE:
-		return ("-w-");
-	case VM_PROT_EXECUTE:
-		return ("--x");
-	case VM_PROT_WRITE | VM_PROT_EXECUTE:
-		return ("-wx");
-	default:
-		return ("---");
-	}
-}
-
 static void
 mac_lomac_check_vnode_mmap_downgrade(struct ucred *cred, struct vnode *vp,
     struct label *label, vm_prot_t *prot)
@@ -1993,12 +1969,8 @@
 	subj = SLOT(&cred->cr_label);
 	obj = SLOT(label);
 
-	printf("lomac mmap dg (%u): *prot was %s\n",
-	    curthread->td_proc->p_pid, prot2str(*prot));
 	if (!mac_lomac_dominate_single(subj, obj))
 		*prot &= ~VM_PROT_WRITE;
-	printf("lomac mmap dg (%u): *prot is %s\n",
-	    curthread->td_proc->p_pid, prot2str(*prot));
 }
 
 static int
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list