[augeas-devel] Weird print result with Perl bindings on amd64

Dominique Dumont dominique.dumont at hp.com
Mon Jan 12 13:33:36 UTC 2009


David Lutterkort <lutter at redhat.com> writes:

> Isn't the output for the perl example what a previous incarnation of the
> sshd lens produced ? 

I don't remember exactly, but it's possible. On the other hand, I
cannot find any other copy of sshd.aug on the 3 amd64 machines I've
tried.

> Are you absolutely sure you don't have AUGEAS_LENS_LIB set on your amd64
> box or an old lens in the default lens dir ? Might be worth stracing the
> perl command to see where it gets the sshd.aug lens from and
> double-checking that that's the version from 0.3.5.

Can't find anything weird with strace. sshd.aug is indeed loaded from
the correct location:

$  AUGEAS_ROOT=wr_root strace perl -MConfig::Augeas -e '$a=Config::Augeas::init(); $a->print(STDOUT,"");'  2>&1 |grep sshd
stat("/usr/share/augeas/lenses/sshd.aug", {st_mode=S_IFREG|0644, st_size=1823, ...}) = 0
open("/usr/share/augeas/lenses/sshd.aug", O_RDONLY) = 3
read(3, "(* /etc/sshd/sshd_config *)\nmodul"..., 8192) = 1823
stat("wr_root/etc/ssh/sshd_config", {st_mode=S_IFREG|0644, st_size=72, ...}) = 0
open("wr_root/etc/ssh/sshd_config", O_RDONLY) = 3
/augeas/files/etc/ssh/sshd_config
/augeas/files/etc/ssh/sshd_config/path = "/files/etc/ssh/sshd_config"
/augeas/files/etc/ssh/sshd_config/lens
/augeas/files/etc/ssh/sshd_config/lens/info = "/usr/share/augeas/lenses/sshd.aug:59.12-61.36"
/augeas/files/etc/ssh/sshd_config/lens/id = "0x19d5a20"
/files/etc/ssh/sshd_config
/files/etc/ssh/sshd_config/Match = "User bush Group pres.* Host white.house.*"
/files/etc/ssh/sshd_config/Banner = "/etc/welcome.txt"

and the lens does contains Match lens with sub-lenses:

$ cat /usr/share/augeas/lenses/sshd.aug
(* /etc/sshd/sshd_config *)
module Sshd =
   autoload xfm

[snip]

   let condition_entry =
    let value = store  /[^ \t\n]+/ in
    [ sep . key /[A-Za-z0-9]+/ . sep . value ]

   let match_cond =
     [ label "Condition" . condition_entry+ . eol ]

   let match_entry =
     ( comment | (Util.indent . other_entry) )

   let match =
     [ key "Match" . match_cond
        . [ label "Settings" .  match_entry+ ]
     ]

  let lns = (comment | accept_env | allow_groups | allow_users
          | deny_groups | subsystem | deny_users | macs
          | other_entry ) * . match*

  let xfm = transform lns (incl "/etc/ssh/sshd_config")

This may be a regression with augeas 0.3.5, I will check the behavior
with 0.3.4.

Free, do you still have the source package for augeas 0.3.4 ?  (it
will be easier for me to use deb package instead of building from
upstream tarball)

All the best

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner

irc:
  domidumont at irc.freenode.net
  ddumont at irc.debian.org




More information about the augeas-devel mailing list