Re: login_yubikey does not accept user.name

2012-04-05 Thread Björn Ketelaars
On Thu, Apr 5, 2012 at 6:51 AM, Otto Moerbeek o...@drijf.net wrote: That sounds like timing bases attacks to guess a username still will work. -Otto First thing I thought when reading your reply: absolute nonsense. With that mindset I really wanted to disprove your suggestion. For this

Re: login_yubikey does not accept user.name

2012-04-05 Thread Otto Moerbeek
On Thu, Apr 05, 2012 at 01:32:46PM +0200, Bj?rn Ketelaars wrote: On Thu, Apr 5, 2012 at 6:51 AM, Otto Moerbeek o...@drijf.net wrote: That sounds like timing bases attacks to guess a username still will work. -Otto First thing I thought when reading your reply: absolute nonsense.

Re: login_yubikey does not accept user.name

2012-04-04 Thread Björn Ketelaars
2012/4/3 Theo de Raadt dera...@cvs.openbsd.org: Hmm, I'd like to see that refactored somehow. Also, '-' should not be legal at the start of a login name. There are things that care. I think at the end it is OK, though. Crazy eh. Isn't there something else in libc that checks this? New

Re: login_yubikey does not accept user.name

2012-04-04 Thread David Gwynne
pretty confident a regex wont fly :) On 04/04/2012, at 11:34 PM, Bjvrn Ketelaars wrote: 2012/4/3 Theo de Raadt dera...@cvs.openbsd.org: Hmm, I'd like to see that refactored somehow. Also, '-' should not be legal at the start of a login name. There are things that care. I think at the end

Re: login_yubikey does not accept user.name

2012-04-04 Thread Stuart Henderson
On 2012/04/04 15:34, Bjvrn Ketelaars wrote: 2012/4/3 Theo de Raadt dera...@cvs.openbsd.org: Hmm, I'd like to see that refactored somehow. Also, '-' should not be legal at the start of a login name. There are things that care. I think at the end it is OK, though. Crazy eh. Isn't

Re: login_yubikey does not accept user.name

2012-04-04 Thread Björn Ketelaars
Why doesn't login_yubikey just use getpwnam() to check if the user exists like the other login_* mechs? Why make it simple if there are exciting pattern matching options like regexp or multiple if-statements ;-) Index: login_yubikey.c

Re: login_yubikey does not accept user.name

2012-04-04 Thread Todd C. Miller
Why do we care if the user exists? Ideally, you want the code to behave more or less the same whether the user is real or not. Otherwise, a remote attacker can guess valid usernames by timing a login attempt. For safety's sake, it makes sense to reject a username with a '/' in it since the

Re: login_yubikey does not accept user.name

2012-04-04 Thread Björn Ketelaars
2012/4/4 Todd C. Miller todd.mil...@courtesan.com: Why do we care if the user exists? Ideally, you want the code to behave more or less the same whether the user is real or not. Otherwise, a remote attacker can guess valid usernames by timing a login attempt. For safety's sake, it makes

Re: login_yubikey does not accept user.name

2012-04-04 Thread Otto Moerbeek
On Wed, Apr 04, 2012 at 09:43:35PM +0200, Bj?rn Ketelaars wrote: 2012/4/4 Todd C. Miller todd.mil...@courtesan.com: Why do we care if the user exists? Ideally, you want the code to behave more or less the same whether the user is real or not. Otherwise, a remote attacker can guess valid

Re: login_yubikey does not accept user.name

2012-04-01 Thread Björn Ketelaars
2012/4/1 Theo de Raadt dera...@cvs.openbsd.org: You should really re-do that so that the login name cannot start or end with a '.' Index: login_yubikey.c === RCS file: /cvs/src/libexec/login_yubikey/login_yubikey.c,v retrieving