Merge pull request #357 from fredsod/master

Fixes #349
Mangle description field on prefixes

If description is '' we should mangle it to None/NULL, which for some
weird reason wasn't done in the edit_prefix function. edit_prefix did it
for pretty much all other variables (where it makes sense) and
add_prefix does it as well. Anyway, this fixes the issue.
Merge branch 'xhr-null-description'
Remove ugly newline ;)
Fix error checking for nipap-passwd

woh did most of the work - I'm merely cleaning it up a bit. Swapped tabs
for 4*space and added the same try/except around delete_user as we have
around adding a user.

Fixes #349
Fix Travis-CI build

We relied on downloading ip4r from CVS but since that has moved,
Travis-CI test building broke down.

.travis conf is now modified to install ip4r from our debian packages
instead of downloading and building manually... *fingers crossed*
Add postinst script to nipap-www

postinst script for nipap-www debian package now asks question whether
it should automatically add a new user to the local auth db for the web
interface and configure the new user in the nipap.conf configuration
file as the XMLRPC-URI.

This is quite tricky and a bit of a kludge as nipap-www does not depend
on the nipapd package and this auto-setup help is only possible if
nipapd is installed on the same machine. Since we need to be certain the
nipapd package files are unpacked, the question is not raised in the
'config' file as is customary but in the postinst file.

Also, the configuration script for nipapd needs to be run before all of
this is run and since we cannot make a hard dependancy on nipapd
(because one should be able to run it on separate machines), we cannot
possible know this. Since nipap-www won't break if nipapd is not
installed, I'm saying this solution is good enough for the moment. Best
case is you get help with adding a user for nipap-www while the worst
case is that nothing happens (you can then get the assistance by doing
dpkg-reconfigure nipap-www).

For the future, we should figure out a better way of handling all this,
possibly telling apt the order that packages should be installed in but
without having any hard dependencies - is that possible?

Fixes #345
Add link to prefix type help

The prefix type attribute is described in a help box but was only linked
from the add pool page. This changes so that the same link is available
on the prefix add and edit page.

Fixes #358
Raise max results for vrf listing

Tab completion for vrf listings were limited by the default max_result
of 50. The max_result is now set to 100000 for these queries and so
we've probably avoided the issue for the time being.. not sure what
would be the optimal solution. Tab completion does give much room for
things like error/warning messages and so just raising the limit feels
like the best solution for the time being. Few should need to go above
100000. Listing 10k VRFs takes about a second on my laptop..

Fixes #353.
Clean more files

A bunch of files from building debian packages were not removed by 'make
clean'. Fixed!
Update release handling instructions
Bump version to 0.19.0
Merge branch 'v0.19'
Merge branch '353-vrf-tab-completion'
Merge branch '358-www-prefix-type-help'
Fix nipapd autostart & add nipap user on install

I somehow forgot to include the update-rc.d when I wrote my last patch
for the nipapd.postinst script so here goes.. autostart of nipapd now
works.

We're also adding a nipap user that will be used in the future to run
the nipapd process.

Part of #361.
Fixes #362.
Release 0.19.1 for nipapd

Fixes automatic start of nipapd on system startup. update-rc.d wasn't
included in the steps of the postinst script.
Add support for dropping privileges

This implements support for changing the effective uid and gid to a user
configured in the configuration file. Good for avoiding any security
issues as nipapd is no longer run as root.

Due to how the backend is built with Twisted and it's initiation
process, we can not listen to ports below 1024 when dropping privileges
as we drop privilegs before binding to a socket. This is per design,
more can be read at
https://github.com/SpriteLink/NIPAP/wiki/Dropping-privileges-and-listening-to-low-ports

Part of #361.
Fixes #364.
Improve dropping privileges

If run as non-root and configured to drop privileges nipapd will now
complain loudly! I think this helps as opposed to just not dropping
privileges.

Part of #364.
Include user/group priv drop example in nipap.conf

This includes a brief explanation and example of the new user/group
keywords in the nipap.conf file.

Part of #361.