Bug 48947 - Adding a Printer with multi-worded location fails
Adding a Printer with multi-worded location fails
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Printers
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Florian Best
Johannes Keiser
:
Depends on:
Blocks: 51196 54994
  Show dependency treegraph
 
Reported: 2019-03-11 11:47 CET by Christian Völker
Modified: 2022-07-26 22:49 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Völker univentionstaff 2019-03-11 11:47:27 CET
Tried in @school:
Added a new printer in school OU through schoolmaster UMC.

Entered a multi-worded location i.e. "printer in room1"
The resulting lpadmin comman gives an error as the location is not escaped:

Mar 11 11:45:26 schooledu univention-cups-init[6432]: The command "/usr/sbin/lpadmin -u allow:all -o auth-info-required=none -p KyoceraFS1030D -D Tja... -L printer in room1 -m foomatic-rip/Kyocera-FS-1030D-gutenprint-ijs-simplified.5.2.ppd -v ipp://drucker.schulen.ucs -E -h localhost" returned 1

Note: "printer in room1" missing hyphens in command. Thus, lpadmin treads "in" as command end gives error.

Manually executing the command shows error:
root@school:~# /usr/sbin/lpadmin -u allow:all -o auth-info-required=none -p KyoceraFS1030D -D Tja... -L printer in room1 -m foomatic-rip/Kyocera-FS-1030D-gutenprint-ijs-simplified.5.2.ppd -v ipp://drucker.schulen.ucs -E -h localhost
lpadmin: unknown argument "in".
root@school:~# echo $?
1


Setting it in hypens and it works:
root@school:~# /usr/sbin/lpadmin -u allow:all -o auth-info-required=none -p KyoceraFS1030D -D Tja... -L "printer in room1" -m foomatic-rip/Kyocera-FS-1030D-gutenprint-ijs-simplified.5.2.ppd -v ipp://drucker.schulen.ucs -E -h localhost
root@school:~# echo $?
0
Comment 1 Florian Best univentionstaff 2019-04-15 15:53:15 CEST
The quoting of arguments has been fixed.
I added a test case 53_samba-common/38_printer_special_chars but unfortionately it is still failing. Having a printer containing a space works in general, printing with "lp" works immediately but when I try to print via samba it somehow sometimes takes ages or isn't printed at all. I will either skip the test or improove it the next days. Doing things manually works.

univention-printserver.yaml
7aa614c6c2e0 | YAML Bug #48947

ucs-test (9.0.2-32)
a0a3c0a72a98 | Bug #48947: add 53_samba-common/38_printer_special_chars
40c8bd124ac3 | Bug #48947: fixes in 53_samba-common/38_printer_special_chars

univention-printserver (12.0.1-12)
f1cf0934735f | Bug #48947: printer names now may contain spaces
7487f6be8d7f | Bug #48947: fix typo in last commit
Comment 2 Arvid Requate univentionstaff 2019-04-16 21:04:54 CEST
QA: Please also check that Bug #49296 has been fixed along with this.
Comment 3 Johannes Keiser univentionstaff 2019-05-02 10:38:13 CEST
OK: command is quoted
OK: (Bug #49296) Deleting/Overwriting of files does not work
OK: YAML
-> verified
Comment 4 Arvid Requate univentionstaff 2019-05-02 13:22:14 CEST
<http://errata.software-univention.de/ucs/4.4/71.html>