Author: rfm
Date: Wed Mar 26 10:38:34 2014
New Revision: 37769
URL: http://svn.gna.org/viewcvs/gnustep?rev=37769&view=rev
Log:
add option to allow any user to log in
Modified:
libs/ec/trunk/ChangeLog
libs/ec/trunk/EcControl.m
libs/ec/trunk/Operators.plist
Modified: libs/ec/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/ChangeLog?rev=37769&r1=37768&r2=37769&view=diff
==============================================================================
--- libs/ec/trunk/ChangeLog (original)
+++ libs/ec/trunk/ChangeLog Wed Mar 26 10:38:34 2014
@@ -1,3 +1,7 @@
+2014-03-26 Richard Frith-Macdonald <[email protected]>
+
+ EcControl.m: Add option to allow any user to log in.
+
2014-03-25 Richard Frith-Macdonald <[email protected]>
* EcConsole.m: Don't read from stdin whn in non-interactive mode
Modified: libs/ec/trunk/EcControl.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcControl.m?rev=37769&r1=37768&r2=37769&view=diff
==============================================================================
--- libs/ec/trunk/EcControl.m (original)
+++ libs/ec/trunk/EcControl.m Wed Mar 26 10:38:34 2014
@@ -1967,6 +1967,14 @@
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:
Modified: libs/ec/trunk/Operators.plist
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/Operators.plist?rev=37769&r1=37768&r2=37769&view=diff
==============================================================================
--- libs/ec/trunk/Operators.plist (original)
+++ libs/ec/trunk/Operators.plist Wed Mar 26 10:38:34 2014
@@ -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 = "";
+ };
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs