Re: saa7134 and tvtime

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



Alan Cox (alan@xxxxxxxxxx):

> >   We now call:
> >   setuid( getuid() );
> 
> Be careful opening devices that way. Admins set permissions on rtc and
> video and expect them to be honoured

  That seems silly.  /dev/rtc is useless unless you can get > 64hz from
it, but it's also (annoyingly!) exclusive, one user only.  Seems like
alot of bother for me to honour premissions on the device when I'm just
going to be cruel and get higher resolution from it, and furthermore
require user to set up groups if they don't want people stealing it
away.

  But it does make sense I guess for /dev/video devices..  So, to avoid
being inconsistent I guess I'll do the 'right thing'.

> Also you want to do
> 
> 	if(setresuid(getuid(), getuid(), getuid())==-1)
> 		exit(1);
> 
> [clear real effective and saved user id]. Its basically the same thing
> but using stronger washing powder 8)

  Ok, thanks for the advice.  I'm not sure what error message to report
if that fails.  Will it return -1 under any consistent operating
conditions?

-- 
Billy Biggs
vektor@xxxxxxxxxxxx





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux