1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

893 Commits

Author SHA1 Message Date
Volker Lendecke
08964b9de8 r11532: Enable kerberos session setup for winbind smb connections
(This used to be commit f0e4075db5)
2007-10-10 13:45:50 -05:00
Volker Lendecke
69307693dc 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
(This used to be commit d14948fdf6)
2007-10-10 13:45:49 -05:00
Andrew Bartlett
75ec65597c r11523: Working towards having Samba3 join Samba4, this allows the SASL
credentials to be NULL, where the client is requesting a CIFS style
server-first negTokenInit.

Andrew Bartlett
(This used to be commit eba652ecc8)
2007-10-10 13:45:48 -05:00
Andrew Bartlett
72820aaf92 r11521: Add in client support for checking supportedSASLmechanisms, and then
determining a mechanism to use.

Currently it doesn't to fallbacks like SPNEGO does, but this could be
added (to GENSEC, not to here).

This also adds a new function to GENSEC, which returns a list of SASL
names in our preference order (currently determined by the build
system of all things...).

Also make the similar function used for OIDs in SPNEGO do the same.

This is all a very long-winded way of moving from a hard-coded NTLM to
GSS-SPNEGO in our SASL client...

Andrew Bartlett
(This used to be commit 130eb9bb9a)
2007-10-10 13:45:48 -05:00
Stefan Metzmacher
6dafef0301 r11487: thanks to make test I noticed a dead lock bug, in the last change,
this only happens with socket_wrapper as socket_connect() returns NT_STATUS_OK
instead of NT_STATUS_MORE_PROCESSING_REQUIRED, and we missed to replace the
fde event handler...

metze
(This used to be commit f04001f280)
2007-10-10 13:45:44 -05:00
Stefan Metzmacher
536e68dbee r11485: prevent us from calling the request handler recursiv when
the handler calls talloc_free(wrepl_socket)

metze
(This used to be commit bf0b96f057)
2007-10-10 13:45:43 -05:00
Andrew Bartlett
827cbb480c r11466: Clear up some memory leaks in smbclient.
Andrew Bartlett
(This used to be commit 6535959fd7)
2007-10-10 13:45:40 -05:00
Volker Lendecke
8f91998e04 r11424: Fix an uninitialized variable warning
(This used to be commit fed26bc4fd)
2007-10-10 13:45:36 -05:00
Andrew Bartlett
b1d3d75c68 r11404: Another torture test and a new WERR.
Andrew Bartlett
(This used to be commit de83b8cd18)
2007-10-10 13:45:32 -05:00
Jelmer Vernooij
93fd08168f r11377: Add support for building LIBRARY elements as shared libraries:
- Adds -rpath bin/ so you don't have to install Samba in order to use compiled binaries.
 - Writes out pkg-config files when building shared libs
 - Supports automatic fallback to MERGEDOBJ (which is the default) or
   OBJ_LIST (if ld -r is not supported)

Building with shared libs reduces the size of the Samba binaries from
197 Mb to 60 Mb (including libraries) on my system (GCC4, with debugging).

To build with shared libraries support enabled, run:

LIBRARY_OUTPUT_TYPE=SHARED_LIBRARY ./config.status

init functions don't get called correctly yet when using shared libs, so
you won't be able to actually run anything with success :-)

Once init functions are done, I'll look at support for loading shared
modules once again.

Based on a patch by Peter Novodvorsky (nidd on IRC).
(This used to be commit 0b54405685)
2007-10-10 13:45:28 -05:00
Volker Lendecke
134b2488c8 r11369: Implement socket_connect_multi: Connect to multiple ipv4 tcp ports in
sequence, with a 2-millisecond timeout between firing the syn packets. Build
smbcli_sock_connect_send upon that.

Volker
(This used to be commit 5718df44d9)
2007-10-10 13:45:27 -05:00
Andrew Bartlett
22d867fb1d r11334: Print error status in debug.
Andrew Bartlett
(This used to be commit 3b5ef4208d)
2007-10-10 13:45:21 -05:00
Jelmer Vernooij
8ee1ee66ed r11303: Support defining and installing public headers for libraries.
Support installing libraries.
Get rid of pkg-config file (will be autogenerated later on).
(This used to be commit b4745032a2)
2007-10-10 13:45:16 -05:00
Volker Lendecke
d6e070b74a r11274: Start a connection attempt to the DC's port 389. To do this properly, make
socket_connect and ldap_connect properly async.

