On Mon, 28 May 2007, Edd Barrett wrote:

> Hi there,
> 
> My friend has made an application that uses a shared library which is
> not yet ported to OpenBSD (xereces-c). We have been trying to run it
> on OpenBSD using linux-compat. I know this is all set up properly as I
> use opera a lot.
> 
> We have a static binary for the correct arch:
> $ file a.out
> a.out: ELF 32-bit LSB executable, Intel 80386, version 1, for
> GNU/Linux 2.6.9, statically linked, not stripped
> $ uname -a
> OpenBSD puff.langash.lan 4.1 GENERIC#1435 i386
> $ ldd a.out
> a.out:
> ldd: a.out: not a dynamic executable
> 
> It is executable:
> $ ls -al | grep a.out
> -rwxrwxrwx  1 didi  didi   1176578 May 27 23:48 a.out
> 
> So we should be able to run it:
> $ ./a.out
> ksh: ./a.out: Operation not permitted
> $ exec a.out
> ksh: a.out: Operation not permitted
> 
> So I try as root (I know I shouldnt have to):
> # whoami
> root
> # ./a.out
> ksh: ./a.out: Operation not permitted
> # exec a.out
> ksh: a.out: not found
> $ whoami
> edd
> 
> Notice how it logged my root shell out?!?!

That's completely normal behaviour of exec. See man ksh.

        -Otto

Reply via email to