diff options
author | dzwdz | 2023-01-24 16:09:14 +0100 |
---|---|---|
committer | dzwdz | 2023-01-24 16:09:14 +0100 |
commit | ecf724116488651a0dba3880fb89aca308e2251b (patch) | |
tree | a83eaa41100254d923aac33291d228291431921c /src/user | |
parent | ba2f957dd39a44e0828ab4efd809d36d704fd537 (diff) |
kernel/procfs: allow reading memory of descendants
I'm suprised how short this patch is. It also feels like I've
introducted a vulnerability somewhere with it. Hopefully it's a false
feeling.
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/app/init/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c index 0114ac5..73e863e 100644 --- a/src/user/app/init/init.c +++ b/src/user/app/init/init.c @@ -36,11 +36,12 @@ void redirect(const char *exe, const char *out, const char *in) { } int main(void) { + const char *teststr = "I am teststr.\n"; handle_t killswitch_pipe[2]; freopen("/kdev/com1", "a+", stdout); freopen("/kdev/com1", "a+", stderr); - printf("[init] stage 2, main at %p\n", &main); + printf("[init] stage 2, main at %p, testtr at %p\n", &main, teststr); MOUNT_AT("/keyboard") { MOUNT_AT("/") { fs_whitelist((const char*[]){"/kdev/ps2/kb", NULL}); } |