Bug 7465 - net ads join -k didn't work if KRB5CCNAME is not set
net ads join -k didn't work if KRB5CCNAME is not set
Status: RESOLVED FIXED
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools
3.5.3
Other Linux
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-27 14:12 UTC by Matthieu Patou
Modified: 2011-10-26 17:20 UTC (History)
1 user (show)

See Also:


Attachments
3-5-test.patch (6.66 KB, patch)
2011-09-26 13:52 UTC, Guenther Deschner
asn: review+
Details
v3-6-test.patch (7.59 KB, patch)
2011-09-26 14:26 UTC, Guenther Deschner
asn: review+
Details
follow up patch for 3.6 (4.09 KB, patch)
2011-09-26 22:53 UTC, Guenther Deschner
asn: review+
Details
v3-5-test.patch followup ABI (2.26 KB, patch)
2011-10-26 11:47 UTC, Guenther Deschner
asn: review+
Details
v3-6-test.patch followup ABI (2.28 KB, patch)
2011-10-26 13:04 UTC, Guenther Deschner
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Patou 2010-05-27 14:12:51 UTC
#net ads join -k ; echo $KRB5CCNAME; KRB5CCNAME=/tmp/krb5cc_0 net ads join -k 
Failed to join domain: failed to lookup DC info for domain 'SMB4.TST' over rpc: NT_STATUS_NO_SUCH_FILE

Using short domain name -- SAMBA4
Joined 'SMBFSVZ01' to realm 'smb4.tst'

So with a valid admin ticket net ads join -k fail with KRB5CCNAME it works
Comment 1 Guenther Deschner 2011-09-26 13:52:49 UTC
Created attachment 6937 [details]
3-5-test.patch
Comment 2 Guenther Deschner 2011-09-26 14:26:42 UTC
Created attachment 6938 [details]
v3-6-test.patch
Comment 3 Guenther Deschner 2011-09-26 14:29:04 UTC
Karolin, please pick for 3.6 and 3.5, thanks!
Comment 4 Karolin Seeger 2011-09-26 18:29:29 UTC
(In reply to comment #3)
> Karolin, please pick for 3.6 and 3.5, thanks!

Pushed to both branches.
Closing out bug report.

Thanks!
Comment 5 Karolin Seeger 2011-09-26 19:05:08 UTC
Re-opening as

s3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin.
    
breaks the build (in v3-6-test):

--- snip ---
Compiling rpc_server/wkssvc/srv_wkssvc_nt.c
rpc_server/wkssvc/srv_wkssvc_nt.c: In function ‘_wkssvc_NetrJoinDomain2’:
rpc_server/wkssvc/srv_wkssvc_nt.c:870:9: error: ‘KRB5_ENV_CCNAME’ undeclared (first use in this function)
rpc_server/wkssvc/srv_wkssvc_nt.c:870:9: note: each undeclared identifier is reported only once for each function it appears in
rpc_server/wkssvc/srv_wkssvc_nt.c: In function ‘_wkssvc_NetrUnjoinDomain2’:
rpc_server/wkssvc/srv_wkssvc_nt.c:938:9: error: ‘KRB5_ENV_CCNAME’ undeclared (first use in this function)
The following command failed:
gcc -g -DDEBUG_PASSWORD -DDEVELOPER -g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Werror-implicit-function-declaration -I. -I/data/git/samba/v3-6-test/source3 -Iinclude -I./include  -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/talloc -I../lib/tdb/include -DHAVE_CONFIG_H  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/popt -DLDAP_DEPRECATED  -I/data/git/samba/v3-6-test/source3/lib -I.. -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIC -c rpc_server/wkssvc/srv_wkssvc_nt.c -o rpc_server/wkssvc/srv_wkssvc_nt.o
make: *** [rpc_server/wkssvc/srv_wkssvc_nt.o] Fehler 1
--- snap ---
Comment 6 Karolin Seeger 2011-09-26 19:20:31 UTC
Temporarily reverted patch in v3-6-test.
Günther, please investigate.

v3-5-test works fine.

Thanks!

Karo
Comment 7 Guenther Deschner 2011-09-26 22:53:11 UTC
Created attachment 6948 [details]
follow up patch for 3.6

This is the one corrected patch for 3.6 (from the series of 3 patches, where one has been reverted). Sorry, include mixup...
Comment 8 Karolin Seeger 2011-09-28 18:05:44 UTC
(In reply to comment #7)
> Created attachment 6948 [details]
> follow up patch for 3.6
> 
> This is the one corrected patch for 3.6 (from the series of 3 patches, where
> one has been reverted). Sorry, include mixup...

Pushed to v3-6-test.
Thanks a lot, Günther!

Closing out bug report.
Comment 9 Guenther Deschner 2011-10-26 11:46:18 UTC
patch breaks abi, follow up patch needed
Comment 10 Guenther Deschner 2011-10-26 11:47:04 UTC
Created attachment 7034 [details]
v3-5-test.patch followup ABI
Comment 11 Guenther Deschner 2011-10-26 13:04:20 UTC
Created attachment 7035 [details]
v3-6-test.patch followup ABI
Comment 12 Stefan Metzmacher 2011-10-26 13:38:34 UTC
Karolin, please pick ABI fixes for the next release. We should avoid realsing without them
Comment 13 Karolin Seeger 2011-10-26 17:20:08 UTC
Pushed to both branches. Will be included in 3.5.12 and 3.6.2.
Closing out bug report.

Thanks!