minor patch to smbspool.c
rick
rickf at npgco.com
Thu Dec 20 15:12:09 GMT 2001
Under a network using win9x printers where the printer does not require a
username/password to connect, any jobs sent to the win9x print spool shows
as
document status owner progress started at
untitled xxxk/xxxk mm/dd/yy hh:mm:ss
when there are a lot of jobs and a user decides to cancel, it is nearly
impossible to cancel the correct job. The use instructions for smbspool
recommend:
smbspool smb://server/spooler title user comment copies options filename
by modifying the smbspool.c program slightly, it is possible to send the
"user" field from the command line if a username or username/password is not
specified in the printer address.
I have tried this change and gotten the desired results
***************
*** 152,158 ****
}
else
{
! username = "";
password = "";
server = uri + 6;
}
--- 152,162 ----
}
else
{
! if (strlen(argv[2]) > 0) {
! username = argv[2];
! }
! else
! username = "";
password = "";
server = uri + 6;
It may be desirable to perform more security checks on the argv[2] option
before using it (more than just ensuring there is something there - possibly
only pull the first 8-16 characters, etc)
Is this an option that other users would find useful?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
More information about the samba-technical
mailing list