[augeas-devel] [PATCH] Group: Added disabled password support

David Lutterkort lutter at redhat.com
Fri Mar 12 01:30:25 UTC 2010


On Wed, 2010-03-10 at 08:46 +0100, fnerdwq at googlemail.com wrote:
> 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

Nice catch. And even with a test :)

Just committed and pushed this with one small change:

> --- 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_.-\!\*]*/

When '-' is the last character in a charset, it is taken literally, and
'\' in a character class is also a literal, it does not escape any
characters (thank POSIX for all that).

Your change added all characters from '.' to '\' to the character class,
plus '!', '\', and '*'. I changed the regexp to /[A-Za-z0-9_.!*-]*/

David





More information about the augeas-devel mailing list