{C++ etc.}

Latest Posts
 
Home | C++ Posts | Linux Posts | Programming Posts | Issue Tracking Posts

Wednesday, September 09, 2009

Installing Shrew vpn client on Fedora 10



There are some dependencies which have to be addressed when trying to install Shrew vpn client on Fedora 10.

IMPORTANT: Try to obtain the latest beta version of shrew. The stable package requires an outdated version of QT (3.2) and it's hard to set up since it uses the config.h file which is not included in modern versions of the linux kernel.
  • yum -y install cmake
  • yum -y install openssl-devel
  • yum -y install flex
  • yum -y install bison
  • install QT dev package using package manager
Run:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES

After installing the shrew client, you could set up the connection to a Cisco VPN network by importing a valid .pcf file. This is preferred over manual set up since the user might not be aware of some of the connection details. If you connect to the VPN using windows, this file is automatically created and you could find it by doing a simple search.

You could use rdesktop as a Remote Desktop client along with shrew to access windows machines in the VPN.


Sunday, September 06, 2009

Remove Stray Code Lines Before a Code Review




One of the modules that I'm in charge of, had an object which set a bool called b_Delete inside the destructor. While working on a new class which would handle a collection of these objects, I used:
list_A.erase(pX); if (! pX->b_Delete) // Already deleted { delete pX; } This was meant to crash if some other class removed the object in an asynchronous callback. After I have removed all the unwanted deletes else where I could remove the check. Unfortunately, the code remained as is. Right now I'm suffering the consequences. Some of my colleagues who saw this think that I'm not aware that you can't refer to objects inside a deleted object. The code works because I've already removed all of the unwanted delete calls on pX. Note to self: Go through each new code line before a code review

Fedora 10 doesn't have gcc pre-installed

Imagine my surprise when I tried to compile a test c++ program after installing Fedora 10 and it failed with the error "Command not found".
I had to install it manually with yum -y install gcc sudo (as root)