[cups.bugs] [HIGH] STR #3831: Passwords longer than 8 characters does not work on Solaris
Joel Fredrikson
joel at it.uu.se
Fri Apr 15 07:31:33 PDT 2011
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
When using Digest or Basic authentication, password longer than 8
characters does not work on Solaris.
This is due to a limitation with the Solaris version of getpass() function
used in _cupsGetPassword() in cups/usersys.c.
>From the manpage
"Upon successful completion, getpass() returns a pointer to a
null-terminated string of at most 9 bytes that were read
from the terminal device."
The solution is to use the getpassphrase() function instead.
More from the manpage
"The getpassphrase() function is identical to getpass(),
except that it reads and returns a string of up to 257
characters in length."
Since getpassphrase() seems to be a Solarism, a simple
#if defined(__sun)
return (getpassphrase(prompt));
#else
return (getpass(prompt));
#endif
is probably enough.
Link: http://www.cups.org/str.php?L3831
Version: 1.4.6
More information about the cups-devel
mailing list