#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
setuid( 0 );
system( "/usr/sbin/vpnc && /sbin/ip route add xxx.xxx.x.0/24 dev tun0);
return 0;
}
gcc vpnc-helper.c -o vpnc-helper devel-su chown root:root vpnc-helper chmod 4755 vpnc-helper

su -l nemo -c "your command"