[BUG] check terminal access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29 Apr 2007 Klaus Schmidinger <Klaus.Schmidinger@xxxxxxxxxx> wrote:
> On 04/07/07 15:05, Stefan Huelswitt wrote:
>> Hi,
>> I think there is a bug in the RW access check for a terminal
>> given with commandline option -t.
>> The check is performed before VDR actualy switches his uid, so if
>> the user which starts VDR has access rights and the effective
>> vdr user doesn't have, the check is useless.
>> In addition VDR should check the return value of freopen() when
>> claiming the terminal later on.
>> 
>> The current code segfaults on the first terminal access (e.g.
>> printf), if the effective vdr user doesn't have sufficient
>> rights.
> 
> Can you please provide a tested patch against version 1.4.6 for this?

Sorry, I didn't care to patch the issue until now. Once you know
the effect it can easily be avoided.

I think the best is to move all the access checks (terminal,
configdir) out of the options loop and place them after the uid
switch. Checking the freopen() is trivia.

Regards.

-- 
Stefan Huelswitt
s.huelswitt@xxxxxx  | http://www.muempf.de/


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux