|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Static shells?
I'm having a little trouble setting up a chrooted environment for one my unprivileged user accounts because I don't happen to have any statically linked shell in my system.
According to Michael W. Lucas on the 2nd edition of his Absolute OpenBSD book: Quote:
Quote:
Code:
# file /bin/ksh /bin/ksh: ELF 64-bit LSB shared object, x86-64, version 1, for OpenBSD, dynamically linked, stripped # file /bin/sh /bin/sh: ELF 64-bit LSB shared object, x86-64, version 1, for OpenBSD, dynamically linked, stripped # file /bin/csh /bin/csh: ELF 64-bit LSB shared object, x86-64, version 1, for OpenBSD, dynamically linked, stripped Last edited by Jautenim; 12th September 2015 at 10:17 PM. |
|
||||
Hello, and welcome!
You are being misled by an incorrect result from file(1) at 5.7. But ldd(1) will provide the truth. Code:
$ ldd /bin/sh /bin/sh: Start End Type Open Ref GrpRef Name 00000802ac819000 00000802acc99000 dlib 1 0 0 /bin/sh $ The file(1) program was rewritten for 5.8, and this issue is fixed. The rewrite improved security by including privilege separation, and misleading ELF analysis like this was corrected. The summary description of the change is mentioned in www.openbsd.org/58.html as "file(1) has been replaced with a new modern implementation, including sandbox and privilege separation." For some of the details, see the commit log for the Makefile between 5.7 and 5.8 (r1.113 - r1.115) here: http://cvsweb.openbsd.org/cgi-bin/cv.../file/Makefile There was a discussion of this on either the tech@ or misc@ mailing lists, which is why I knew of it, but my Google Fu is weak today and I cannot locate the discussion. Last edited by jggimi; 13th September 2015 at 12:03 AM. Reason: whitespace padding in the ldd example for clarity |
|
|||
You are right, the ldd output checks, and I went ahead and it just works.
Maybe I should have followed the instructions straight to the end before asking here for help, but if I had done that now I'd be really baffled Thank you, jggimi. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FreeCode goes static | shep | News | 0 | 18th June 2014 09:59 PM |
NetBSD static ip | openbsd | NetBSD Installation and Upgrading | 1 | 27th November 2011 09:13 PM |
Intel shells out $1.5bn for Nvidia tech | J65nko | News | 0 | 10th January 2011 11:26 PM |
problem with static v4 IPs | adealey | OpenBSD General | 9 | 8th March 2010 11:29 AM |
toor, root and shells | scottro | Guides | 4 | 27th June 2008 05:14 AM |