Ticket #633 (new defect)

Opened 9 months ago

Last modified 5 months ago

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...

Change History

Changed 5 months ago by mdickey

  • milestone changed from New Tickets to Unscheduled Tickets

This appears to be caused by concurrency issues involving the permission switching, and the issue of not being able to change these per-thread -- only per-process.

Note: See TracTickets for help on using tickets.