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

Alexander Bokovoy ab at 7ia.org
Thu Apr 10 05:00:53 GMT 2008


2008/4/10 Jeremy Allison <jra at samba.org>:
>
> 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.
$ git log 03ac082d
commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Jul 15 10:35:28 2002 +0000

    updated the 3.0 branch from the head branch - ready for alpha18

This would require a bit more of tracking...
-- 
/ Alexander Bokovoy


More information about the samba-technical mailing list