droproot(): always print to stderr (GH #425)

Otherwise it interferes with the output of "tcpdump -w -".
This commit is contained in:
Denis Ovsienko 2015-02-09 01:21:51 +00:00
parent efe8a2be5a
commit 3f15ae25c2

View File

@ -736,7 +736,7 @@ droproot(const char *username, const char *chroot_dir)
fprintf(stderr, "error : ret %d\n", ret);
}
else {
printf("dropped privs to %s\n", username);
fprintf(stderr, "dropped privs to %s\n", username);
}
/* We don't need CAP_SETUID and CAP_SETGID */
capng_updatev(
@ -758,7 +758,7 @@ droproot(const char *username, const char *chroot_dir)
exit(1);
}
else {
printf("dropped privs to %s\n", username);
fprintf(stderr, "dropped privs to %s\n", username);
}
#endif /* HAVE_CAP_NG_H */
}