[augeas-devel] [PATCH] Group: Added disabled password support
fnerdwq at googlemail.com
fnerdwq at googlemail.com
Wed Mar 10 07:46:15 UTC 2010
From: root <root at lx200.costest.lrz.de>
* lenses/group.aug: '*' and '!' are allowed chars for disabled password
* lenses/tests/test_group.aug: added test for lens change
---
lenses/group.aug | 2 +-
lenses/tests/test_group.aug | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/lenses/group.aug b/lenses/group.aug
index 3f505f7..65dccd1 100644
--- a/lenses/group.aug
+++ b/lenses/group.aug
@@ -23,7 +23,7 @@ let comma = Sep.comma
let sto_to_spc = store Rx.space_in
let word = Rx.word
-let password = /[A-Za-z0-9_.-]*/
+let password = /[A-Za-z0-9_.-\!\*]*/
let integer = Rx.integer
(************************************************************************
diff --git a/lenses/tests/test_group.aug b/lenses/tests/test_group.aug
index efd68c6..5de0ff9 100644
--- a/lenses/tests/test_group.aug
+++ b/lenses/tests/test_group.aug
@@ -25,3 +25,16 @@ test Group.lns get "root::0:root\n" =
{ "password" = "" }
{ "gid" = "0" }
{ "user" = "root" } }
+
+(* Password field can be disabled by ! or * *)
+test Group.lns get "testgrp:!:0:testusr\n" =
+ { "testgrp"
+ { "password" = "!" }
+ { "gid" = "0" }
+ { "user" = "testusr" } }
+
+test Group.lns get "testgrp:*:0:testusr\n" =
+ { "testgrp"
+ { "password" = "*" }
+ { "gid" = "0" }
+ { "user" = "testusr" } }
--
1.6.0.2
More information about the augeas-devel
mailing list