Re: slightly stricter check for genentropy_urandom

2014-06-25 Thread Theo de Raadt
> > Hello tech@, > > > > Here is a minor diff to do a little more strict checking on the device id > > for > > urandom. It would be a shame if someone replaced a genuine urandom with a > > /dev/null or some other predictable device. > > that's what the ioctl is for Actually, the ioctl does not

Re: slightly stricter check for genentropy_urandom

2014-06-25 Thread Damien Miller
On Wed, 25 Jun 2014, Martijn van Duren wrote: > Hello tech@, > > Here is a minor diff to do a little more strict checking on the device id for > urandom. It would be a shame if someone replaced a genuine urandom with a > /dev/null or some other predictable device. that's what the ioctl is for

Re: slightly stricter check for genentropy_urandom

2014-06-25 Thread Theo de Raadt
> On 06/25/14 21:15, Theo de Raadt wrote: > >> Here is a minor diff to do a little more strict checking on the device > >> id for urandom. It would be a shame if someone replaced a genuine > >> urandom with a /dev/null or some other predictable device. > >> > >> if a file is not special st_rdev wil

Re: slightly stricter check for genentropy_urandom

2014-06-25 Thread Martijn van Duren
On 06/25/14 21:15, Theo de Raadt wrote: Here is a minor diff to do a little more strict checking on the device id for urandom. It would be a shame if someone replaced a genuine urandom with a /dev/null or some other predictable device. if a file is not special st_rdev will be 0 so S_ISCHR isn'

Re: slightly stricter check for genentropy_urandom

2014-06-25 Thread Theo de Raadt
> Here is a minor diff to do a little more strict checking on the device > id for urandom. It would be a shame if someone replaced a genuine > urandom with a /dev/null or some other predictable device. > > if a file is not special st_rdev will be 0 so S_ISCHR isn't needed anymore. So you are tr

slightly stricter check for genentropy_urandom

2014-06-25 Thread Martijn van Duren
Hello tech@, Here is a minor diff to do a little more strict checking on the device id for urandom. It would be a shame if someone replaced a genuine urandom with a /dev/null or some other predictable device. if a file is not special st_rdev will be 0 so S_ISCHR isn't needed anymore. Sincere