mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2025-01-08 16:58:46 +08:00
droproot(): always print to stderr (GH #425)
Otherwise it interferes with the output of "tcpdump -w -".
This commit is contained in:
parent
efe8a2be5a
commit
3f15ae25c2
@ -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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user