klog -pipe does not allow spaces
Tino Schwarze
tino.schwarze at informatik.tu-chemnitz.de
Thu Jun 22 11:57:09 CEST 2000
Hi there,
a friend of mine recently figured out that klog -pipe does not accept
spaces within passwords. He hunted the problem down to the use of
scanf() in line 654 of klog.c.
As I not terribly familiar with getchar & Co, I tried the following:
1. use getchar and figure out end-of-line ourself
- might be non-portable? (weird EOL on some platforms)
2. do not use gets
3. use fgets
- reads until eol but stores eol in buffer
- mixing read/fread & co might create problems (is stdio used
anywhere else in klog?)
4. use scanf("%198c")
- reads beyond end-of-line -> reads too much
I think having a space in a password is not very usual but should be
supported.
Thank you in advance! Tino.
--
* LINUX - Where do you want to be tomorrow? *
More information about the Arla-drinkers
mailing list