PERFORCE change 219798 for review
Brooks Davis
brooks at FreeBSD.org
Thu Nov 15 18:23:10 UTC 2012
http://p4web.freebsd.org/@@219798?ac=10
Change 219798 by brooks at brooks_zenith on 2012/11/15 18:22:46
Only read cover slides for the cheripoint image.
Invoke cheripoint with -f so it can handle exploits in the
unsandboxed mode.
Affected files ...
.. //depot/projects/ctsrd/cheribsd/src/ctsrd/pictview/pictview.c#7 edit
Differences ...
==== //depot/projects/ctsrd/cheribsd/src/ctsrd/pictview/pictview.c#7 (text+ko) ====
@@ -41,6 +41,7 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <fnmatch.h>
#include <libutil.h>
#include <poll.h>
#include <signal.h>
@@ -428,6 +429,9 @@
/* XXX: doesn't support symlinks */
if (entry->d_type != DT_REG)
continue;
+ /* Ignore all files other than covers. */
+ if (fnmatch("*-cover-*.png", entry->d_name, 0) != 0)
+ continue;
if (slide_nimages == maxslides) {
maxslides *= 2;
slidenames = realloc(slidenames, sizeof(*slidenames) * maxslides);
@@ -790,7 +794,7 @@
syslog(LOG_ALERT, "login_tty failed in child: %s", strerror(errno));
err(1, "tty_login");
}
- execl("/usr/bin/cheripoint", "cheripoint", slide_dir, NULL);
+ execl("/usr/bin/cheripoint", "cheripoint", "-f", slide_dir, NULL);
syslog(LOG_ALERT, "exec of /usr/bin/cheripoint failed: %s", strerror(errno));
err(1, "execl()");
}
More information about the p4-projects
mailing list