Executable Stack and Shared Objects in Subversion Edge

Some shared objects requires to run as an executable stack. If you are using fedora and SELinux Enabled. Then you may faced this warning message from SELinux.

While running the CollabNet SvnEdge server, i found some shared objects requires executable stack and raises some exception along with debug messages. Because of this svnserver fails to start.


DEBUG services.CommandLineService - testForPassword command: [sudo, -S, /opt/src/csvn/svn-server/bin/httpd, -f, /opt/src/csvn/svn-server/data/conf/httpd.conf, -t] result=null

DEBUG services.CommandLineService - Process error: [sudo] password for sriram:
Sorry, try again.

Then i tried to run the SvnEdge httpd server separately, by running


$ /opt/src/csvn/svn-server/bin/httpd -f /opt/src/csvn/svn-server/data/conf/httpd.conf

I got the following error :


httpd: Syntax error on line 24 of /opt/src/csvn/svn-server/data/conf/httpd.conf: Cannot load /opt/src/csvn/svn-server/lib/modules/mod_dav_svn.so into server: libcrypto.so.0.9.8: cannot enable executable stack as shared object requires: Permission denied

Then I checked the mod_dav_svn shared object wherethere it requires executable stack or not.

execstack -q /opt/src/csvn/svn-server/lib/libcrypto.so.0.9.8

If its output starts with ‘X’ means, it requires an executable stack. In my case it prints

X /opt/src/csvn/svn-server/lib/libcrypto.so.0.9.8

So, I changed mod_dav_svn shared object to not request an executable stack.

execstack -c /opt/src/csvn/svn-server/lib/libcrypto.so.0.9.8

Then it look like this :

- /opt/src/csvn/svn-server/lib/libcrypto.so.0.9.8

After that everything works fine.