-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-C flag not properly working on Fedora #448
Comments
Seeing the same issue on Fedora 21. Do we have any updates? |
This is a known issue. In fedora by default tcdpump runs as user tcdpump (system user UID 72). If started with -C argument tcdpump will create first savefile (still running as root) but soon after that will drop root privileges. Hence it looses DAC override capability. Creation of next savefile fails because working directory of tcpdump process is not writable by others (most likely). To workaround this set ACL for tcpdump user on directory where you'd like to store savefiles. |
This looks like a continuation of the discussion started in #388. |
This issue still stands and seems to have more aspects to it (tested on Fedora 32):
At least it mentions dropping the privileges now. |
Please show the code path in which |
As expected, of course; the shell from which tcpdump is running has root permissions, so it can create the tmp.pcap file.
As expected - the root privileges are dropped before it tries to create the first capture file, starting in, as far as I can tell, tcpdump 4.0. |
That's probably some SELinux/AppArmor/whatever thingie preventing a process that's presumably running as root from changing its UID.
That's probably some version of tcpdump that is incorrectly creating the savefile before relinquishing privileges (or failing to relinquish privileges without reporting that), and then trying to change the ownership of the savefile to the user and failing to do so (either because it relinquished root privileges or because of the aforementioned SELinux/AppArmor/whatever stuff. As far as I can tell, our 4.7.2 release should relinquish root privilege before trying to create the savefile. If it's not doing so, either somebody unimproved it by "helpfully" changing it to relinquish root privileges after creating the savefile, or something (SELinux/AppArmor/whatever?) is getting in the way. |
Linux spock 3.19.3-200.fc21.x86_64 #1 SMP Thu Mar 26 21:39:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
It will fail using the -C option to specify the file size.
Noted: in 244860 and 809638 in this
The text was updated successfully, but these errors were encountered: