mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-16 00:21:01 +00:00
add option to allow any user to log in
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@37769 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
32b475b93b
commit
306d7331e7
3 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2014-03-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
EcControl.m: Add option to allow any user to log in.
|
||||
|
||||
2014-03-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcConsole.m: Don't read from stdin whn in non-interactive mode
|
||||
|
|
|
@ -1967,6 +1967,14 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
|||
NSDictionary *info = [operators objectForKey: s];
|
||||
NSString *passwd = [info objectForKey: @"Password"];
|
||||
|
||||
if (nil == info)
|
||||
{
|
||||
/* If Operators.plist contains a user with an empty string as
|
||||
* a name, this will match any login attempt not already matched.
|
||||
*/
|
||||
info = [operators objectForKey: @""];
|
||||
passwd = [info objectForKey: @"Password"];
|
||||
}
|
||||
if (info == nil)
|
||||
{
|
||||
m = [NSString stringWithFormat:
|
||||
|
|
|
@ -6,4 +6,18 @@
|
|||
richard = {
|
||||
Password = richard;
|
||||
};
|
||||
|
||||
/* If the entry with no name exists, it will be used to allow login for
|
||||
* any username which doesn't exist in this file.
|
||||
*/
|
||||
"" = {
|
||||
Password = password;
|
||||
};
|
||||
|
||||
/* If Password is omitted or is empty, then any password is accepted
|
||||
* to allow the user to log in.
|
||||
*/
|
||||
guest = {
|
||||
Password = "";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue