/usr/share/augeas/lenses/dist/aliases.aug does not parse valid /etc/aliases file

Bug #838010 reported by Jean-Luc Geering
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
augeas (Ubuntu)
Fix Released
Low
Raphaël Pinson

Bug Description

$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

---

$ apt-cache policy augeas-lenses
augeas-lenses:
  Installed: 0.8.0-0ubuntu4
  Candidate: 0.8.0-0ubuntu4
  Version table:
 *** 0.8.0-0ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status

---

according to man aliases the value of an alias can also be a command:

|command or "|exit 67"

when /etc/aliases contains a line like

somebody: |exit

augeas can parse it:

augtool> print /augeas/files/etc/aliases/
/augeas/files/etc/aliases
/augeas/files/etc/aliases/path = "/files/etc/aliases"
/augeas/files/etc/aliases/mtime = "1314790471"
/augeas/files/etc/aliases/lens = "@Aliases"
/augeas/files/etc/aliases/lens/info = "/usr/share/augeas/lenses/dist/aliases.aug:21.12-.38:"

when the command is enclosed between double quotes, such as this

somebody: "|exit 67"

parsing fails:

augtool> print /augeas/files/etc/aliases/
/augeas/files/etc/aliases
/augeas/files/etc/aliases/path = "/files/etc/aliases"
/augeas/files/etc/aliases/mtime = "1314790678"
/augeas/files/etc/aliases/lens = "@Aliases"
/augeas/files/etc/aliases/lens/info = "/usr/share/augeas/lenses/dist/aliases.aug:21.12-.38:"
/augeas/files/etc/aliases/error = "parse_failed"
/augeas/files/etc/aliases/error/pos = "1619"
/augeas/files/etc/aliases/error/line = "9"
/augeas/files/etc/aliases/error/char = "0"
/augeas/files/etc/aliases/error/lens = "/usr/share/augeas/lenses/dist/aliases.aug:21.12-.38:"
/augeas/files/etc/aliases/error/message = "Iterated lens matched less than it should"

Revision history for this message
James Page (james-page) wrote :

the quoting is required for commands that contain special characters such as whitespace.

It looks like augeas is not parsing that type of command correctly.

Marking as 'Confirmed' as I was able to reproduce with importance 'Low'.

Changed in augeas (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Chuck Short (zulcss) wrote :
Revision history for this message
Raphaël Pinson (raphink) wrote :

This was fixed upstream. I will make a patch in precise.

Revision history for this message
Raphaël Pinson (raphink) wrote :

Uploaded to precise:

 augeas (0.10.0-0ubuntu3) precise; urgency=low
 .
   * Add LP838010_sudoers.patch to (LP: #838010).

Changed in augeas (Ubuntu):
assignee: nobody → Raphaël Pinson (raphink)
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package augeas - 0.10.0-0ubuntu3

---------------
augeas (0.10.0-0ubuntu3) precise; urgency=low

  * Add LP838010_sudoers.patch to (LP: #838010).
 -- Raphael Pinson <email address hidden> Sun, 18 Dec 2011 21:51:39 +0100

Changed in augeas (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Iain Lane (laney) wrote :

Could you please make your changelog entries more descriptive? I had to drill down to this bug to find out what you were patching in this and the previous upload. Also patch headers would be useful.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.