Bug? in v3-0-test, printing/printing.c:print_job_start(), line 2399 ~ 2403, job's user name will be in lowercase.

Jeremy Allison jra at samba.org
Thu Apr 10 04:43:12 GMT 2008


On Wed, Apr 09, 2008 at 10:18:30PM -0600, Bo Yang wrote:
> Hi, Jeremy, Jim, All:
>          in printing/printing.c:2399 ~ 2403,
>                 fstrcpy(pjob.user, lp_printjob_username(snum));
>                 standard_sub_basic(vuser->user.smb_name, vuser->user.domain,
>                                    pjob.user, sizeof(pjob.user)-1);
>                 /* ensure NULL termination */
>                 pjob.user[sizeof(pjob.user)-1] = '\0';
>          Which results in job's username in lowercase. (%U is substituted with lowercase username).
> 
>         Is this intentionally?
> 
>         This might cause printing fail, take CUPS for example. If allowed user is Blah, but samba will send
>        requesting-user-name as blah...............
> 
> Any suggestions on this?

Ok, doing a git-blame shows this change in lib/substitute.c as :

03ac082d (Andrew Tridgell <tridge at samba.org>   2002-07-15 10:35:28 +0000 573)           switch (*(p+1)) {
03ac082d (Andrew Tridgell <tridge at samba.org>   2002-07-15 10:35:28 +0000 574)           case 'U' :
03ac082d (Andrew Tridgell <tridge at samba.org>   2002-07-15 10:35:28 +0000 575)                   r = strdup_lower(smb_name);

I'm going to have to ask Jerry how to get the commit
message out of this to understand why the change was
made.

Give me a few days to track this down.

Jeremy.


More information about the samba-technical mailing list