The Samba-Bugzilla – Attachment 13392 Details for
Bug 12886
smbspool_krb5_wrapper does not tell CUPS that it requires negotiate for authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.6
46.patch (text/plain), 2.25 KB, created by
Andreas Schneider
on 2017-07-17 12:05:49 UTC
(
hide
)
Description:
patch for 4.6
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2017-07-17 12:05:49 UTC
Size:
2.25 KB
patch
obsolete
>From 0ba8a8a112377befde785c47c2e38af38c22b215 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Fri, 7 Jul 2017 14:08:49 +0200 >Subject: [PATCH] s3:client: The smbspool krb5 wrapper needs negotiate for > authentication > >If you create a new printer it doesn't have AuthInfoRequired set and so >cups calls the backend with: > > AUTH_INFO_REQUIRED=none > >In this case we need to return: > > ATTR: auth-info-required=negotiate > >and return an error that we require authentication. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12886 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >(cherry picked from commit 4cced4da4ca97f0c6db227e6b2c7e03c2e5c1f28) >--- > source3/client/smbspool_krb5_wrapper.c | 29 +++++++++++++++++++---------- > 1 file changed, 19 insertions(+), 10 deletions(-) > >diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c >index bf97d82115a..a72006a4c4f 100644 >--- a/source3/client/smbspool_krb5_wrapper.c >+++ b/source3/client/smbspool_krb5_wrapper.c >@@ -95,17 +95,26 @@ int main(int argc, char *argv[]) > > /* If not set, then just call smbspool. */ > if (env == NULL) { >- CUPS_SMB_ERROR("AUTH_INFO_REQUIRED is not set"); >- goto smbspool; >+ CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED is not set - " >+ "execute smbspool"); >+ goto smbspool; > } else { >- CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED=%s", env); >- cmp = strcmp(env, "negotiate"); >- /* If AUTH_INFO_REQUIRED != "negotiate" then call smbspool. */ >- if (cmp != 0) { >- CUPS_SMB_ERROR( >- "AUTH_INFO_REQUIRED is not set to negotiate"); >- goto smbspool; >- } >+ CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED=%s", env); >+ >+ cmp = strcmp(env, "username,password"); >+ if (cmp == 0) { >+ CUPS_SMB_DEBUG("Authenticate using username/password - " >+ "execute smbspool"); >+ goto smbspool; >+ } >+ >+ /* if AUTH_INFO_REQUIRED=none */ >+ cmp = strcmp(env, "negotiate"); >+ if (cmp != 0) { >+ CUPS_SMB_ERROR("Authentication unsupported"); >+ fprintf(stderr, "ATTR: auth-info-required=negotiate\n"); >+ return CUPS_BACKEND_AUTH_REQUIRED; >+ } > } > > uid = getuid(); >-- >2.13.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 12886
: 13392 |
13393