Univention Bugzilla – Bug 48947
Adding a Printer with multi-worded location fails
Last modified: 2022-07-26 22:49:13 CEST
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
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
QA: Please also check that Bug #49296 has been fixed along with this.
OK: command is quoted OK: (Bug #49296) Deleting/Overwriting of files does not work OK: YAML -> verified
<http://errata.software-univention.de/ucs/4.4/71.html>