Bug 13939 - Using Kerberos credentials to print using spoolss doesn't work
Using Kerberos credentials to print using spoolss doesn't work
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing
4.9.1
All All
: P5 normal
: ---
Assigned To: Andreas Schneider
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-09 14:25 UTC by Andreas Schneider
Modified: 2019-08-06 08:54 UTC (History)
6 users (show)

See Also:


Attachments
patch for 4.10 (1.03 KB, patch)
2019-05-10 05:45 UTC, Andreas Schneider
gd: review+
Details
patch for 4.9 (1.03 KB, patch)
2019-05-10 05:46 UTC, Andreas Schneider
gd: review+
Details
patch for 4.8 (1.03 KB, patch)
2019-05-10 05:46 UTC, Andreas Schneider
gd: review+
Details
additional patches for 4.10 (30.85 KB, patch)
2019-05-23 11:43 UTC, Andreas Schneider
gd: review+
Details
additional patches for 4.9 (30.85 KB, patch)
2019-05-23 11:46 UTC, Andreas Schneider
gd: review+
Details
additional patches for 4.8 (30.85 KB, patch)
2019-05-23 11:47 UTC, Andreas Schneider
gd: review+
Details
additional patches for 4.9 (v2) (31.99 KB, patch)
2019-06-19 12:09 UTC, Andreas Schneider
gd: review+
Details
another additional patches for 4.10 (1.12 KB, patch)
2019-06-19 12:10 UTC, Andreas Schneider
gd: review+
Details
patch for 4.9 (31.99 KB, patch)
2019-07-10 06:25 UTC, Andreas Schneider
asn: review? (gd)
ab: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2019-05-09 14:25:21 UTC
This is a regression introduced with d6518d74dda517c84f7a4a2fe3ad37857fb9d7b0 in Samba 4.8.

Patch will follow.
Comment 1 Andreas Schneider 2019-05-10 05:45:55 UTC
Created attachment 15137 [details]
patch for 4.10
Comment 2 Andreas Schneider 2019-05-10 05:46:24 UTC
Created attachment 15138 [details]
patch for 4.9
Comment 3 Andreas Schneider 2019-05-10 05:46:53 UTC
Created attachment 15139 [details]
patch for 4.8
Comment 4 Guenther Deschner 2019-05-10 15:13:05 UTC
Comment on attachment 15138 [details]
patch for 4.9

LGTM
Comment 5 Guenther Deschner 2019-05-10 15:13:23 UTC
Comment on attachment 15137 [details]
patch for 4.10

LGTM
Comment 6 Guenther Deschner 2019-05-10 15:13:38 UTC
Comment on attachment 15139 [details]
patch for 4.8

