#19661: tor refuses to use /dev/null as a config file -------------------------------------------------+------------------------- Reporter: weasel | Owner: Type: defect | Status: | needs_revision Priority: Medium | Milestone: Tor: | 0.3.0.x-final Component: Core Tor/Tor | Version: Tor: | 0.2.8.5-rc Severity: Normal | Resolution: Keywords: easy, lorax, integration, review- | Actual Points: group-10 | Parent ID: | Points: .1 Reviewer: | Sponsor: -------------------------------------------------+-------------------------
Comment (by asn): Hmmm, thought about this some more. The patch here does not whitelist /dev/null specifically. Instead, it makes `file_status()` accept any character device and return it as "a non- empty regular file, or a FIFO on unix-like systems". We use `file_status()` in various places in the codebase, like when opening/saving the torrc, or state files, or crypto keys. I wonder if there are any operations that we can't do with a character device file that are required for the features above (like seek, or unlink, or whatever). I did some tests by setting my state file and my consensus file to be a character device, and everything worked fine because Tor just replaced them. I'm just wondering if there is some crazy Unix thing that might bite us here. But I guess this can only occur if our users specify a character device file themselves, so that's OK. -- Ticket URL: <https://troodi.torproject.org/projects/tor/ticket/19661#comment:6> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online _______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs