[LinuxCNC/linuxcnc PR#276] uspace: get rid of runtime setuid use

未分类 bolang 4个月前 (10-15) 24次浏览

Issue #276 | 状态: 已关闭 | 作者: jepler | 创建时间: 2017-05-23


Now we return to something like the status quo ante in 2.7:
filesystem operations are done as the user, but the real and
effective user IDs are always root when running in realtime.

The rtapidoas_root API has been deleted, but it was never
documented and never in a released version.

This is unfortunate but necessary since calling setreuid() causes
loss of realtime on PREEMPT_RT and hard locks in RTAI.

I verified this to still work with PCI and ethernet hostmot2 cards
on Debian Jessie, which covers most of the in-tree places where
the “as root” functions were used. Furthermore, I verified
(using a non-commited, interactive test) that rtapispawnas_root
still spawns with EUID=RUID=0 even though they are now nothing
more than wrappers that directly call posix_spawn.

Finally, I verified that the RTAI hard locks were resolved.

I was uanble to duplicate the report of missed realtime deadlines
when starting halscope on preempt-rt after thread creation,
testing with 4.9.0-0.bpo.2-rt-amd64 on Debian Jessie.

Signed-off-by: Jeff Epler

原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/276

喜欢 (0)