minor patch to smbspool.c
Michael Sweet
mike at easysw.com
Fri Dec 21 04:12:03 GMT 2001
On Thursday 20 December 2001 06:11 pm, rick wrote:
> ...
> 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;
You could simplify the code by just doing:
username = argv[2];
since if the length is 0, you're still pointing at an empty string... ;)
> 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)
Yes, something like we do for the job title I'd guess. I'll whip up
an "official" patch against the current 2.2 CVS and post it...
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw.com
Printing Software for UNIX http://www.easysw.com
More information about the samba-technical
mailing list