PERFORCE change 166446 for review

Jonathan Anderson jona at FreeBSD.org
Thu Jul 23 14:11:04 UTC 2009


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

Change 166446 by jona at jona-trustedbsd-belle-vmware on 2009/07/23 14:10:50

	sandbox_qt works\!

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_qt/sandbox_qt.cpp#3 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_qt/sandbox_qt.cpp#3 (text+ko) ====

@@ -95,12 +95,13 @@
 	for(int i = 0; libdirs[i]; i++)
 	{
 		sprintf(path, "%s/%s", libdirs[i], name);
-		lib.lcl_fd = ua_ropen(path, O_RDONLY, rights);
+//		lib.lcl_fd = ua_ropen(path, O_RDONLY, rights);
 		// TODO: this is a kludge because mmap() fails in the child proc
 		lib.lcl_fd = open(path, O_RDONLY);
 		if(lib.lcl_fd >= 0) return lib;
 
-		printf("errno: %i\n", errno);
+		if(errno != ENOENT)
+			err(EX_NOINPUT, "Error opening library %s", path);
 	}
 
 	err(-1, "Error opening %s with rights 0x%016llx\n", name, rights);
@@ -161,9 +162,13 @@
 		find_library("librpcsvc.so.4"),
 		find_library("libexpat.so.6"),
 
+		//fontconfig
+		find_library("libxml2.so.5"),
+		find_library("libfreetype.so.9"),
+
 		{ NULL, NULL, -1 }
 	};
-//	sleep(120);
+
 	int libcount = 0;
 	while(libs[libcount].lcl_fd >= 0) libcount++;
 
@@ -240,6 +245,14 @@
 	}
 	cout << "host:\t\tSent Xauth data to sandbox" << endl;
 
+	printf("======================================\n");
+	printf("\n");
+	printf("\n");
+	printf("\n");
+	printf("\n");
+	printf("======================================\n");
+	fflush(stdout);
+	sleep(1);
 	QMessageBox::information(NULL, "Host", "This is on the host");
 
 	return 0;
@@ -254,7 +267,6 @@
 	printf("sandbox:\tIn sandbox: %i\n", ld_insandbox());
 	fflush(stdout);
 
-
 	struct lc_host *lchpp;
 	if(lcs_get(&lchpp) < 0) err(EX_IOERR, "Error getting lc_host");
 
@@ -353,7 +365,7 @@
 	printf("sandbox:\tset DISPLAY to %s\n", getenv("DISPLAY"));
 	fflush(stdout);
 
-	raw_x_tests();
+//	raw_x_tests();
 
 	printf("sandbox:\tCreating QApplication...\n");
 	fflush(stdout);


More information about the p4-projects mailing list