On OpenBSD, FreeBSD, Debian, and Ubuntu setting a library as executable means you can run it directly, and since ./libressl.so won't work it shouldn't be 755. Ten minutes of research reveals that Red Hat sets the execute bit on all shared libraries, and while its ldd script complains if it's not set, there are numerous unanswered questions from their community as to why this is required. Solaris seems to set the execute bit, but I couldn't find any mention of why (in 10 minutes or less). IF http://unix.stackexchange.com/questions/40587/why-are-shared-libraries-executable is true then HPUX requires it. Perhaps Solaris does something similar? On 64 bit hardware OpenVMS adds the execute bits of mmaped files to the entropy file.
In any case, it would seem using 644 is the safest, if not most portable thing to do since 755 might mean something to the OS which LibreSSL doesn't know about. On Mon, Jul 14, 2014 at 1:37 PM, Vadim Zhukov <[email protected]> wrote: > 2014-07-14 21:30 GMT+02:00 Jan Engelhardt <[email protected]>: >> On Monday 2014-07-14 20:34, Bob Beck wrote: >> >>>What problem are you trying to solve here. >> >>>> Pristine libtool does not pass -m 644, and default (GNU) install >>>> defaults to mode 755 when not specifying anything else. >> >> I am trying to figure out why OpenBSD would be patching libtool >> and adding >> >> + case " $install_prog " in >> + *[\\\ /]cp\ *) extra_mode=;; >> + *) extra_mode='-m 644';; >> + esac >> >> (in >> http://www.openbsd.org/cgi-bin/cvsweb/ports/devel/libtool/patches/patch-libltdl_config_ltmain_sh?rev=1.2;content-type=text/plain >> ) > > The real question you should ask is "why do other OSes have executable > bit set for shared libraries?" > > http://unix.stackexchange.com/questions/40587/why-are-shared-libraries-executable > > -- > WBR, > Vadim Zhukov >
