Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pam.conf not parsing #133

Open
nanliu opened this issue Aug 5, 2014 · 2 comments
Open

pam.conf not parsing #133

nanliu opened this issue Aug 5, 2014 · 2 comments

Comments

@nanliu
Copy link

nanliu commented Aug 5, 2014

I tried to manage pam.conf on solaris and the provider seems really confused about what lns to use:

Error: /Stage[main]/Ldap::Config/Pam[login pam_ldap.so.1]: Could not evaluate: Augeas didn't load /etc/pam.conf with pam.lns from /var/opt/lib/pe-puppet/lib/augeas/lenses: Iterated lens matched less than it should (line:19, character:0)

If I force pam provider to use the pamconf.lns it will work, but clearly breaks pam.d

lens do
  'pamconf.lns'
end

After further debugging resource is nil and does not appear to be passed in:

  lens do |resource|
    target(resource) == '/etc/pam.conf' ? 'pamconf.lns' : 'pam.lns'
  end

I'm able to trace the call, but unclear if lens is initialized correctly since resource is always nil, and I'm expecting to have some data so target(resource) will match '/etc/pam.conf', but that never seems to happen.

@nanliu
Copy link
Author

nanliu commented Aug 6, 2014

The code for detecting resource_path is also failing when I switch the lens to pamconf.lns:

/augeas/files/etc/pam.conf/error/message = Failed to match
    { /service/ = /[.0-9A-Z_a-z-]+/ }{ /optional/ }?{ /type/ = /auth|session|account|password/ }{ /control/ = /\\[[^]\001-\004\n#]*\\]|[^\001-\004\t [][^\001-\004\t ]*/ }{ /module/ = /[^\001-\004\t\n #]+/ }{ /argument/ = /[^\001-\004\t\n #]+/ }*({ /#comment/ = /[^\001-\004\t\n\r ][^\001-\004\n]*[^\001-\004\t\n\r ]|[^\001-\004\t\n\r ]/ } | ())
  with tree
    { "type" = "auth" } { "control" = "required" } { "module" = "pam_ldap.so.1" }

@raphink
Copy link
Member

raphink commented Nov 17, 2014

Can you get your file through augcheck to see if Augeas is able to parse it, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants