[Announce] Samba 4.11.0rc4 Available for Download

Franz Sirl Franz.Sirl-kernel at lauterbach.com
Tue Sep 24 09:09:08 UTC 2019

Am 2019-09-12 um 17:25 schrieb Björn Baumbach:
> Hi Franz!
> On 9/11/19 3:15 PM, Franz Sirl via samba-technical wrote:
>> just noting that 4.11 will already be the third major release without a
>> fix for the https://bugzilla.samba.org/show_bug.cgi?id=13745 regression.
>> Can someone at least comment on the bug so I can work on a patch and
>> make PDF printing shares (via smbprngenpdf) functional again? Just
>> moving the new %j/%J to %k/%K would be enough to fix the bug.
> Thank you for the reminder.
> Not only %j and %J are affected. There is also %p, which is used twice.

Hi Björn,

%p is handled in talloc_sub_advanced() which already is called "later" 
in code flow. Additionally the %p functionality in talloc_sub_advanced() 
is less likely useful in a printing share.
The problematic thing about %j/%J is that they are handled in 
talloc_sub_basic() via lp_string() without a way to intervene. Moreover 
the functionality could also be useful in a printing share.

> I've requested some comments from the samba team regarding the issue.
> Metze added some notes to the bug report. There is still no decision,
> but there are currently two ideas:
> - make sure that the printing related commands are processed by
>    standard substitution *after* the printing related substitution.

I've added a tentative patch doing this according to Stefan#s suggestion 
in bugzilla.

> - add new substitutions and throw a warning if %j %J or %p is used

With the mentioned patch the talloc_sub_basic() %j/%J functionality 
could be left in place and %k/%K could be added, duplicating the %j/%J 
behaviour. The %k/%K could then become the only documented variation and 
testparm would warn about %j/%J usage in a file share.

> <comment>
> Stefan Metzmacher 2019-09-12 12:56:51 UTC
> Another possible way would be to mark the printing related commands as
> constant="1" in their documentation that should avoid the lp_string() is
> called for them.
> Then we can do the printing related %j substitution first and then
> call lp_string() as a 2nd step.
> Yet another or additional way would be to replace it with something that
> doesn't require a single charater, similar to %$(envvar).
> Maybe %{jobid} %{jobname} %{clientip_pathsafe} %{serverip_pathsafe}
> %{printername}...
> </comment>
> Maybe we need both here.

Yes, I agree, %{long_name} sounds like a nice addition.


More information about the samba-technical mailing list