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.

Advertisements

Mobile App Development with J2ME & EclipseME Plugin

To develop mobile app, you basically need the J2ME enabled IDE. I preffer Eclipse IDE which is even better then NetBeans IDE.

EclipseME is an Eclipse plugin that can be used to simplify the development of J2ME MIDlets using eclipse.

You need to install EclipseME plugin in your Eclipse IDE :

Open the Eclipse IDE and go to Help –> Install New Software, Enter the following URL in the ‘Work with’ text box

http://eclipseme.org/updates & click ‘Add’ button.

This will prompt an window to add repository & give some name like ‘EclipseME Updates’ & then press ‘ok’.

Download the Wireless Toolkit(WTK) from

http://www.oracle.com/technetwork/java/download-135801.html

To install the WTK,

chmod +x sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh

./sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh

Choose the JDK Path like /usr/java/bin & Installation Path like /opt/apps/WTK

Then run the ktoolbar (/opt/apps/WTK/bin/ktoolbar)

Open the eclipse & click new project –> J2ME MIDlet Suite

Go to Preferences –> J2ME –> Device Management

Import the devices from the Installation Path & Apply the changes.

In Project Explorer & click the src package from HelloWorld Project & right click it to add a java class.

Add the following code into it.

import javax.microedition.lcdui.*;

import javax.microedition.midlet.*;

public class HelloWorld extends MIDlet

implements CommandListener {

private Form mMainForm;

public HelloWorld() {

mMainForm = new Form("HelloWorld");

mMainForm.append(new StringItem(null, "Hello, World!"));

mMainForm.addCommand(new Command("Exit", Command.EXIT, 0));

mMainForm.setCommandListener(this);

}

public void startApp() {

Display.getDisplay(this).setCurrent(mMainForm);

}

public void pauseApp() {}

public void destroyApp(boolean unconditional) {}

public void commandAction(Command c, Displayable s) {

notifyDestroyed();

}

}

Then go to run configuration & select the J2ME & add the configuration you want and run it.

You can this via the Wireless toolkit,

The output is displayed in the Device Emulator.