Automating usage of smbspool_krb5_wrapper

Andreas Schneider asn at samba.org
Mon Oct 28 08:47:59 UTC 2019


On Monday, 28 October 2019 08:58:26 CET Mikhail Novosyolov via samba-technical 
wrote:
> 28.10.2019 10:44, Mikhail Novosyolov пишет:
> > <...>
> > There are 2 possible solutions:
> > 
> > 1) either patch source3/client/smbspool_krb5_wrapper.c to "goto
> > smbspool;" if env does not contain "negotiate" instead of chekcing to
> > be either null or 0 - how correct will this be?
> 
> I mean this:
> 
> diff --git a/source3/client/smbspool_krb5_wrapper.c
> b/source3/client/smbspool_krb5_wrapper.c
> index bff1df417e8..000a613291e 100644
> --- a/source3/client/smbspool_krb5_wrapper.c
> +++ b/source3/client/smbspool_krb5_wrapper.c
> @@ -149,7 +149,7 @@ int main(int argc, char *argv[])
>          env = getenv("AUTH_INFO_REQUIRED");
> 
>           /* If not set, then just call smbspool. */
> -       if (env == NULL || env[0] == 0) {
> +       if (env == NULL || env == "none" || env[0] == 0) {
>                  CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED is not set - "
>                                 "execute smbspool");
>                  goto smbspool;

This is obviously wrong :-)

Did you see the code below? The question is if we should map

AUTH_INFO_REQUIRED=none

to anonymous. I've created a patchset you can find here:

https://git.samba.org/?p=asn/samba.git;a=shortlog;h=refs/heads/master-smbspool


However you need to try all combinations, username/password, kerberos and none 
for anonymous.


	Andreas


-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list