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

Side by Side Diff: src/trusted/service_runtime/env_cleanser.c

Issue 3391010: Update the PPAPI DEPS revision. This change included parameter profile chang... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/shared/ppapi_proxy/plugin_var.cc ('k') | tests/fake_browser_ppapi/fake_object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Native Client Authors. All rights reserved. 2 * Copyright 2009 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ++left; 58 ++left;
59 ++right; 59 ++right;
60 } 60 }
61 if ('=' == cleft && '\0' == cright) { 61 if ('=' == cleft && '\0' == cright) {
62 return 0; 62 return 0;
63 } 63 }
64 return (0xff & cleft) - (0xff & cright); 64 return (0xff & cleft) - (0xff & cright);
65 } 65 }
66 66
67 int NaClEnvInWhitelist(char const *env_entry) { 67 int NaClEnvInWhitelist(char const *env_entry) {
68 return NULL != bsearch((void const *) &env_entry, 68 int retval = NULL != bsearch((void const *) &env_entry,
69 (void const *) kNaClEnvWhitelist, 69 (void const *) kNaClEnvWhitelist,
70 NACL_ARRAY_SIZE(kNaClEnvWhitelist) - 1, /* NULL */ 70 NACL_ARRAY_SIZE(kNaClEnvWhitelist) - 1, /* NULL */
71 sizeof kNaClEnvWhitelist[0], 71 sizeof kNaClEnvWhitelist[0],
72 EnvCmp); 72 EnvCmp);
73 printf("inwhitelist: %s %d\n", env_entry, retval);
74 return retval;
73 } 75 }
74 76
75 /* PRE: sizeof(char *) is a power of 2 */ 77 /* PRE: sizeof(char *) is a power of 2 */
76 78
77 /* 79 /*
78 * Initializes the object with a filtered environment. 80 * Initializes the object with a filtered environment.
79 * 81 *
80 * May return false on errors, e.g., out-of-memory. 82 * May return false on errors, e.g., out-of-memory.
81 */ 83 */
82 int NaClEnvCleanserInit(struct NaClEnvCleanser *self, char const *const *envp) { 84 int NaClEnvCleanserInit(struct NaClEnvCleanser *self, char const *const *envp) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 140 }
139 141
140 char const *const *NaClEnvCleanserEnvironment(struct NaClEnvCleanser *self) { 142 char const *const *NaClEnvCleanserEnvironment(struct NaClEnvCleanser *self) {
141 return (char const *const *) self->cleansed_environ; 143 return (char const *const *) self->cleansed_environ;
142 } 144 }
143 145
144 void NaClEnvCleanserDtor(struct NaClEnvCleanser *self) { 146 void NaClEnvCleanserDtor(struct NaClEnvCleanser *self) {
145 free((void *) self->cleansed_environ); 147 free((void *) self->cleansed_environ);
146 self->cleansed_environ = NULL; 148 self->cleansed_environ = NULL;
147 } 149 }
OLDNEW
« no previous file with comments | « src/shared/ppapi_proxy/plugin_var.cc ('k') | tests/fake_browser_ppapi/fake_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698