Bug 2217 - smbspool manpage DEVICE_URI paragraph is incorrect.
smbspool manpage DEVICE_URI paragraph is incorrect.
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Docs
3.0.10
All Linux
: P3 normal
: none
Assigned To: Jelmer Vernooij
Samba QA Contact
https://bugzilla.redhat.com/beta/show...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-06 10:08 UTC by Jay Fenlason - please log in and update your mail address here and let us enable Bugmails to you again, Jay
Modified: 2005-08-24 10:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Fenlason - please log in and update your mail address here and let us enable Bugmails to you again, Jay 2005-01-06 10:08:04 UTC
The URL points to the Red Hat bugzilla entry that got me started looking into 
this. 
 
The manual says 
"smbspool tries to get the URI from argv[0].  If  argv[0]  contains  the name  
of the program then it looks in the  DEVICE_URI environment variable." 
 
But source/client/smbspool.c does: 
  if (getenv("DEVICE_URI") != NULL)                                      
    strncpy(uri, getenv("DEVICE_URI"), sizeof(uri) - 1); 
  else if (strncmp(argv[0], "smb://", 6) == 0)           
    strncpy(uri, argv[0], sizeof(uri) - 1); 
 
So the manual should say 
"smbspool expects the URI of the printer to use to be passed in the DEVICE_URI 
environment variable.  If DEVICE_URI is not set in the enviroment, smbspool 
will look in argv[0] (normally the name of the program being run)." 
 
It should also mention "if argv[0] does not start with "smb://", but argv[1] 
does, smbspool assumes it is being called from a broken shell script and 
shifts argv[], forgetting argv[0], and moving all other arguments down one in 
the array." 
 
Of course all of this should be rewritten by someone who can actually write. 
:-)
Comment 1 Jelmer Vernooij 2005-01-17 08:03:59 UTC
Fixed in SVN. Thanks for reporting!
Comment 2 Gerald (Jerry) Carter 2005-08-24 10:21:00 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.