Opened 18 years ago

Closed 14 years ago

#2536 closed defect (wontfix)

Realtime priority not enabled w/ realtime module (or bad log message)

Reported by: rob+mythtv.org@… Owned by: danielk
Priority: trivial Milestone: unknown
Component: MythTV - General Version: head
Severity: low Keywords:
Cc: sandeen-mythtv@… Ticket locked: no

Description

I have the realtime module loaded with rights granted to a group the user mythtv runs as. However, I find the following message in my mythfrontend logs

Realtime priority would require SUID as root

It worked with svn head from several months ago.

Change History (7)

comment:1 Changed 18 years ago by danielk

Owner: changed from Isaac Richards to danielk
Priority: minortrivial
Severity: mediumlow

The error message is no longer correct for modern Linux setups.

comment:2 Changed 17 years ago by sandeen-mythtv@…

Cc: sandeen-mythtv@… added

I have the same issue, and a bit more info:

2006-12-19 19:42:05.497 user: 500 effective user: 0 before privileged thread 2006-12-19 19:42:05.514 user: 500 effective user: 0 after privileged thread 2006-12-19 19:42:05.514 user: 500 effective user: 500 run_priv_thread

for some reason the created pthread has the real UID instead of the EUID.

A very quick testcase sorta like this:

printf("main: uid %d euid %d\n", getuid(), geteuid()); rc = pthread_create(&thread_id, NULL, thread_main, NULL);

and in the new thread:

printf("thread: uid %d euid %d\n", getuid(), geteuid());

seems to work:

main: uid 500 euid 0 thread: uid 500 euid 0

Odd...

comment:3 Changed 17 years ago by sandeen-mythtv@…

Oh should have checked this first :)

It's the main thread dropping privs that does it - the sub-thread inherits the privs when the main thread drops it.

If the main thread does this:

rc = pthread_create(&thread_id, NULL, thread_main, NULL); sleep(2); setuid(getuid()); sleep(2);

and the sub-thread does this:

printf("thread: uid %d euid %d\n", getuid(), geteuid()); sleep(3); printf("thread: uid %d euid %d\n", getuid(), geteuid());

then I get:

main: uid 500 euid 0 thread: uid 500 euid 0 thread: uid 500 euid 500

guess I need to read up on how pthreads work... not sure you can use them this way?

comment:4 Changed 17 years ago by me again

hmm FWIW using rlimits on FC6 works. Sorry, probably should not have put SUID related bugs into this rt module tracker... let me know if you'd like me to file a new bug on the SUID problem.

comment:5 Changed 15 years ago by Dibblah

Status: newassigned

comment:6 Changed 15 years ago by stuartm

Component: mythtvMythTV - General

comment:7 Changed 14 years ago by danielk

Resolution: wontfix
Status: assignedclosed

The message doesn't reflect current reality wrt enabling to real-time, but it still works... marking as won't fix without a ready to go patch.

Note: See TracTickets for help on using tickets.