Bug 86473 - /usr/bin/smbprint incorrectly parses parameters
/usr/bin/smbprint incorrectly parses parameters
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: samba (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-23 07:07 EST by Jan Ceuleers
Modified: 2014-08-31 19:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-08 11:46:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
smbprint file, with my proposed change made in line 49 (2.24 KB, text/plain)
2003-03-23 07:19 EST, Jan Ceuleers
no flags Details

  None (edit)
Description Jan Ceuleers 2003-03-23 07:07:44 EST
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@stripples.devel.redhat.com) (gcc version 
2.96 20000731 (Red Hat Linux 7.3 2.96-112)) #1 Fri Mar 14 05:51:48 EST 2003
Comment 1 Jan Ceuleers 2003-03-23 07:19:18 EST
Created attachment 90699 [details]
smbprint file, with my proposed change made in line 49
Comment 2 Jay Fenlason 2003-04-08 11:46:02 EDT
Unfortunatly, I didn't remember this one in time for the latest errata.  It will
be in the next one, however.

Note You need to log in before you can comment on or make changes to this bug.