Porter,
I am not the orginal guy who created this thread in first place. His intention was not to look into code by some colleages but in our case, it is not the intention.
We use some Oracle monitoring scripts which logs on to oracle database with username/password
We don't want to let everybody see username/password and also don't want to hardcode password in shell script also even though users might have read permissions for script and hence we have used shc.
We don't put locks in our home to challenge that an experieced thief can't break the lock, it is just for normal folks who sometimes could change their mind
.
Any way, thanks for your input.
-------------------------------------------------------
There was some other issues which we have even though make shc was okay.
$ ./shc -r -l "" -f pru.sh
pru.sh.x.c:246:24: sys/ptrace.h: No such file or directory
pru.sh.x.c: In function `untraceable':
pru.sh.x.c:274: error: `PTRACE_ATTACH' undeclared (first use in this function)
pru.sh.x.c:274: error: (Each undeclared identifier is reported only once
pru.sh.x.c:274: error: for each function it appears in.)
./shc: Error 0
In order to corrrect this issue, we need to modify shc.c and remove
include <sys/ptrace.h> since ptrace.h does not exists in Solaris 10
and
changed
mine = !ptrace(PTRACE_ATTACH, pid, 0, 0);",
To
mine = !ptrace(10, pid, 0, 0);",
and again make shc
It works okay.
I am writing this here since who knows some body may find this useful and looking for suggestions.