Volker
(This used to be commit bcc71fc1de)
2007-10-10 13:45:12 -05:00
Volker Lendecke
ca40d0a6fe r11271: Fix a warning and an infinite recursion
(This used to be commit 7bc855359a)
2007-10-10 13:45:11 -05:00
Volker Lendecke
3608b6af42 r11264: Winbind does not rely on the hostname resolution mechanisms of
composite_connect, so in io.in.dest_host I'm setting the IP address. Gensec
does not like that as a target hostname, so if a called name is present, use
that. So we can session setup using kerberos now.

Volker
(This used to be commit c26b432c27)
2007-10-10 13:45:10 -05:00
Volker Lendecke
df30ef140d r11248: Fix anon fallback with spnego
(This used to be commit 13ebdea115)
2007-10-10 13:45:07 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Andrew Bartlett
bf38a5e7c5 r11198: The recent changes to netlogon changed this from a RID to a SID.
Andrew Bartlett
(This used to be commit 24dbf34352)
2007-10-10 13:45:00 -05:00
Andrew Tridgell
d73bd8f01a r11114: - fixed error handling on bad bind in ildap client
- added nicer error display, giving a string version of the error code
(This used to be commit 5ec486bb81)
2007-10-10 13:44:52 -05:00
Volker Lendecke
d68319431e 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
(This used to be commit 3e535cce74)
2007-10-10 13:44:48 -05:00
Stefan Metzmacher
42ef193dd2 r11090: we need this to run correct under socket_wrapper
metze
(This used to be commit 3f7b09a308)
2007-10-10 13:44:47 -05:00
Stefan Metzmacher
cffd522b5c r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge

