[mythtv] [PATCH] Add option to mythfilldatabase to change user
William Uther
willu.mailingLists at cse.unsw.edu.au
Sat Apr 30 05:29:52 UTC 2005
On Sat, 30 Apr 2005 13:23:10 +1000, Hamish Moffatt
<hamish at cloud.net.au> wrote:
> On Sat, Apr 30, 2005 at 10:17:30AM +1000, William Uther wrote:
>> I run my backend as root. I recently switched from running
>> mythfilldatabase as a cron job to using the internal method... it
>> stopped working. The problem was that with filldb running as root, it
>> didn't have the correct home dir set, and so it couldn't find the
>> tv_grab_au prefs.
>>
>> Attached is a patch to add an option to mythfilldatabase that allows
>> it to switch users on startup. This has two effects:
>> - the home dir will be set correctly when it tries to get the
>> grabber
>> prefs
>> - the grabber script is no longer being run as root
>
> Why not run the backend as non-root instead?
Certainly an option. I didn't go that path because I hold out hope for
the real time threads feature. I did think about having a similar
option to drop privs early in mythbackend, just after the real-time
threads have been spawned. The patch I wrote solved my problem while
keeping changes localised - it looked like a much less invasive change.
Cheers,
Will :-}
--
Dr William Uther National ICT Australia
Phone: +61 2 9385 6357 Computer Science and Engineering
Email: willu at cse.unsw.edu.au University of New South Wales
Web: http://www.cse.unsw.edu.au/~willu/ Sydney, Australia
More information about the mythtv-dev
mailing list