1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-05 04:23:51 +03:00
Commit Graph

39 Commits

Author SHA1 Message Date
Andrew Bartlett
a6833db4e6 r12867: Remove deleted header. 2007-10-10 13:50:56 -05:00
Andrew Bartlett
acf9dc8fe9 r12866: This removes the abstraction layer in winbindd intended to deal with
multiple protocols, replacing it with the packet handling subsystem.

We don't have multiple protocols at present, and the abstraction layer
only serves to confuse matters.  Also, the new packet subsystem removes
the need to handle partial reads.

We can easily add new protocols from the socket up instead, becaue the
difficult bits are done by the packet layer.

Andrew Bartlett
2007-10-10 13:50:55 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Volker Lendecke
d14948fdf6 r11528: Separate finding dcs from initializing a domain. Makes it easier to possibly
support cldap and other stuff in the future.

This temporarily disables wbinfo -t, but that will come back soon.

Try an ldap bind using gss-spnego. This got me krb5 binds against "our" w2k3
and a trusted w2k, although with some memleaks from krb5 and a BAD_OPTION
tgs-rep error.

Volker
2007-10-10 13:45:49 -05:00
Volker Lendecke
848522d1b6 r11517: Cleanup time, this looks larger than it is. This mainly gets rid of
wb_domain_request, now that we have queued rpc requests.

Volker
2007-10-10 13:45:47 -05:00
Volker Lendecke
a043ef33dc r11423: Add some TALLOC_CTX 2007-10-10 13:45:36 -05:00
Volker Lendecke
d5aef4e2f9 r11422: Remove unused args 2007-10-10 13:45:35 -05:00
Andrew Bartlett
8800e9b5b0 r11412: These comments may not be much, but my eyes scan code with even
minimal comments much better (much like volker scans code of less than
80 cols better ;-)

Andrew Bartlett
2007-10-10 13:45:34 -05:00
Andrew Bartlett
8ed975df52 r11411: Add to Samba4 the Samba3 patch I just posted for machine account
logins (changing the winbindd interface).

Clean up the wbsrv_samba3_async_epilogue() handling, as it was mixing
auth and other replies, such that all replies were having the auth
error strings set.  We now do a better job of filling in the right
errors in the right places.

Andrew Bartlett
2007-10-10 13:45:33 -05:00
Andrew Bartlett
3353e906ad r11374: On request from VL, put the plaintext auth patch in.
I still have some gremlins that get in the my way in testing this.

Andrew Bartlett
2007-10-10 13:45:28 -05:00
Stefan Metzmacher
2f1930fb62 r11276: fix compiler warnings
metze
2007-10-10 13:45:12 -05:00
Volker Lendecke
4fe3c9871b r11263: Some cleanup 2007-10-10 13:45:10 -05:00
Volker Lendecke
12a800bc85 r11193: Implement wbinfo -m 2007-10-10 13:44:59 -05:00
Volker Lendecke
3821a17bdb r11181: Implement wbinfo -s and wbinfo --user-sids. The patch is so large because
--user-sids required the extension to trusted domains.

Implement "winbind sealed pipes" parameter for debugging purposes.

Volker
2007-10-10 13:44:57 -05:00
Volker Lendecke
3e535cce74 r11095: Implement wb_getuserdomgroups.
Tridge, if you have the time, you might want to look at a problem I'm having
with unix domain stream sockets. From a comment in this commit:

	/* Using composite_trigger_error here causes problems with the client
	 * socket. Linux 2.6.8 gives me a ECONNRESET on the next read after
	 * writing the reply when I don't wait the 100 milliseconds. */

This is in winbind/wb_cmd_userdomgroups.c:93.

The problem I have is that I can not *immediately* send an error reply to the
client because the next receive fails. Waiting 100 milliseconds helps. It
might also be a problem with epoll(), I don't really know.

I'd appreciate if you took a brief look at this, maybe I'm doing something
wrong.

Thanks,

Volker
2007-10-10 13:44:48 -05:00
Volker Lendecke
a14398715e r11094: Connect to SAM, implement getdcname 2007-10-10 13:44:48 -05:00
Volker Lendecke
6e4f774a49 r11070: Fix a cut&paste error, now wbinfo can properly separate domain and user...
Volker
2007-10-10 13:44:44 -05:00
Volker Lendecke
0c6c71ae3c r11068: Fix pam_auth_crap, remove the sync code. I don't know what it was when I
tested it, but I can not reproduce the problem I had with abartlett's initial
implementation anymore.

Fix a bug found using valgrind.

Volker
2007-10-10 13:44:44 -05:00
Volker Lendecke
35bcfb185b r10936: Commit work in progress: wb_pam_auth_crap made async. This does not work yet,
but the version before did not either, so we're not worse than before.

One thing this does better is to call the domain init code if it's not there
yet.

Volker
2007-10-10 13:39:44 -05:00
Volker Lendecke
3e69fdc07c r10852: Continuation-based programming can become a bit spaghetti...
Initialize a domain structure properly. Excerpt from wb_init_domain.c:

