Summary: | tl-config crashes when printing contents of a folder with trailing slash | ||
---|---|---|---|
Product: | ThinLinc | Reporter: | Linn <linma> |
Component: | Misc | Assignee: | Samuel Mannehed <samuel> |
Status: | CLOSED FIXED | ||
Severity: | Normal | CC: | adaha, emilo, samuel |
Priority: | P2 | Keywords: | adaha_tester, relnotes |
Version: | trunk | ||
Target Milestone: | 4.17.0 | ||
Hardware: | PC | ||
OS: | Unknown | ||
See Also: | https://bugzilla.cendio.com/show_bug.cgi?id=8369 | ||
Acceptance Criteria: |
MUST:
* Using tl-config with either a path ending with a slash, or a path not ending with a slash must work.
SHOULD:
* Any fixes to hiveconf should be pushed upstream.
COULD:
* The customer who suggested a solution could be notified that the fix will be included in the upcoming release.
|
Note that we must remember to push fixes to hiveconf upstream. > MUST: > * Using tl-config with either a path ending with a slash, or a path not ending with a slash must work. It works now. Tested build 3584 on Fedora 39. > SHOULD: > * Any fixes to hiveconf should be pushed upstream. https://github.com/astrand/hiveconf/pull/2 > COULD: > * The customer who suggested a solution could be notified that the fix will be included in the upcoming release. I sent him an email. Tested the following using 4.16.0 and build 3585 on RHEL 9: ======== Crashed on 4.16.0 and works on build 3585: > tl-config -a /vsm/ The following command crashed on both versions, but produces different tracebacks. 4.16.0: > tl-config -R -a /vsm/ > File "/opt/thinlinc/bin/../bin/hivetool", line 322, in <module> > main() > File "/opt/thinlinc/bin/../bin/hivetool", line 317, in main > print_walk(hive, foldername, recursive) > File "/opt/thinlinc/bin/../bin/hivetool", line 168, in print_walk > value = safe_string(value) > File "/opt/thinlinc/bin/../bin/hivetool", line 18, in safe_string > return s.encode(enc, errors="replace").decode(enc) > AttributeError: 'NoneType' object has no attribute 'encode' Build 3585: > tl-config -R -a /vsm/ > setup_completed = > vsm_server_port = 9000 > vsm_agent_port = 904 > vnc_port_base = 5900 > tunnel_bind_base = 4900 > tunnelslots_per_session = 10 > Traceback (most recent call last): > File "/opt/thinlinc/bin/../bin/hivetool", line 583, in <module> > main() > File "/opt/thinlinc/bin/../bin/hivetool", line 578, in main > print_walk(hive, foldername, options.recursive) > File "/opt/thinlinc/bin/../bin/hivetool", line 149, in print_walk > section = folder.sectionname > AttributeError: 'NoneType' object has no attribute 'sectionname' Seems like a fix is needed in the recursive walking step. Re-opening this bug as the first AC is not satisfied. Fixed now. The latest fix was also sent upstream: https://github.com/astrand/hiveconf/pull/3 Tested the fix, things work as intended now: > tl-config -Ra /vsm/ > setup_completed = > vsm_server_port = 9000 > vsm_agent_port = 904 > vnc_port_base = 5900 > tunnel_bind_base = 4900 > tunnelslots_per_session = 10 > tunnelservices/ > serial = 1 > serial2 = 2 > lpd = 3 > nfs = 4 > pulseaudio = 5 > smartcard = 6 > MUST: > ✅ Using tl-config with either a path ending with a slash, or a path not > ending with a slash must work. > > SHOULD: > ✅ Any fixes to hiveconf should be pushed upstream. > > COULD: > ✅ The customer who suggested a solution could be notified that the fix > will be included in the upcoming release. Closing as all ACs are met. |
This is a regression from 4.13.0, 'tl-config -a /vsm/' works in 4.12.1 but after the Python3 conversion: > [cendio@lab-87 ~]$ /opt/thinlinc/bin/tl-config -a /vsm/ > Traceback (most recent call last): > File "/opt/thinlinc/bin/../bin/hivetool", line 309, in <module> > main() > File "/opt/thinlinc/bin/../bin/hivetool", line 304, in main > print_walk(hive, foldername, recursive) > File "/opt/thinlinc/bin/../bin/hivetool", line 165, in print_walk > value = safe_string(value) > File "/opt/thinlinc/bin/../bin/hivetool", line 18, in safe_string > return s.encode(enc, errors="replace").decode(enc) > AttributeError: 'NoneType' object has no attribute 'encode' This commit looks suspicious: r37284