diff options
author | Rob Landley <rob@landley.net> | 2016-05-10 03:26:02 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-05-10 03:26:02 -0500 |
commit | 4e756d7f9fd1b32b545ce8c43120dc733653b52f (patch) | |
tree | aecf1b7276aab2e8a6589a7e56bc71e7c73b6bb1 | |
parent | 869da8ce3752ce6f5aa63d302eebe60a2b5c8da8 (diff) | |
download | toybox-4e756d7f9fd1b32b545ce8c43120dc733653b52f.tar.gz |
Use CFG_TOYBOX_NORECURSE to avoid
<strike>all that tedious mucking about with hyperspace</strike>
stack measuring in ways that confuse security stuff.
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -140,7 +140,8 @@ void toy_exec(char *argv[]) // Compiler writers have decided subtracting char * is undefined behavior, // so convert to integers. (LP64 says sizeof(long)==sizeof(pointer).) - if (toys.stacktop && labs((long)toys.stacktop-(long)&which)>6000) return; + if (!CFG_TOYBOX_NORECURSE) + if (toys.stacktop && labs((long)toys.stacktop-(long)&which)>6000) return; // Return if we need to re-exec to acquire root via suid bit. if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return; |