PERFORCE change 174211 for review

Robert Watson rwatson at FreeBSD.org
Wed Feb 3 09:27:39 UTC 2010


http://p4web.freebsd.org/chv.cgi?CH=174211

Change 174211 by rwatson at rwatson_vimage_client on 2010/02/03 09:27:04

	There's no IN_CAP_MODE definition for libcapsicum, so just test for
	a negative fd_rtld before closing.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 $
+ * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 $
  */
 
 #include <sys/param.h>
@@ -312,9 +312,8 @@
 		    binname, argv, fds);
 		exit(-1);
 	}
-#ifndef IN_CAP_MODE
-	close(fd_rtld);
-#endif
+	if (fd_rtld != -1)
+		close(fd_rtld);
 	close(fd_sockpair[1]);
 
 	lcsp->lcs_fd_procdesc = fd_procdesc;
@@ -330,10 +329,8 @@
 		close(fd_sockpair[0]);
 	if (fd_sockpair[1] != -1)
 		close(fd_sockpair[1]);
-#ifndef IN_CAP_MODE
 	if (fd_rtld != -1)
 		close(fd_rtld);
-#endif
 	if (lcsp != NULL)
 		free(lcsp);
 	errno = error;


More information about the p4-projects mailing list