metze
(This used to be commit 471c0ca4ab)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
2ecb46d595 r11037:
(This used to be commit 6913e33840)
2007-10-10 13:42:33 -05:00
Stefan Metzmacher
fccbbf3546 r10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200
add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere

 (tridge: can you review this please, (make test works)

 metze
(This used to be commit a599d7a4ae)
2007-10-10 13:39:52 -05:00
Andrew Bartlett
f7ff0540d2 r10981: Pull code to decide between and implement NTLMv2, NTLM and LM
authentication out of the various callers and into the kitchen
sink.. err, credentials subsystem.

This should ensure consistant logic, as well as get us one step closer
to security=server operation in future.

Andrew Bartlett
(This used to be commit 09c9576330)
2007-10-10 13:39:50 -05:00
Andrew Tridgell
a599edf04c r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
(This used to be commit f6818daecc)
2007-10-10 13:39:41 -05:00
Volker Lendecke
d617556ef5 r10878: Reply to some comments by tridge and metze:
* rename the composite helper functions from comp_* to composite_*

* Move the lsa initialization to wb_connect_lsa.c

* Equip smb_composite_connect with a fallback_to_anonymous

The latter two simplify wb_init_domain.c quite a bit.

Volker
(This used to be commit deb127e04e)
2007-10-10 13:39:39 -05:00
Stefan Metzmacher
b0e342e389 r10867: add WERR_UNKNOWN_REVISION errorcode
metze
(This used to be commit b436206c49)
2007-10-10 13:39:37 -05:00
Volker Lendecke
9e5d44d567 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
(This used to be commit 3e69fdc07c)
2007-10-10 13:39:36 -05:00
Jelmer Vernooij
a1f60c9b0d r10848: Fix warning
(This used to be commit 48d22a9910)
2007-10-10 13:39:36 -05:00
Andrew Bartlett
43adda56b6 r10847: Fix up new 'decrypt samlogon reply' routine to be more robust, and use
it in the RPC-SAMLOGON test.

Andrew Bartlett
(This used to be commit 675b7df2ee)
2007-10-10 13:39:35 -05:00
Andrew Bartlett
8aff6e005e r10845: Add new function to decrypt the session keys in samlogon responses.
Andrew Bartlett
(This used to be commit 6d24d8d12c)
2007-10-10 13:39:35 -05:00
Stefan Metzmacher
846f4b304c r10836: giving NT_STATUS_NO_MEMORY, when the connection fails wasn't a good idea...
metze
(This used to be commit e7ee73a747)
2007-10-10 13:39:33 -05:00
Andrew Bartlett
1377cca5f4 r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
(This used to be commit fd7203789a)
2007-10-10 13:39:32 -05:00
Stefan Metzmacher
6799fde75d r10766: - make it possible to mark a wrepl_request as send only,
used for WREPL_REPL_INFORM* messsages
- make it possible to close the connection after a request was send
  used for WREPL_ASSOCIATION_STOP
- fix the torture test that tests the assoc context handling
  between connections, you can issue a request and get the reply
  on another connection, I think we should not implement that in our server
  code, as I think it's a security hole, you can cause a windows server
  to send the replies to someone another client, that doesn't wait for data,
  and as there're no massage_id in the protocol the client would be confused
  by a replies that doesn't belong to a query

metze
(This used to be commit dfc95de8fa)
2007-10-10 13:39:28 -05:00
Stefan Metzmacher
03b634042f r10761: we need to use a pointer to a nbt_name to fix compiler warnings, because we can
only use a pointers to unknown types in proto.h

metze
(This used to be commit 2f46e54e1b)
2007-10-10 13:39:28 -05:00
Andrew Tridgell
97e8c5bcec r10754: fixed a valgrind error for unmatched SMB replies
(This used to be commit b714ab64fd)
2007-10-10 13:39:26 -05:00
Andrew Bartlett
49dd5e4b1d r10712: Use data_blob_talloc, thanks to valgrind for finding the errors.
Andrew Bartlett
(This used to be commit 1f6fec8e6b)
2007-10-10 13:39:23 -05:00
Volker Lendecke
68c70ef396 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
(This used to be commit 6b88de182e)
2007-10-10 13:39:17 -05:00
Andrew Tridgell
67762d7965 r10668: added a ildap_search_bytree() function
(This used to be commit fd6d895ebd)
2007-10-10 13:39:16 -05:00
Tim Potter
cc8af00a93 r10646: Hey Jelmer what do you think of this? The SConscript for the libcli
directory now looks like the config.mk file but with different
punctuation.

The only weird bit is that it creates a proto.h file for each subsystem.
(This used to be commit 09d4abecb0)
2007-10-10 13:39:14 -05:00
Stefan Metzmacher
bb77c2aa1e r10638: - add wrepl_socket_merge() function that creates a wrepl_socket on top
of an existing socket, that is needed to handle WREPL_REPL_UPDATE
  in the server, because we need to flig the connection and act as client on it

metze
(This used to be commit 131e5dfe69)
2007-10-10 13:39:14 -05:00
Rafal Szczesniak
9bc38ce65f r10636: Formatting for better readability.
rafal
(This used to be commit ef29863d99)
2007-10-10 13:39:13 -05:00
Rafal Szczesniak
65271095d0 r10635: Formatting for better readability.
rafal
(This used to be commit 7b3a4096b5)
2007-10-10 13:39:13 -05:00
Stefan Metzmacher
c2d7914428 r10627: - use a wrepl specific enum for the node type
- the unknown flag 0x10 seems to mean that this name was localy registered on this
  currently asked server, that flag is not present in replica records

metze
(This used to be commit ba3685c41d)
2007-10-10 13:39:13 -05:00
Stefan Metzmacher
08f16292a0 r10608: - fix hierachical memory handling in ndr_pull_nbt_name
- add wrepl_nbt_name scalar type and do the pull/push in the ndr layer
  instead of the caller
- give the flags and group_flag in the wrepl_name a meaning

metze
(This used to be commit b98efc2905)
2007-10-10 13:39:12 -05:00
Andrew Bartlett
f9fea8ba77 r10598: Factor out common code, in preperation for a move elsewhere.
Andrew Bartlett
(This used to be commit 0d757b169a)
2007-10-10 13:39:10 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00