Ticket #633 (new defect)
Sometimes files are created by plugins as incorrect user
| Reported by: | tpalmieri | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | Unscheduled Tickets |
| Component: | Unknown | Version: | |
| Keywords: | Cc: |
Description
Although this cannot happen at Pion startup...an apparent "race condition" can happen afterwards, where some files created by plugins will not be owned by the configured user-to-run-as (e.g. pion), and will instead be owned by the start-up user (e.g. root).
Problem found on Linux...haven't tested other Unix platforms.
Current theory is that plugins are creating files within some threads while another thread has temporarily "elevated" privileges to root in order to perform some action (e.g. Sniffer). This is because seteuid() is affecting all threads...which is a consequence of POSIX compliance for Linux pthreads (which says that all threads in a process share a single uid/gid).
Linux provides setfsuid()...which might be sufficient for Sniffer/DSSL to be able to open network device nodes without changing effective uid. But, this is very unique to Linux...
