Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Oct 2006 15:19:20 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 107189 for review
Message-ID:  <200610031519.k93FJK2b030050@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107189

Change 107189 by millert@millert_macbook on 2006/10/03 15:18:35

	Merge sebsd_cred_createlabels() into sebsd_task_create(), its only
	consumer.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#20 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#20 (text+ko) ====

@@ -779,29 +779,25 @@
 }
 
 static void
-sebsd_cred_createlabels(struct label *pl, struct label *chl)
+sebsd_task_create(struct task *parent, struct task *child, struct label *pl,
+    struct label *chl, struct label *chpl)
 {
 	int rc;
-	struct task_security_struct *parent, *task;
+	struct task_security_struct *psec, *chsec, *chpsec;
 
 	rc = ss_precondition();
 	if (rc <= 0)
 		return;
 
-	parent = SLOT(pl);
-	task = SLOT(chl);
+	psec = SLOT(pl);
+	chsec = SLOT(chl);
+	chpsec = SLOT(chpl);
 
 	/* Default to using the attributes from the parent process */
-	task->osid = parent->osid;
-	task->sid = parent->sid;
-}
-
-static void
-sebsd_task_create(struct task *parent, struct task *child, struct label *pl,
-    struct label *chl, struct label *chpl)
-{
-	sebsd_cred_createlabels(pl, chl);
-	sebsd_cred_createlabels(pl, chpl);
+	chsec->osid = psec->osid;
+	chsec->sid = psec->sid;
+	chpsec->osid = psec->osid;
+	chpsec->sid = psec->sid;
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610031519.k93FJK2b030050>