Closed haimiko closed 5 years ago
Try running with sudo
I neglected to mention that I'm already running as root.
Oddly enough, with sudo it works on the workstation I compiled it on but when I try running it on another identical workstation I get this error:
sh: 1: Syntax error: ")" unexpected
It's because, the -H
runs the code in default shell (which may not match with the code). see https://github.com/neurobin/shc#the-hardening-flag--h
Right I read that. But how does that explain that it works fine on the originating system but not on a an identical clone?
On Wed, Feb 13, 2019 at 4:19 AM Md Jahidul Hamid notifications@github.com wrote:
It's because, the -H runs the code in default shell. see https://github.com/neurobin/shc#the-hardening-flag--h
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neurobin/shc/issues/73#issuecomment-463161368, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKkVmiHIQnz8SIs4J3wxfY8wdNzIrTbks5vM_SlgaJpZM4a0TXL .
Please check the default shell, they are probably different.
ls -la $(which sh)
e.g: For me it's dash:
lrwxrwxrwx 1 root root 4 Aug 22 17:48 /bin/sh -> dash
Both show lrwxrwxrwx 1 root root 4 Dec 5 2017 /bin/sh -> dash
On Wed, Feb 13, 2019 at 7:35 AM Md Jahidul Hamid notifications@github.com wrote:
Please check, the default shell, they are probably different.
ls -la $(which sh)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neurobin/shc/issues/73#issuecomment-463221491, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKkVqHCZmkP9xKbUWVzWKyrvQSjXakqks5vNCKfgaJpZM4a0TXL .
Did you use the -r
flag during compilation?
That fixed it. Thank you for your help.
On Thu, Feb 14, 2019 at 2:28 AM Md Jahidul Hamid notifications@github.com wrote:
Did you use the -r flag during compilation?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neurobin/shc/issues/73#issuecomment-463556078, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKkVhlkYr0Vuvw-RxElY6pgIXNNjXP6ks5vNSw_gaJpZM4a0TXL .
When compiling with the -H option, on Ubutuntu 14-16, the resulting binary returns the following error when trying to run it: Operation not permitted Killed
Running a binary compiled without -H works just fine.
Thoughts?
Output from strace: