check return values
user_name/acluser_name was already null-checked
properly use 64bit ints with skip_xfer
various minor cleanups and cosmetics
fix wrong strlen()
replace strncpy with sxi_strlcpy

This takes the size of the *dest* string and always NULL-terminates
if size>0.
It also prints a warning if truncation occurs and sx is not NULL.