reading /etc/mailname beyond the first newline can be suboptimal
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@
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@
(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
- Jelmer Vernooij (community): Approve
- Haw Loeung: Pending requested
-
Diff: 107 lines (+42/-9)3 files modifiedbzrlib/config.py (+3/-3)
bzrlib/tests/test_config.py (+35/-4)
doc/en/release-notes/bzr-2.6.txt (+4/-2)
Changed in bzr: | |
status: | Confirmed → Fix Committed |
Changed in bzr: | |
assignee: | nobody → Haw Loeung (hloeung) |
milestone: | none → 2.6b3 |
status: | Fix Committed → Fix Released |
Changed in bzr: | |
milestone: | 2.6b3 → 2.6.0 |
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 canonical- is
importance medium
tags easy mail configuration affects-