mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-20 18:32:09 +00:00
Misread the docs, readpassphrase() will in fact set errno.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@39105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6c7e7055b9
commit
4ca4d42c6f
1 changed files with 2 additions and 7 deletions
|
@ -1076,19 +1076,14 @@ consoleCompleter(const char *text, int start, int end)
|
|||
/* read password (glibc documentation says not to use getpass?) */
|
||||
|
||||
line = getpass("Password: ");
|
||||
if (0 == line)
|
||||
{
|
||||
NSLog(@"Could not read password: %s", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
#else
|
||||
line = readpassphrase("Password: ", &buf[0], 128, RPP_ECHO_OFF);
|
||||
#endif
|
||||
if (NULL == line)
|
||||
{
|
||||
NSLog(@"Could not read password");
|
||||
NSLog(@"Could not read password: %s", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
p = [[NSString stringWithCString: line] stringByTrimmingSpaces];
|
||||
if ([p caseInsensitiveCompare: @"quit"] == NSOrderedSame)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue