[augeas-devel] augeas: master - Pam: allow '-' before type
David Lutterkort
lutter at fedoraproject.org
Tue Oct 20 13:54:37 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=49c35b31a6909961e35127e31b9865b834a68377
Commit: 49c35b31a6909961e35127e31b9865b834a68377
Parent: d642edfddd296ed4b2b3a4fcb4fdcced39564d4f
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Wed Oct 14 14:52:57 2009 -0400
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Tue Oct 20 15:53:43 2009 +0200
Pam: allow '-' before type
The type field in a pam.d file can start with a '-' to indicate that
missing the module should not cause an error. The '-' is now mapped into
the tree as a separate node 'optional'
Bug reported by Shannon Hughes
---
lenses/pam.aug | 1 +
lenses/tests/test_pam.aug | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lenses/pam.aug b/lenses/pam.aug
index ff1726a..c0bc045 100644
--- a/lenses/pam.aug
+++ b/lenses/pam.aug
@@ -27,6 +27,7 @@ module Pam =
Util.del_ws_spc . store word . eol ]
let record = [ seq "record" . indent .
+ [ label "optional" . del "-" "-" ]? .
[ label "type" . store types ] .
Util.del_ws_tab .
[ label "control" . store control] .
diff --git a/lenses/tests/test_pam.aug b/lenses/tests/test_pam.aug
index 0db4a92..e0abfcc 100644
--- a/lenses/tests/test_pam.aug
+++ b/lenses/tests/test_pam.aug
@@ -33,6 +33,14 @@ session optional pam_keyinit.so force revoke
test Pam.lns get "@include common-password\n" =
{ "include" = "common-password" }
+ test Pam.lns get "-password optional pam_gnome_keyring.so\n" =
+ { "1"
+ { "optional" }
+ { "type" = "password" }
+ { "control" = "optional" }
+ { "module" = "pam_gnome_keyring.so" }
+ }
+
(* Local Variables: *)
(* mode: caml *)
(* End: *)
More information about the augeas-devel
mailing list