[systemd-bugs] [Bug 59311] New: hostnamectl doesn't allow apostrophes in pretty hostname

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jan 13 00:33:33 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=59311

          Priority: medium
            Bug ID: 59311
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: hostnamectl doesn't allow apostrophes in pretty
                    hostname
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: philippuryear at gmail.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Overview:
hostnamectl set-hostname rejects pretty hostnames which contain apostrophes,
despite the example in hostnamectl's manpage ("Lennart's Laptop") containing an
apostrophe.

Steps to Reproduce:
# hostnamectl set-hostname --pretty "Phil's Laptop"

Actual Results:
The error "Failed to issue method call: Invalid argument" is printed.

Expected Results:
No error; /etc/machine-info should contain the supplied pretty name.

Build Date & Platform:
systemd-196, Arch Linux

Additional Information:
I believe this occurs because systemd-hostnamed calls string_is_safe() on the
new pretty hostname (hostnamed.c:554), which rejects apostrophes (along with
backslashes and double quotes) (util.c:5562).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130113/7dd5db97/attachment.html>


More information about the systemd-bugs mailing list