/*
 * Initialize a domain:
 *
 * - With schannel credentials, try to open the SMB connection with the machine
 *   creds. Fall back to anonymous.
 *
 * - If we have schannel creds, do the auth2 and open the schannel'ed netlogon
 *   pipe.
 *
 * - Open LSA. If we have machine creds, try to open with ntlmssp. Fall back
 *   to schannel and then to anon bind.
 *
 * - With queryinfopolicy, verify that we're talking to the right domain
 *
 * A bit complex, but with all the combinations I think it's the best we can
 * get. NT4, W2k3SP1 and W2k all have different combinations, but in the end we
 * have a signed&sealed lsa connection on all of them.
 *
 * Is this overkill? In particular the authenticated SMB connection seems a
 * bit overkill, given that we do schannel for netlogon and ntlmssp for
 * lsa later on w2k3, the others don't do this anyway.
 */

Thanks to Jeremy for his detective work, and to the Samba4 team for providing
such a great infrastructure.

Next step is to connect to SAM. Do it via LDAP if we can, fall back to samr
with all we have.

Volker
2007-10-10 13:39:36 -05:00
Volker Lendecke
10585ba4e8 r10846: Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the
async helpers.

Volker
2007-10-10 13:39:35 -05:00
Andrew Bartlett
c9273729e4 r10844: Add challenge-response authentication to Samba4's winbindd for VL.
Plaintext should be simple, but I'm going to do some infrustructure
work first.

Andrew Bartlett
2007-10-10 13:39:35 -05:00
Volker Lendecke
90a30c8b65 r10838: Get us an schannel'ed netlogon pipe.
Abartlet, now I think I need some assistance to implement the pam auth & crap
auth calls.

Volker
2007-10-10 13:39:34 -05:00
Volker Lendecke
2a6b805385 r10834: Work in progress on winbind. With some helper routines the composite functions
start to look sane.

Question: What about providing all winbind commands as irpc interfaces that
are called from the samba3 compatibility layer? This way it would be easy for
other samba components to access its functionality. Does that make sense?

Volker
2007-10-10 13:39:33 -05:00
Volker Lendecke
1afa893506 r10825: Complete wbinfo -n 2007-10-10 13:39:32 -05:00
Andrew Tridgell
2c3a9f04db r10704: don't try to free the netlogon pipe twice 2007-10-10 13:39:22 -05:00
Andrew Tridgell
5d752a5194 r10700: removed volkers temporary timer hack now that freeing the netlogon
pipe is safe while inside a rpc callback
2007-10-10 13:39:21 -05:00
Volker Lendecke
126c80aefc r10691: This gets half-way to wbinfo -n. It acquires an lsa pipe, and does a
queryinfopolicy. Idea is to get a consistency check between that and our
notion of the domain name and sid, and take the lsa pipe as the holder of the
central smbcli_tree that netlogon and samr use as well.

Volker
2007-10-10 13:39:19 -05:00
Volker Lendecke
a7137fd3ec r10686: Fix the build 2007-10-10 13:39:19 -05:00
Volker Lendecke
820b4180dd r10685: Why wait 5 seconds... 2007-10-10 13:39:18 -05:00
Volker Lendecke
e38e50127a r10684: Add a nasty hack for the failure case of wbinfo -t. Tridge has a proper fix
for it pending.

Also fix a bug with timed events: Don't call the same event recursively in the
handler's inner semi-async event loop.

Volker
2007-10-10 13:39:18 -05:00
Volker Lendecke
5436d77648 r10683: Samba3's wbinfo -t should give the correct answer now.
Tridge, if you have time, you might want to look at the segfault I was still
seeing. Now I store the handle to the netlogon pipe in the global winbind
state and free it on the next entry into check_machacc. The problem seems to
be that talloc_free()ing a pipe struct from within a callback function on that
pipe is not possible. I think I can live with that, but it has been not really
obvious. To reproduce the segfault you might want to look at putting a
talloc_free(state->getcreds->out.netlogon) into
wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc
callback function.

In particular if the check failed it would be nice if I could delete the pipe
directly and not post a different event to some winbind queue.

I tried to delete the pipe from a timed event triggered immediately, but this
also fails because the inner loop seems to hit the same event again, calling
it twice.

Volker
2007-10-10 13:39:18 -05:00
Volker Lendecke
6b88de182e r10677: Add smb_composite_connectmulti: Send out multiple SYN packets at once, use the
first one that replies correctly.

Add a talloc context to smb_composite_connect()

Volker
2007-10-10 13:39:17 -05:00
Volker Lendecke
c755788484 r10675: Connect to the DC's IPC$
Volker
2007-10-10 13:39:17 -05:00
Stefan Metzmacher
85d4565fce r10508: - implement WINBINDD_NETBIOS_NAME, WINBINDD_DOMAIN_NAME and WINBINDD_INFO
is there a way to test this calls?

vl: please review this

metze
2007-10-10 13:38:58 -05:00
Stefan Metzmacher
37b5f6b417 r10506: set return data correctly
metze
2007-10-10 13:38:57 -05:00
Stefan Metzmacher
4527815a0a r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
2007-10-10 13:38:57 -05:00
Volker Lendecke
4637964b19 r10491: First step towards wbinfo -t: This issues a name request for the primary
domain and gets the DC's name via a mailslot call.

Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with
irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And
as everything is async anyway, the semantics should not be too much of a
problem.

Volker
2007-10-10 13:38:54 -05:00
Stefan Metzmacher
32f3e68a56 r10426: - restructure the winbind server code a bit
- remove the echo test stuff
- abstract out the used protocol
- we have a seperate handler for the samba3 protocol now
- the backend can easy do async replies
  by setting WBSRV_CALL_FLAGS_REPLY_ASYNC in wbsrv_call
  and then call wbsrv_queue_reply() later

metze
2007-10-10 13:38:44 -05:00