Config: fix minor validation bug and add extra checks

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Liana: use monkey api to set a socket non-blocking

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Config: fix unitilialized variable

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
http: do not perror() when sendfile() fails

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Configure: fix #155 new accept() mode in configure flags

This patch add two new flags to the configure script:

    --only-accept
    --only-accept4

These flags let specify the builder system which accept mode
must be used in the server socket: accept() or accept4(). If
no one is specified the builder will auto-test accept4(), if
it fails, it will go for accept().

This is useful when doing cross compiling and want to specify a
specific operation mode.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
file: Reorder struct file_info, drop 8 bytes, v2

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Auth: rename mkpasswd utlity to mk_passwd

Monkey's "mkpasswd" clashes with the /usr/bin/mkpasswd
utility of the standard Whois tools package.

Thanks to Fiorella Santini for catching this.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
configure: fix #156, install man pages to the correct sections

The current configure script installs the man pages banana.1, monkey.1
and monkey-api.3 at the top level man dir, /usr/share/man, and not in
the appropriate categories by FHS standards.  This fixes the issue.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
memory: Prevent a possible crash in mk_pointer_to_buf

Fixes a Clang warning. If *dest is NULL, memcpy would crash.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
plugin: Remove dead assignment

Fixes a Clang warning.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
request: Remove dead assignment

Fixes a Clang warning. This write is pointless, since it is never read.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
user: Fix possible crash

Fixes a Clang warning. If getpwnam returns NULL, accessing usr->something
would segfault.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
user: Check the return value of sete[ug]id

Fixes a Clang warning.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
config: Prevent possible crash

Fixes a Clang warning.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
palm: Remove two dead writes

Fixes two Clang warnings.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
mandril: Correct in_addr usage

Fixes a Clang warning. The file had used only a pointer to in_addr, when
it should have used a struct!

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
monkey : adds thread key initialization

added missing thread key initialization for mk_cache_utils_gmt_text

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
palm: Prevent possible crash

Fixes a Clang warning. If pr is NULL, the final return would crash.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
config: Don't pass NULL to readdir, v2

Exit instead of return.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
mimetype: If the file is invalid, we would crash. Exit instead. v2

Fixes a Clang warning. v2: exit instead of abort

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>