[augeas-devel] Matching [argument=""] with a regular expression

Ed ed.sealing at gmail.com
Thu Feb 18 15:31:51 UTC 2010


Does augeas currently support regular expression matching inside of
argument string matching?

The example I'm trying to use is matching
/files/etc/pam.d/system-auth/*[argument="lcredit=-1"] (where -1 is can
be any digit).
The matching literal characters works:

#augtool> match /files/etc/pam.d/system-auth/*[argument="lcredit=-1"]
/files/etc/pam.d/system-auth/8 = (none)

but not with using a *:
augtool> match /files/etc/pam.d/system-auth/*[argument="lcredit=*"]
 (no matches)

Here is the system-auth module I'm looking at:

augtool> ls /files/etc/pam.d/system-auth/*[module='pam_cracklib.so'][type='password']
type = password
control = requisite
module = pam_cracklib.so
argument[1] = try_first_pass
argument[2] = retry=5
argument[3] = maxrepeats=3
argument[4] = lcredit=-1
argument[5] = ucredit=-1
argument[6] = dcredit=-1
argument[7] = ocredit=-1
augtool>




More information about the augeas-devel mailing list