Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: src/trusted/service_runtime/sel_main.c

Issue 1690983004: Extended restricted filesystem to support relative paths. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/sel_ldr_filename.c ('k') | tests/limited_file_access/limited_file_access.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/sel_main.c
diff --git a/src/trusted/service_runtime/sel_main.c b/src/trusted/service_runtime/sel_main.c
index 77e95a2eaa3eaa2abe18a857a819f3681c5e2c32..5b7bc4d263895f50e5727329959a6cd7660e518a 100644
--- a/src/trusted/service_runtime/sel_main.c
+++ b/src/trusted/service_runtime/sel_main.c
@@ -744,8 +744,9 @@ int NaClSelLdrMain(int argc, char **argv) {
NaClAppStartModule(nap, NULL, NULL);
/*
- * For restricted file access, change directory to the root
- * of the restricted directory.
+ * For restricted file access, change directory to the root of the restricted
+ * directory. This is required for safety, because we allow relative
+ * pathnames.
*/
if (NaClRootDir != NULL && NaClHostDescChdir(NaClRootDir)) {
NaClLog(LOG_FATAL, "Could not change directory to root dir\n");
« no previous file with comments | « src/trusted/service_runtime/sel_ldr_filename.c ('k') | tests/limited_file_access/limited_file_access.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698