Don't use "sudo -n" option, which is not supported by RHEL4.

It was added to avoid a password prompt when running tests. Jenkins
disables TTY access, so it should not be a problem there regardless,
but it may lead to cf-agent hanging on a password prompt when running
tests locally if sudoers is not set up correctly.

(cherry picked from commit 9a15c73ee7b2a494f559eeeb06fa38776f1bd564)
Fix leftover primary group causing trouble for later users tests.

(cherry picked from commit a79ef1d5e1fe8e6aecd1e7b89986cdf6a18c435e)
Remove leftover comments.

(cherry picked from commit dd7fca04f5125d4e031072ac911d1e5c39404cd7)
check for EINTR to avoid spinning in an empty file

(cherry picked from commit 04011143f8d56aab0eaf7ae3b1e70c27adbaa8f3)
add space for terminating null to fix AIX memory corruption

(cherry picked from commit 4c24a79c3387b4edc1e25bfb3415b925cba13c22)
Redmine#5776: pluck all the cp and dcp bodies

(cherry picked from commit 5dcd81d3aa981e679cca24843b217d9ca0a408e9)

Conflicts:
	tests/acceptance/Makefile.am
Redmine#5776: remove sync_cp usage due to conflicts

(cherry picked from commit 9d252396342b413c9a627770bb67463b1908d9ad)