Bug 86473
| Summary: | /usr/bin/smbprint incorrectly parses parameters | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Jan Ceuleers <jan.ceuleers> | ||||
| Component: | samba | Assignee: | Jay Fenlason <fenlason> | ||||
| Status: | CLOSED DEFERRED | QA Contact: | David Lawrence <dkl> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.2 | CC: | jfeeney | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2003-04-08 15:46:02 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 90699 [details]
smbprint file, with my proposed change made in line 49
Unfortunatly, I didn't remember this one in time for the latest errata. It will be in the next one, however. |
Description of problem: /usr/bin/smbprint derives the location of the spool directory from the last parameter passed to it (which is the acct file). It does this by means of \$$#, which works as long as $# expands to a single digit. On my system however, smbprint is called by LPRng with 22 parameters. This causes the above to expand to $22, which expands to <whatever is in $2>2 (i.e. a digit 2 appended to the value of $2). In order to avoid this braces are needed, as follows: \${$#} Version-Release number of selected component (if applicable): samba-2.2.7-2.7.2 LPRng-3.7.4-28.1 Linux version 2.4.18-27.7.x (bhcompile.redhat.com) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112)) #1 Fri Mar 14 05:51:48 EST 2003