lightdm.conf boolean values false if have trailing whitespace

Bug #1507033 reported by Daniel E. Shub
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Medium
Robert Ancell
1.10
Fix Committed
Medium
Unassigned
1.14
Fix Released
Medium
Robert Ancell
1.16
Fix Released
Medium
Robert Ancell
1.2
Fix Committed
Medium
Unassigned
lightdm (Ubuntu)
Fix Released
Medium
Robert Ancell
Trusty
Fix Released
Medium
Robert Ancell
Vivid
Fix Released
Medium
Robert Ancell
Wily
Fix Released
Medium
Robert Ancell

Bug Description

[Impact]
Adding trailing whitespace to a boolean true value in LightDM configuration has it read as false.

[Test Case]
1. Set a boolean configuration value in lightdm.conf to true_ (_ is a space character)
2. Run LightDM

Expected result:
The configured value is interpreted as true.

Observed result:
The configured value is interpreted as false.

[Regression potential]
Low. We just strip trailing whitespace when checking for the value "true".

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Yeah, we should definitely be ignoring whitespace.

Changed in lightdm:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Turns out this is the behaviour of the upstream value parser:
https://bugzilla.gnome.org/show_bug.cgi?id=664740

I'll look at proposing a fix upstream but will also consider LightDM parsing the values directly to avoid this issue.

Revision history for this message
Daniel E. Shub (daniel-e-shub) wrote :

It looks like this behavior is intentional. In GLIB 2.6 (http://www.gtk.org/api/2.6/glib/glib-Key-value-file-parser.html) the documentation said "To preserve initial and final spaces, these can also be escaped as \s" while the current stable version says (https://developer.gnome.org/glib/stable/glib-Key-value-file-parser.html) "To preserve leading spaces in values, these can also be escaped as \s." The comment on the upstream bug report (https://bugzilla.gnome.org/show_bug.cgi?id=664740#c1) suggests they want to preserve trailing spaces in string values.

Changed in lightdm:
milestone: none → 1.17.0
status: Triaged → Fix Committed
Changed in lightdm:
status: Fix Committed → Fix Released
affects: ubuntu → lightdm (Ubuntu)
Changed in lightdm (Ubuntu):
status: New → Fix Released
Changed in lightdm (Ubuntu Vivid):
status: New → Triaged
importance: Undecided → Medium
Changed in lightdm (Ubuntu):
importance: Undecided → Medium
summary: - lightdm.conf is sensitive to trailing whitespace
+ lightdm.conf boolean values false if have trailing whitespace
description: updated
Changed in lightdm (Ubuntu Vivid):
status: Triaged → In Progress
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu Wily):
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted lightdm into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.16.5-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Daniel, or anyone else affected,

Accepted lightdm into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.14.3-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lightdm (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-done
removed: verification-needed
tags: added: verification-done-vivid
removed: verification-done
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Confirmed in both vivid and wily by setting:

[XDMCPServer]
enabled_=_true_

Where _ is a space. The XDMCP server correctly enables.

tags: added: verification-done-wily
Changed in lightdm (Ubuntu Wily):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.16.5-0ubuntu1

---------------
lightdm (1.16.5-0ubuntu1) wily; urgency=medium

  * New upstream release:
    - Handle trailing whitespace on boolean values in configuration.
      (LP: #1507033)
    - Add a backup-logs option that can be used to disable existing logging
      files having a .old suffix added to them.
    - Add LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and
      LC_IDENTIFICATION variables to the list of inherited locale variables.
      (LP: #1511259)
    - Implement XDMCP ForwardQuery. (LP: #1511545)
    - Fix small memory leak in XDMCP logging code.
    - Check the version of the X server we are running so we correctly pass
      -listen tcp when required. (LP: #1449282)

 -- Robert Ancell <email address hidden> Tue, 03 Nov 2015 16:47:08 +1300

Changed in lightdm (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for lightdm has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted lightdm into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.10.6-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lightdm (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Mathew Hodson (mhodson)
Changed in lightdm (Ubuntu Trusty):
importance: Undecided → Medium
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Confirmed in trusty by setting:

[XDMCPServer]
enabled_=_true_

Where _ is a space. The XDMCP server correctly enables.

tags: added: verification-done-trusty
removed: verification-needed
Changed in lightdm (Ubuntu Trusty):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm:
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.10.6-0ubuntu1

---------------
lightdm (1.10.6-0ubuntu1) trusty; urgency=medium

  * New upstream release:
    - Handle trailing whitespace on boolean values in configuration.
      (LP: #1507033)
    - Use libaudit to generate audit events.
    - Fix apparmor profiles for running Chromium in guest sessions.
      (LP: #1504049)
    - Add LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and
      LC_IDENTIFICATION variables to the list of inherited locale variables.
      (LP: #1511259)
    - Add a backup-logs option that can be used to disable existing logging
      files having a .old suffix added to them.
    - Check the version of the X server we are running so we correctly pass
      -listen tcp when required. (LP: #1449282)
    - Use IP address of XDMCP requests to contact X server if available.
      (LP: #1481561)
    - Implement XDMCP ForwardQuery. (LP: #1511545)
    - Add an option for XDMCP and VNC servers to only listen on one address.
      (LP: #1390808)
    - Don't start LightDM if the XDMCP server is configured with a key that
      doesn't exist. (LP: #1517685)
    - Add IP addresses to XDMCP log messages.
    - Refactor XDMCP error handling.
    - Fix small memory leak in XDMCP logging code.
    - Fix typo in dm-tool man page. (LP: #1470587)
    - Use new Xmir binary when running X under Unity System Compositor.
    - Fix all the things that prevent clang (3.5) from building LightDM with
      -Werror.
    - Add more tests.

 -- Robert Ancell <email address hidden> Fri, 20 Nov 2015 16:07:50 +1300

Changed in lightdm (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.14.4-0ubuntu1

---------------
lightdm (1.14.4-0ubuntu1) vivid; urgency=medium

  * New upstream release:
    - Handle XDMCP Request packet with no addresses. (LP: #1516831)
    - Don't start LightDM if the XDMCP server is configured with a key that
      doesn't exist. (LP: #1517685)
    - Add IP addresses to XDMCP log messages.
    - Refactor XDMCP error handling.
    - Add more tests.

 -- Robert Ancell <email address hidden> Fri, 20 Nov 2015 16:01:15 +1300

Changed in lightdm (Ubuntu Vivid):
status: Fix Committed → Fix Released
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.