LGTM
Comment 7 Guenther Deschner 2019-05-10 15:14:20 UTC
Karolin, please add these patches accordingly. Thanks!
Comment 8 Karolin Seeger 2019-05-16 10:33:58 UTC
(In reply to Guenther Deschner from comment #7)
Pushed to autobuild-v4-{9,10}-test.
Comment 9 Andreas Schneider 2019-05-17 15:07:02 UTC
This needs more work. Reassigning.
Comment 10 Andreas Schneider 2019-05-20 12:10:30 UTC
Patchset for master: https://gitlab.com/samba-team/samba/merge_requests/464
Comment 11 Andreas Schneider 2019-05-23 11:43:08 UTC
Created attachment 15184 [details]
additional patches for 4.10
Comment 12 Andreas Schneider 2019-05-23 11:46:50 UTC
Created attachment 15185 [details]
additional patches for 4.9
Comment 13 Andreas Schneider 2019-05-23 11:47:10 UTC
Created attachment 15186 [details]
additional patches for 4.8
Comment 14 Guenther Deschner 2019-05-24 14:39:58 UTC
Comment on attachment 15184 [details]
additional patches for 4.10

LGTM
Comment 15 Guenther Deschner 2019-05-24 14:40:18 UTC
Comment on attachment 15185 [details]
additional patches for 4.9

LGTM
Comment 16 Guenther Deschner 2019-05-24 14:40:52 UTC
Comment on attachment 15186 [details]
additional patches for 4.8

LGTM
Comment 17 Guenther Deschner 2019-05-24 14:43:47 UTC
Karolin, please add to 4.8, 4.9 and 4.10 (unless Andreas has some more things to look after here). Thanks!
Comment 18 Karolin Seeger 2019-06-04 09:18:18 UTC
(In reply to Guenther Deschner from comment #17)
Pushed to autobuild-v4-{10,9}-test.
4.8 is in the security fixes only mode...
Comment 19 Karolin Seeger 2019-06-06 08:09:27 UTC
(In reply to Karolin Seeger from comment #18)
The additional patch introduces a compile issue:

[2392/3377] Compiling source3/client/smbspool.c
../source3/client/smbspool.c: In function ‘kerberos_ccache_is_valid’:
../source3/client/smbspool.c:653:4: error: implicit declaration of function ‘krb5_free_unparsed_name’ [-Werror=implicit-function-declaration]
    krb5_free_unparsed_name(ctx, princ_name);
    ^
cc1: all warnings being treated as errors
Waf: Leaving directory `/memdisk/kseeger/a49/b545967/samba-nopython/bin'
Build failed:  -> task failed (err #1): 
	{task: cc smbspool.c -> smbspool_157.o}

Removed for now.

Re-assigning to Günther.
Comment 20 Andreas Schneider 2019-06-06 09:02:29 UTC
We need to link to krb5_wrap as heimdal doesn't provide the function and we implemented it in krb5_wrap.
Comment 21 Andreas Schneider 2019-06-19 12:09:29 UTC
Created attachment 15255 [details]
additional patches for 4.9 (v2)
Comment 22 Andreas Schneider 2019-06-19 12:10:27 UTC
Created attachment 15256 [details]
another additional patches for 4.10
Comment 23 Guenther Deschner 2019-06-20 18:44:52 UTC
Comment on attachment 15255 [details]
additional patches for 4.9 (v2)

LGTM
Comment 24 Guenther Deschner 2019-06-20 18:45:11 UTC
Comment on attachment 15256 [details]
another additional patches for 4.10

LGTM
Comment 25 Guenther Deschner 2019-06-20 18:46:00 UTC
Karolin, please add the remaining patches as well. Thanks!
Comment 26 Karolin Seeger 2019-06-26 07:09:49 UTC
(In reply to Guenther Deschner from comment #25)
Pushed new additional patch to autobuild-v4-9-test.

Additional patch v2 for 4.10 does not apply.
Re-assigning to Andreas.
Comment 27 Karolin Seeger 2019-06-26 07:33:16 UTC
additional patches for 4.9 (v2)
breaks build
Comment 28 Mathieu Parent 2019-07-09 16:45:34 UTC
This feature may have introduced a regression in samba 4.9:
See https://bugs.debian.org/931717
Comment 29 Andreas Schneider 2019-07-10 06:25:33 UTC
Created attachment 15298 [details]
patch for 4.9

I've regenerated the patch for the v4-9-test branch.
Comment 30 Mikhail Novosyolov 2019-07-16 11:04:52 UTC
A user has confirmed that this bug was resolved in Samba 4.10.6 (https://bugzilla.rosalinux.ru/show_bug.cgi?id=9878#c22). Thanks to everyone involved.
Comment 31 Alexander Bokovoy 2019-07-18 12:02:12 UTC
Comment on attachment 15298 [details]
patch for 4.9

LGTM and Rosa Linux user reported it fixed the problem.
Comment 32 Andreas Schneider 2019-07-22 07:08:50 UTC
Karolin, could you please try to apply the 4.9 patch again? Thanks!
Comment 33 Karolin Seeger 2019-08-06 07:46:26 UTC
(In reply to Andreas Schneider from comment #32)
Pushed to autobuild-v4-9-test.
Comment 34 Karolin Seeger 2019-08-06 08:54:16 UTC
(In reply to Karolin Seeger from comment #33)

Build fails again with the same error:

[3179/4406] Compiling source3/client/smbspool.c
../source3/client/smbspool.c: In function ‘kerberos_ccache_is_valid’:
../source3/client/smbspool.c:653:4: error: implicit declaration of function ‘krb5_free_unparsed_name’ [-Werror=implicit-function-declaration]
    krb5_free_unparsed_name(ctx, princ_name);