reading /etc/mailname beyond the first newline can be suboptimal

Bug #932515 reported by Paul Collins
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Haw Loeung

Bug Description

We like to provide hints to our sysadmins when files are being handled by the configuration management system. The files have their w bits unset, and a warning header is included.

/etc/mailname presented an interesting case - no problem setting it "a-w", but it is specified to contain the system's e-mail domain as the first line. We figured that since the postfix package's scripts only read the first line, we could get away with *appending* the warning header. Unfortunately for us, bzr reads the entire file, which results in e.g.

    pjdc@zucchini:~$ bzr whoami
    Paul Collins <<email address hidden>
    #
    # m
    # mmmm m m mmmm mmmm mmm mm#mm
    # #" "# # # #" "# #" "# #" # #
    # # # # # # # # # #"""" #
    # ##m#" "mm"# ##m#" ##m#" "#mm" "mm
    # # # #
    # " " "
    # This file is managed by puppet. Do not make local changes.>
    pjdc@zucchini:~$ _

(The first few lines are a chunk of ASCII art that says "puppet", if it's coming across as gibberish.)

So it would be helpful to us if bzr were to stop reading /etc/mailname when it encounters a newline.

Related branches

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 932515] [NEW] reading /etc/mailname beyond the first newline can be suboptimal

sorry that bit you.

istr other programs count on the file being only the domain and
nothing else, but bzr isn't really gaining anything by not stopping at
the first newline.

  status confirmed
  importance medium
  tags easy mail configuration affects-canonical-is

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Haw Loeung (hloeung)
Changed in bzr:
status: Confirmed → Fix Committed
Martin Packman (gz)
Changed in bzr:
assignee: nobody → Haw Loeung (hloeung)
milestone: none → 2.6b3
status: Fix Committed → Fix Released
Vincent Ladeuil (vila)
Changed in bzr:
milestone: 2.6b3 → 2.6.0
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.