1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

1090 Commits

Author SHA1 Message Date
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
Stefan Metzmacher
f7c5e5a398 r10569: add all info that we have to wrepl_name, as we need it for replication :-)
metze
(This used to be commit bfd548ca10)
2007-10-10 13:39:06 -05:00
Stefan Metzmacher
0b2c6aec92 r10547: - add wrepl_request timeout handling
- when we got an unexpected READ event, we need to do a socket_recv() to find connection errors
  and we need to mark the socket as dead (and remove the fde_event) to prevent,
  endless loops on broken connections

tridge: we should look carefull at other protocol, to handle broken connections without spinning

metze
(This used to be commit ff12723477)
2007-10-10 13:39:04 -05:00
Stefan Metzmacher
5880f79f4f r10545: map ECONNRESET to NT_STATUS_CONNECTION_RESET
metze
(This used to be commit e753114e86)
2007-10-10 13:39:04 -05:00
Stefan Metzmacher
1c701527ff r10542: if the transport is dead we need to return
tridge: I think this is correct, comments?

metze
(This used to be commit e06ca726f3)
2007-10-10 13:39:03 -05:00
Stefan Metzmacher
38e43be7b8 r10537: - we now use a much nicer way to handle talloc_free(timed_event)
the events code replaces a destructor to one that returns allways -1
  while it's calling the event handler
- we don't need the composite and winsrepl specific fixes any more
- this also fixes the problem with smbcli, dcerpc, cldap, ldap and nbt
  request timeouts

metze
(This used to be commit 495996cfc4)
2007-10-10 13:39:03 -05:00
Stefan Metzmacher
4d024ddfb5 r10530: - fix some crash bugs when we lost the connection...
metze
(This used to be commit 0983452bf8)
2007-10-10 13:39:02 -05:00
Stefan Metzmacher
fa70d1d0c2 r10529: fix a crash bug in full async code the uses the composite_trigger_done() code
the event subsystem wants to free timed_events!

metze
(This used to be commit dc5d5953b6)
2007-10-10 13:39:02 -05:00
Jelmer Vernooij
49839f356f r10513: Reduce some use of pstring. The main reason some parts of the code still
use pstring is next_token() now.
(This used to be commit a5b88bcd42)
2007-10-10 13:38:58 -05:00
Stefan Metzmacher
ab4d635b92 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
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00
Tim Potter
f51e98212f r10499: Export cli_ldap library.
(This used to be commit 3c9c3a52e3)
2007-10-10 13:38:56 -05:00
Volker Lendecke
9593101ec1 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
(This used to be commit 4637964b19)
2007-10-10 13:38:54 -05:00
Tim Potter
b0de111292 r10482: Add files to proto_files enough to build libcli and librpc directories.
(This used to be commit 4a03773c99)
2007-10-10 13:38:53 -05:00
Jelmer Vernooij
3d4ea18d4d r10478: More work on proto headers; we now generate a couple of smaller ones
that are then included by include/proto.h
(This used to be commit 703ffbaaac)
2007-10-10 13:38:52 -05:00
Jelmer Vernooij
f3b412fbd6 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Volker Lendecke
e0febb258a r10395: While playing with winbind, I found a segfault because I had given
resolve_name_send a stack-allocated method list. Duplicate it.

Volker
(This used to be commit 17dbbf965b)
2007-10-10 13:38:39 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Andrew Tridgell
a129ad36eb r10213: fixed a memory leak in the ldap client and server code spotted by Karl
Melcher. ldap_encode() now takes a memory context to use for the data
blob
(This used to be commit 09948a5933)
2007-10-10 13:38:09 -05:00
Andrew Tridgell
45f760973d r10200: added a composite_trigger_done() call that allows a composite function
to cause an event to happen immediately. This allows metzes patch for
recognising IPs in resolve_name() to work, and also allows us to
remove some of the other code where we currently do specific checks
for is_ipaddress().
(This used to be commit 9cc000d868)
2007-10-10 13:38:08 -05:00
Tim Potter
f642fd96d0 r10185: Fix another two sets of unhandled enumeration warnings, plus correct some awful indentation. (-:
(This used to be commit 2f24fc7a7a)
2007-10-10 13:38:06 -05:00
Stefan Metzmacher
9cd63ddb5d r10129: fix sinple ip's in wins replication, packets
metze
(This used to be commit 7492afa48d)
2007-10-10 13:38:01 -05:00
Stefan Metzmacher
13f7e6a0c6 r10115: bind client connection to the best interface, to the partner
metze
(This used to be commit e44aca0a8e)
2007-10-10 13:38:00 -05:00
Stefan Metzmacher
63ef3c7fdc r10113: rename libcli/wins to libcli/wrepl
metze
(This used to be commit d8b84112bb)
2007-10-10 13:38:00 -05:00
Tim Potter
561a02d646 r10103: Put an #ifdef guard around ENOTSUP to fix systems that don't have it
(OpenBSD 3.7).
(This used to be commit cc24af6545)
2007-10-10 13:37:59 -05:00
Stefan Metzmacher
1e05f9a00a r10081: - create a seperate WINSDB subsystem
- use LIBCLI_WREPL for the winsreplication client code
- fix some dependencies

metze
(This used to be commit 7dd931ee5a)
2007-10-10 13:37:51 -05:00
Derrell Lipman
181fde4729 r9824: r9495@cabra: derrell | 2005-08-31 09:33:55 -0400
add a readme file to indicate what the smbc directory is for
(This used to be commit c1a9ea47a3)
2007-10-10 13:36:15 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Andrew Tridgell
c98c6aa561 r9702: r9680@blu: tridge | 2005-08-27 18:45:08 +1000
- fixed ncacn_ip_tcp to use the generic async name resolution methods,
   so NBT names now work (as requested several times by abartlet!)

 - changed resolve_name() to take an event_context, so it doesn't cause
   the whole process to block

 - cleaned up the talloc_find_parent_bytype() calls to go via a cleaner
   event_context_find() call
(This used to be commit b3d491b210)
2007-10-10 13:34:51 -05:00
Stefan Metzmacher
81021aaa95 r9638: add error code that you get when you call DsGetNCChanges() with a tmp_highest_usn which is
higher than the real highest of the source dsa

metze
(This used to be commit e4424d2a6d)
2007-10-10 13:34:36 -05:00
Andrew Tridgell
38e2d25eda r9573: fixed a comment
(This used to be commit d151a9459d)
2007-10-10 13:34:30 -05:00
Stefan Metzmacher
36dcb8425d r9514: add some new error codes I was getting with DsGetNCChanges() and DsAddEntry()
metze
(This used to be commit 2cbbb8ace2)
2007-10-10 13:34:25 -05:00
Stefan Metzmacher
7b211a11c3 r9511: - fix the memory trees
- add a note about a possible talloc_free()

metze
(This used to be commit 550e3030f0)
2007-10-10 13:34:24 -05:00
Stefan Metzmacher
aaa0aff2d6 r9510: fix the memory tree
metze
(This used to be commit 6d412cf0a4)
2007-10-10 13:34:24 -05:00
Andrew Bartlett
ba90b652d9 r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting.

In particular, the composite session setup (extended security/SPNEGO)
code now returns errors, rather than NT_STATUS_NO_MEMORY.  This is
seen particularly when GENSEC fails to start.

The tighter interface rules apply to NTLMSSP, which must be called
exactly the right number of times.  This is to match some of our other
less-tested modules, where adding flexablity is harder.  (and this is
security code, so let's just get it right).  As such, the DCE/RPC and
LDAP clients have been updated.

Andrew Bartlett
(This used to be commit 134550cf75)
2007-10-10 13:34:24 -05:00
Alexander Bokovoy
294f0aaf9c r9479: More fixes for explicit ignoring of returned result to fix Coverity warnings
(This used to be commit 4f9f4312e9)
2007-10-10 13:34:20 -05:00
Alexander Bokovoy
5bd6a11471 r9476: Make intention to ignore result of receiving excplicit. Fixes warning found by Coverity
(This used to be commit d1b7a4a24c)
2007-10-10 13:34:20 -05:00
Andrew Bartlett
684c824e9a r9421: Move arcfour code into it's own file, in lib/crypto.
Andrew Bartlett
(This used to be commit ca6cf46270)
2007-10-10 13:33:37 -05:00
Tim Potter
76787d5da4 r9291: Add a stub for smb_raw_lpq() which is in smb_interfaces.h but doesn't
seem to be used anywhere yet.
(This used to be commit 9e5ce3a288)
2007-10-10 13:33:21 -05:00
Stefan Metzmacher
3be75a4c6d r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module

- fix compiler warnings in the ldap_encode_ndr_* code

metze
(This used to be commit 83d65d0d7e)
2007-10-10 13:31:37 -05:00
Tim Potter
172cee9adc r9223: Rename smb_raw_session_setup() to smb_raw_sesssetup().
(This used to be commit 5e6d330e73)
2007-10-10 13:31:33 -05:00
Tim Potter
2fa50ab671 r9222: Rename smb_tree_connect() to smb_raw_tcon() to match other raw function
names.
(This used to be commit 26b191b3c9)
2007-10-10 13:31:33 -05:00
Andrew Tridgell
223262c11e r9048: added a new DOS error code (thanks to EMC)
(This used to be commit 1936c20939)
2007-10-10 13:31:11 -05:00
Simo Sorce
f297f82398 r8917: Better support for extended ldap search operations
Try to follow the RFC where possible and adapt to
  openLdap and AD way of handling this structure
(This used to be commit d844d45d87)
2007-10-10 13:30:57 -05:00
Jelmer Vernooij
d0496a4ee6 r8825: Move list of object files to .mk file
(This used to be commit 604422b1f9)
2007-10-10 13:30:09 -05:00
Jelmer Vernooij
6553dd0c60 r8811: Fix the build..
(This used to be commit fac77f5fa2)
2007-10-10 13:30:07 -05:00
Rafal Szczesniak
0102f2752f r8788: New monitor messages.
rafal
(This used to be commit 40061d7bd6)
2007-10-10 13:30:05 -05:00
Andrew Tridgell
d929f32dbe r8777: make sure that the tree connect is a child of the return cli state structure.
This fixes the BASE-DISCONNECT test
(This used to be commit 86fe5817b1)
2007-10-10 13:30:04 -05:00
Andrew Tridgell
528bb470bd r8776: fixed SMB connections for IP addresses, even when name resolve order
doesn't include 'host'
(This used to be commit 77a1e3076a)
2007-10-10 13:30:04 -05:00
Rafal Szczesniak
a04e899bc0 r8760: Rework monitor messaging code a bit, as Metze once suggested.
enum type has now been replaced with unsigned 32-bit field and
message data is passed as void pointer.

This allows various extension implementers to plug their monitor
messages in more easily.

rafal
(This used to be commit 4a6ab58133)
2007-10-10 13:30:03 -05:00
Andrew Bartlett
176c0d1b77 r8699: removed invalid comment
(This used to be commit f5910ceef5)
2007-10-10 13:29:55 -05:00
Andrew Tridgell
d9cfd55dbb r8628: add retries to the normal paths of nbt name resolution. UDP broadcasts are not 100% reliable :)
(This used to be commit 0f8f1cd18e)
2007-10-10 13:29:46 -05:00
Simo Sorce
bfb1186269 r8585: add to ldb and ldap comparison functionality
better pares filters
Approx is currently only a stub need to dig more info to
understand what it really means and how it works exactly
(This used to be commit a9e8cd0bad)
2007-10-10 13:29:41 -05:00
Simo Sorce
f4576157ed r8530: Now our ldap server is able to fullfill present and substring searches
(This used to be commit a910671bd8)
2007-10-10 13:29:35 -05:00
Andrew Tridgell
039393d662 r8523: match a zero message id in ldap replies to the last request sent. Thanks to simo
for noticing that this is needed to catch the server sending a "can't decode request"
error reply
(This used to be commit 6e81e866dc)
2007-10-10 13:29:35 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Tim Potter
52bef30fd4 r8414: Some C++ friendlyness fixes - 'not' is apparently a keyword in C++.
(This used to be commit bcfb3a45e4)
2007-10-10 13:23:00 -05:00
Andrew Tridgell
562498c526 r8407: fixed a bug left over from our old socket code.
Thanks to lha for giving me a login on a netbsd machine to see this
(This used to be commit 4e66f682e4)
2007-10-10 13:22:58 -05:00
Love Hörnquist Åstrand
61edb97bdf r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
(This used to be commit 56fd21c806)
2007-10-10 13:20:14 -05:00
Andrew Tridgell
bde98850be r8247: remove the free of fullname in nbtname.c for now.
Metze, the ndr_token_store() code is storing temporary pointers into
this string in the token list, which means we are referring to freed
memory when we scan the token list. A better key might be a pointer
into the ndr buffer?
(This used to be commit 6a4e8cc991)
2007-10-10 13:19:25 -05:00
Stefan Metzmacher
e296c8de6e r8212: fix pushing of nbt_string's:
- we now use an ndr_token_list, for the nbt string label pointer offsets
  this avoids to scan the whole buffer

- we need to check for already send string on a per component basis
  not only for the fullname

e.g.
w2k3 response this in the CLDAP netlogon replies

forest: w2k3.vmnet1.vm.base
dns_name: sub1.
pdc_dns_name: w2k3-104.

and this will be interpreted like

forest: w2k3.vmnet1.vm.base
dns_name: sub1.w2k3.vmnet1.vm.base
pdc_dns_name: w2k3-104.w2k3.vmnet1.vm.base

metze
(This used to be commit d18303a0e2)
2007-10-10 13:19:20 -05:00
Jeremy Allison
3de3d6a02d r8174: Check DOS error codes in torture chkpath test.
Jeremy.
(This used to be commit ff58ecad04)
2007-10-10 13:19:17 -05:00
Stefan Metzmacher
cf601f71aa r8134: remove unused var
metze
(This used to be commit f308b72b19)
2007-10-10 13:19:12 -05:00
Andrew Tridgell
65ae28dfa7 r8125: fixed an error code mapping based on the updated torture tests
(This used to be commit a3b8a00d7f)
2007-10-10 13:19:11 -05:00
Andrew Tridgell
934831686c r8115: added support for 2 more dos error codes found during testing
(This used to be commit 97cb705713)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
950f662484 r8111: fixed the client library to work against w2k3 with nt status codes
disabled. The main change is to turn off spnego, which cannot work at
all without nt status codes (w2k3 gives a ERRHRD:ERRgeneral error when
you try)

I also modified NT_STATUS_EQUAL() to allow for nt->dos code equality,
but only when nt status codes are disabled in smb.conf. That keeps all
the existing torture code working, while still allowing us to
correctly catch the cases where forced dos error codes are needed

The dos->ntstatus mapping table has been removed completely, as it
doesn't really make sense, is impossible to get right, and with the
new dos status handling isn't needed. When matching a nt status code
to a dos status code it makes far more sense to map from the nt code
to the dos code and compare, rather than the reverse, as the nt->dos
mapping is what windows has to do internally, so there really is a
valid mapping table.
(This used to be commit f21274e07b)
2007-10-10 13:19:09 -05:00
Andrew Tridgell
b3383236a2 r8106: the use of a static string for dos error codes was causing problems in
the torture code. To fix this, get rid of dos_errstr() and instead
move the strings into the nt_errstr() table, using cpp to generate the
strings
(This used to be commit 3136ad9634)
2007-10-10 13:19:08 -05:00
Andrew Tridgell
e0d521ca79 r8104: - added support for our client library to not negotiate nt status codes, controlled
with 'nt status support' option.

- make nt_errstr() display nice strings for dos status codes encoded
  using NT_STATUS_DOS()

- no longer map between dos and nt status codes in the client library,
  instead return using NT_STATUS_DOS()

- fixed the RAW-CONTEXT test to look for
  NT_STATUS_DOS(ERRSRV, ERRbaduid) instead of NT_STATUS_INVALID_HANDLE
(This used to be commit ff5549e87f)
2007-10-10 13:19:08 -05:00
Andrew Tridgell
1050a54a3b r8003: ensure that we don't try to send a trans request with more than 64k data or params
(This used to be commit b4f2d17ace)
2007-10-10 13:18:57 -05:00
Andrew Tridgell
c58c7c4164 r8002: favor addresses on our local interfaces in NBT name resolution if
possible. This is needed because w2k3 will return bogus IPs in its
name resolution replies when it has an unplugged network interface.
(This used to be commit 2fafc23052)
2007-10-10 13:18:57 -05:00
Andrew Bartlett
025e03de54 r7970: This SMB signing code (merged from 3.0) turned out to be bogus.
Andrew Bartlett
(This used to be commit 817160ec1a)
2007-10-10 13:18:55 -05:00
Andrew Tridgell
d6c1ad5c17 r7941: fixed handling of ASN.1 objects bigger than 64k
(This used to be commit f88a601882)
2007-10-10 13:18:53 -05:00
Andrew Tridgell
152a6a00c3 r7865: changed pidl to take a "const void *" instead of a "void *" for the
structure in ndr_push_*() and ndr_print_*(). The push and print
functions really should not modify the structure.

metze, to make this work I had to change your spoolss hand
marshaller. Can you please check it is OK? I think that the IN and OUT
sides of that function are not ever called on the same structure, so I
think that attempt at remembering the value by assigning to
r->in._offered was not doing anything anyway, but please correct me if
I have misunderstood it.

If you really do need to remember something on those structures I'd
suggest the ndr_token_store() and ndr_token_retrieve() functions,
which are used by pidl for just this sort of thing.
(This used to be commit eee528be97)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
(This used to be commit d40bc2fa8d)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
21d6a163a3 r7856: fixed warning of 'methods' shadowed variable
(This used to be commit c435843c66)
2007-10-10 13:18:43 -05:00
Andrew Tridgell
acd04c9281 r7855: fixed a typo
(This used to be commit a1155651e7)
2007-10-10 13:18:43 -05:00
Rafal Szczesniak
49417aaed7 r7814: Propagate the change in resolve_name_send function.
(This used to be commit 7abd634701)
2007-10-10 13:18:40 -05:00
Rafal Szczesniak
338bc0f58a r7813: Make async request independent from config file routines.
rafal
(This used to be commit 84315cdf0d)
2007-10-10 13:18:38 -05:00
Andrew Tridgell
bec0058124 r7810: don't give errors when the ldap server sends us reference replies
(This used to be commit f2b2d2626f)
2007-10-10 13:18:38 -05:00
Andrew Tridgell
5eccf719fb r7770: added ldaps support to our ldap client library
(This used to be commit 8f5c2e8682)
2007-10-10 13:18:34 -05:00
Andrew Tridgell
a40d966ff5 r7763: fixed some circular dependencies
(This used to be commit 3bdf89b0f7)
2007-10-10 13:18:32 -05:00
Andrew Bartlett
e578c33c2c r7757: Add NTLMv2 support to the NT1 Session setup (ie, not SPNEGO/NTLMSSP)
Session Setup code.

Add a mem_ctx argument to a few of the NTLMv2 support functions, and
add smb.conf options to control client NTLMv2 behaviour.

Andrew Bartlett
(This used to be commit 3f35cdb218)
2007-10-10 13:18:32 -05:00
Andrew Tridgell
7267cb3312 r7749: some bug fixes from testing with socket:testnonblock
- fixed some infinite loops in asn1.c

- ensure asn1 callers know if an error is end of buffer or bad data

- handle npending 0 in ldap server
(This used to be commit f22c3b84c8)
2007-10-10 13:18:30 -05:00
Andrew Tridgell
c7496c6cdb r7747: - simplified the ldap server buffer handling
- got rid of the special cases for sasl buffers

- added a tls_socket_pending() call to determine how much data is waiting on a tls connection

- removed the attempt at async handling of ldap calls. The buffers/sockets are all async, but the calls themselves
  are sync.
(This used to be commit 73cb4aad22)
2007-10-10 13:18:30 -05:00
Andrew Tridgell
68853a1c7b r7746: - added TLS support to our ldap server
- this involved changing the buffer handling in the ldap server quite a
  lot, as it didn't handle partial packets at all

- removed completely bogus asn1_object_length() function. You can't
  do that with BER/DER
(This used to be commit fed6f4cc6c)
2007-10-10 13:18:30 -05:00
Rafal Szczesniak
7a8315bddc r7736: Propagate change in resolve_name function. Let's use default methods
in this case.

rafal
(This used to be commit b0bae584a4)
2007-10-10 13:18:28 -05:00
Rafal Szczesniak
b773ca709a r7735: Extend resolve_name function so that it's possible to pass resolve
methods explicitly or NULL for defaults saved in smb.conf.

rafal
(This used to be commit 121cf5ec3e)
2007-10-10 13:18:28 -05:00
Stefan Metzmacher
d52ce8ff0c r7731: change debug level to not spam the build-farm smbd log
metze
(This used to be commit 3a1ed83fd0)
2007-10-10 13:18:27 -05:00
Andrew Tridgell
e2bb0d0ba7 r7725: fixed a bug with partial asn1 frames in the ldap client
(This used to be commit 0f22306a9c)
2007-10-10 13:18:26 -05:00
Andrew Tridgell
be19641f30 r7724: added encoding of LDB_OP_NOT search components
(This used to be commit 82b1feeafe)
2007-10-10 13:18:26 -05:00
Andrew Tridgell
2a0a0f2551 r7723: - fix a mismatched asn1 push/pop on bind
- add error checking to ldap_encode()

- fixed the asn1 codes for extended search

- use asn1 context macros
(This used to be commit 25d500b6e5)
2007-10-10 13:18:26 -05:00
Andrew Tridgell
91a79f2b24 r7722: when we get a zero read, the connection is dead
(This used to be commit 0603235304)
2007-10-10 13:18:26 -05:00
Andrew Tridgell
b4eee348c4 r7720: - simplify the asn1 decode of ldap_search() a lot, taking advantage of
the fact that the ldap data structures now use ldb_message_element.

- fixed null termination of elements in ildap
(This used to be commit 09060994c1)
2007-10-10 13:18:26 -05:00
Andrew Tridgell
ca91a8a691 r7717: fixed some typos
(This used to be commit fc8feee560)
2007-10-10 13:18:25 -05:00
Andrew Tridgell
1e99722d02 r7716: a single wrapped ldap blob can contain multiple ldap messages
(This used to be commit de5f265b6c)
2007-10-10 13:18:25 -05:00
Andrew Tridgell
90cf33953d r7715: ensure we don't print null strings in ldap_errstr()
(This used to be commit dc419fc899)
2007-10-10 13:18:25 -05:00
Andrew Tridgell
56b79e945f r7713: fixed error display in ildap_search()
(This used to be commit abc9f4bd89)
2007-10-10 13:18:25 -05:00
Andrew Tridgell
777b4b0214 r7705: prevent SIGPIPE. this is what causes BASE-NEGNOWAIT to sometimes fail
(This used to be commit 0163d7fe99)
2007-10-10 13:18:24 -05:00
Andrew Tridgell
ee57c76a68 r7704: - fixed open_nbt_connection() to return NULL when the connection failed
- got rid of smbcli_shutdown() and use talloc_free() instead.
(This used to be commit 1011b1bf51)
2007-10-10 13:18:23 -05:00
Stefan Metzmacher
fca7031da9 r7679: update the documentation of security_description_create()
metze
(This used to be commit 6ad7ffab04)
2007-10-10 13:18:21 -05:00
Andrew Tridgell
ab1e121b76 r7665: - added a ildap_*() interface to our internal ldap library. This
interface is very similar to the traditional ldap interface, and will
  be used as part of a ldb backend based on the current ldb_ldap backend

- fixed some allocation issues in ldb_msg.c
(This used to be commit b34a29dcf2)
2007-10-10 13:18:19 -05:00
Andrew Tridgell
d13e788f20 r7654: - add a timeout to all smb requests (default 60 seconds)
- add a request destructor, to make it safe to destroy a pending
   request with talloc_free()
(This used to be commit 72c6988767)
2007-10-10 13:18:17 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Andrew Tridgell
bab977dad7 r7626: a new ldap client library. Main features are:
- hooked into events system, so requests can be truly async and won't
   interfere with other processing happening at the same time

 - uses NTSTATUS codes for errors (previously errors were mostly
   ignored). In a similar fashion to the DOS error handling, I have
   reserved a range of the NTSTATUS code 32 bit space for LDAP error
   codes, so a function can return a LDAP error code in a NTSTATUS

 - much cleaner packet handling
(This used to be commit 2e3c660b2f)
2007-10-10 13:18:14 -05:00
Andrew Tridgell
ec4a99ffe8 r7599: it turns out we were not using the ldif code in libcli/ldap/ at all,
so best to just remove it. If we need it again, then it will be easy
to just use a wrapper around the ldb code.
(This used to be commit b316e1c2d3)
2007-10-10 13:18:13 -05:00
Andrew Tridgell
49bc2672f8 r7598: take advantage of struct data_blob and struct ldb_val being the same
structure in a couple of places
(This used to be commit bcd4671aca)
2007-10-10 13:18:13 -05:00
Andrew Tridgell
3e92471d4c r7596: next step in ldap cleanup. I'm aiming to get rid of the cut&pasted
ldif parsing code in libcli/ldap/ldap_ldif.c, and instead use the ldb
ldif code. To do that I have changed the ldap code to use 'struct
ldb_message_element' instead of 'struct ldap_attribute'. They are
essentially the same structure anyway, so by making them really the
same it will be much easier to use the ldb code in libcli/ldap/

I have also made 'struct ldb_val' the same as a DATA_BLOB, which will
simplify data handling in quite a few places (I haven't yet removed
all the code that maps between these two, that will come later)
(This used to be commit 87fc307339)
2007-10-10 13:18:12 -05:00
Andrew Tridgell
c0947b0d7f r7593: simplified the memory management in the ldap code. Having a mem_ctx
element in a structure is not necessary any more.
(This used to be commit 912d0427f5)
2007-10-10 13:18:12 -05:00
Tim Potter
26d35d90a2 r7569: Fix typo in comments.
(This used to be commit 64fb327ccf)
2007-10-10 13:18:10 -05:00
Andrew Tridgell
6426f2a39a r7567: added wire parsing of NOT and extended ldap search requests. This
allows us to parse and handle the complex queries we are getting from
w2k, such as

(|(|(&(!(groupType:1.2.840.113556.1.4.803=1))(groupType:1.2.840.113556.1.4.803=2147483648)(groupType:1.2.840.113556.1.4.804=6))(samAccountType=805306368))(samAccountType=805306369))
(This used to be commit 041bce5913)
2007-10-10 13:18:10 -05:00
Andrew Tridgell
9d6b3e62c2 r7566: added support for LDAPString types in the asn.1 library
(This used to be commit 1a81d28456)
2007-10-10 13:18:10 -05:00
Andrew Tridgell
4b0e5bd753 r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
instead of a search expression. This allows our ldap server to pass
  its ASN.1 parsed search expressions straight to ldb, instead of going
  via strings.

- updated all the ldb modules code to handle the new interface

- got rid of the separate ldb_parse.h now that the ldb_parse
  structures are exposed externally

- moved to C99 structure initialisation in ldb

- switched ldap server to using ldb_search_bytree()
(This used to be commit 96620ab2ee)
2007-10-10 13:18:06 -05:00
Andrew Tridgell
8fd5825a89 r7524: make the ldap ASN.1 filter parse code go via a struct
ldb_parse_tree. This also fixes the error handling.

next step will be to pass the parse tree straight into ldb, avoiding
the string encoding completely.
(This used to be commit 235cf625e2)
2007-10-10 13:18:06 -05:00
Andrew Tridgell
816f4f7c4a r7519: rip the copy of the ldap expression parser out of libcli/ldap/ and use
the original one in lib/ldb/ instead. Having two copies of this code
is silly.
(This used to be commit 0e9f18c448)
2007-10-10 13:18:04 -05:00
Andrew Tridgell
07b0d86121 r7483: ensure we try reading from a socket if epoll says we can, and don't
just do the write. This is needed because the write could return
-1/EAGAIN for dgram sockets, if the socket buffer is nearly full. The
epoll loop then goes on forever.

This was causing some failures in 'make test'
(This used to be commit b7fefe76a2)
2007-10-10 13:17:58 -05:00
Tim Potter
6412e8eeae r7482: Rename smbcli_send_tconX() to smbcli_tconX() so as not to get it
confused with an async function.
(This used to be commit 340ad67cad)
2007-10-10 13:17:58 -05:00
Tim Potter
302b4db004 r7455: Remove some talloc contexts that aren't used.
(This used to be commit b0ad51f2ce)
2007-10-10 13:17:54 -05:00
Volker Lendecke
c96492a9dc r7436: As far as I see it, these are the last two "real" ones for Samba4 on AIX to
build. The remaining patch (not now) is to convert the javascript stuff not to
use // style comments.

Volker
(This used to be commit 29f7e430ac)
2007-10-10 13:17:53 -05:00
Volker Lendecke
46c231f1c8 r7435: Another little step, sorry for the spam... :-)
(This used to be commit 96d9b7fc98)
2007-10-10 13:17:53 -05:00
Volker Lendecke
35314f2427 r7433: Another little AIX one...
(This used to be commit c1ccaa0cc9)
2007-10-10 13:17:53 -05:00
Volker Lendecke
09753bf20a r7430: Next step in AIX build
(This used to be commit 43e1bd870d)
2007-10-10 13:17:52 -05:00
Jelmer Vernooij
7c9d76d30c r7377: Integrate browse service stuff more nicely
Add notes on mailslots
Add TODO list for pidl, including some plans on switching
over to using [string] attributes for pidl.
(This used to be commit fca195ce07)
2007-10-10 13:17:48 -05:00
Andrew Tridgell
4be9b65d77 r7230: use socket_pending() to get rid of the max packet size limits in the
cldap code
(This used to be commit 9da5379048)
2007-10-10 13:17:29 -05:00
Andrew Tridgell
665480ffed r7229: use socket_pending() to get rid of the max packet size limits in the
nbt and dgram layers
(This used to be commit 2a9efbdae6)
2007-10-10 13:17:29 -05:00
Tim Potter
9b8c012392 r7010: Merge libcli/libsmb.mk into libcli/config.mk
(This used to be commit d7d48adce9)
2007-10-10 13:17:05 -05:00
Tim Potter
2b7fe67f4d r6933: Add a couple of helper functions for creating nbt names.
(This used to be commit b896daf11c)
2007-10-10 13:16:58 -05:00
Tim Potter
e4d5dde7c8 r6930: Use NBT_NAME_CLIENT instead of the number 0.
(This used to be commit e6b53ce177)
2007-10-10 13:16:57 -05:00
Tim Potter
3c6a91069a r6929: LIBCLI_NBT depends on LIB_SECURITY_NDR for various security descriptor
utilities.
(This used to be commit 9b319fc56f)
2007-10-10 13:16:57 -05:00
Tim Potter
cd8cb33d3a r6851: Typo in comment.
(This used to be commit e1864a7ac9)
2007-10-10 13:16:51 -05:00
Jelmer Vernooij
e73d051e20 r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
(This used to be commit b9d0ae93ba)
2007-10-10 13:16:50 -05:00
Andrew Tridgell
9469051d5b r6817: - fixed empty ldap search elements in filters
- added support for guids in cldap netlogon searches.

the cldap server now passes the LDAP-CLDAP torture test
(This used to be commit eb7979d9de)
2007-10-10 13:16:47 -05:00
Andrew Tridgell
6f36f7cd25 r6766: some more cldap tests ...
my best guess now is that w2k3 converts the & in the cldap query to an |
for the ldap search. at least it behaves roughly like that.
(This used to be commit 1d6ab9aaef)
2007-10-10 13:16:42 -05:00
Andrew Tridgell
06869ce014 r6764: added support for DomainGuid, DomainSid, AAC, and User attributes in
cldap netlogon queries
(This used to be commit 7c1d0f449d)
2007-10-10 13:16:42 -05:00
Andrew Tridgell
4029df5e60 r6763: added functions in libcli/ldap/ to binary encode some NDR structures into
ldap friendly filter strings
(This used to be commit 8890dd3ac3)
2007-10-10 13:16:42 -05:00
Andrew Tridgell
c956f4f982 r6745: - escape spaces in binary ldap blobs
- expose the ldap filter string parsing outside of ldap.c
(This used to be commit b644ff6fe1)
2007-10-10 13:16:40 -05:00
Andrew Tridgell
ea6943ec79 r6744: added support for reply packets in libcli/cldap/
(This used to be commit 992858e1b9)
2007-10-10 13:16:40 -05:00
Stefan Metzmacher
2542d54e93 r6732: - move sasl send recv code to the ldap lib
- support 'modrdn' ldif

metze
(This used to be commit b6a1734699)
2007-10-10 13:16:39 -05:00
Andrew Tridgell
49304e965f r6726: support binary search elements in ldap_decode()
(This used to be commit 2b36f1dfdd)
2007-10-10 13:16:38 -05:00
Andrew Tridgell
a8c26fa4ac r6724: added "cldap port" smb.conf parameter
(This used to be commit 04af0e7c5d)
2007-10-10 13:16:37 -05:00
Andrew Tridgell
2f2fc84a7c r6720: added support for the remaining 2 types of CLDAP netlogon
response.

To work around the fact that the type of the returned data is not
encoded in the packet, this required adding ndr_pull_union_blob()
which allows us to pull a blob into a union with a specified switch
value, in this case the switch value comes from the calling NtVer field.
(This used to be commit bd27e626c2)
2007-10-10 13:16:37 -05:00
Rafal Szczesniak
5cbfca2967 r6708: Another type of monitor message.
rafal
(This used to be commit f7aaa0bfca)
2007-10-10 13:16:36 -05:00
Andrew Bartlett
1cf8396db4 r6702: Revert -r 6699, as I think this is a win2k v win2k3 issue.
Andrew Bartlett
(This used to be commit 77b67da5b8)
2007-10-10 13:16:36 -05:00
Andrew Bartlett
493cab3dbc r6699: Windows clients seem to ask for CIFS/, ie in upper case, so match it.
Andrew Bartlett
(This used to be commit 6d7f1daaf2)
2007-10-10 13:16:35 -05:00
Andrew Tridgell
0ac02ed7c3 r6693: first version of cldap client library, with async interface
(This used to be commit cbeffe830b)
2007-10-10 13:16:35 -05:00
Andrew Tridgell
489a6b5591 r6692: used idr_get_new_random() in the nbt client library
(This used to be commit a3f64357af)
2007-10-10 13:16:35 -05:00
Andrew Tridgell
c8177de955 r6691: fixed a comment
(This used to be commit a0fa871c3f)
2007-10-10 13:16:34 -05:00
Andrew Tridgell
f6c0bee791 r6689: minor ldap client library work
- added support for binary encoded search filters
 - fixed some const handling
 - changed the message type to an enum, to help debugging
(This used to be commit d5353b6342)
2007-10-10 13:16:34 -05:00
Rafal Szczesniak
aefd5df199 r6614: Basic approach to monitoring messages for composite functions.
rafal
(This used to be commit 47a7a6c3fc)
2007-10-10 13:16:30 -05:00
Andrew Bartlett
0501a440be r6462: Move the arcfour sbox state into it's own structure, and allocate it
with talloc() for the NTLMSSP system.

Andrew Bartlett
(This used to be commit 7a93ac49c2)
2007-10-10 13:11:39 -05:00
Andrew Bartlett
874cd2db86 r6460: Push the client credentials into NTLMSSP, allowing logins of the form
user@REALM for the first time.

Fix the build for smbencrypt.c

Andrew Bartlett
(This used to be commit 5a6a57cd93)
2007-10-10 13:11:39 -05:00
Alexander Bokovoy
9779e6d670 r6352: Two new composite calls:
- qfsinfo (query file system information)
- appendacl (append an ACL to existing file's security descriptor and get new
full ACL)

The second one also includes an improvement to security descriptor handling
which allows to copy security descriptor. Written by Peter Novodvorsky
<peter.novodvorsky@ru.ibm.com>

Both functions have corresponding torture tests added. Tested under valgrind and
work against Samba 4 and Windows XP.

ToDo: document composite call creation process in prog_guide.txt
(This used to be commit 441cff62ac)
2007-10-10 13:11:34 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
e284a26294 r6338: ADS style GETDC response now works well enough that WinXP can join
Samba4 without Samba3 nmbd
(This used to be commit f4d07d7d3b)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
8c4e06004c r6335: at debug level 10, save netlogon and ntlogon packets that fail to parse
(This used to be commit c29279355c)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
a451bc70e0 r6333: removed an extraneous line (pointed out by metze)
(This used to be commit 61d65d100d)
2007-10-10 13:11:32 -05:00
Andrew Tridgell
8d0a36366c r6331: added IDL and test suite for the ADS style response to a datagram netlogon query.
Note that this response is almost identical to the CLDAP netlogon
response, so adding that will now be quite easy.
(This used to be commit 1ea4ed4ad1)
2007-10-10 13:11:32 -05:00
Andrew Tridgell
63ddff3d7b r6323: added server side support for dgram NTLOGON requests. NT4 workstations can now login
to a Samba4 domain.
(This used to be commit df146d64eb)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
f06e39e308 r6321: added IDL and test suite for NBT dgram 'sam logon' request (sent by
clients when a user tries to login)
(This used to be commit 08ded62156)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b6fd09d805 r6320: some minor netlogon datagram fixes - NT4 can now join a Samba4 domain without
Samba3 nmbd
(This used to be commit 4507bdc339)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b708e87a63 r6288: the nbt dgram server now responds to GETDC requests. It works with our
test suite, but doesn't yet seem to satisfy a nt4 client. I'm
investigating.
(This used to be commit 406217262d)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
e7dd6a1291 r6287: sorted out a small but surprisingly tricky dependency problem with the
ndr code for handling sids and security descriptors now that we have a
sid in the nbt IDL
(This used to be commit f8e77fcdea)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
ce7eb41930 r6248: added parsing of type 10 UAS announce netlogon packets
(This used to be commit d7e6e395ce)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
b0ca8ed455 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
(This used to be commit 3b34df6a67)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
f83e6ded9d r6245: receive and parse the GETDC response in the NBT-DGRAM test. The test
now tries to bind to port 138 if possible, so if you run it as root
and smbd/nmbd is not running then it works against windows servers
(This used to be commit 52ccdb79bc)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
7c6c366150 r6223: added a bit more datagram infrastructure and the beginnings of a test
suite. The NBT-DGRAM test does a UDP/138 netlogon request, to which a
windows server sends a reply, but the windows server sends the reply
to the wrong port (it always sends to 138), so the test suite doesn't
see it.
(This used to be commit a7634625db)
2007-10-10 13:11:27 -05:00
Andrew Tridgell
769070d502 r6209: started added code to support mailslot requests over UDP/138
datagrams. This adds the IDL to parse mailslot packets, plus mailslot
dispatch and listener registration code.

mailslots are used for UDP/138 browse and netlogon packets
(This used to be commit f20e7e5200)
2007-10-10 13:11:26 -05:00
Andrew Tridgell
6db5d09dba r6185: added LIBCLI_DGRAM to the list of libs to be built as part of LIBCLI
(This used to be commit 47e1452da0)
2007-10-10 13:11:24 -05:00
Andrew Tridgell
a47cb58c2f r6184: the beginnings of the libcli/dgram/ library, and the dgram
server. Currently just listens on port 138 and parses the packets
(using IDL like the rest of NBT). This allows me to develop the
structures and test with real packets
(This used to be commit 10d64a5253)
2007-10-10 13:11:24 -05:00
Andrew Bartlett
7cabdeb7ec r6113: Move GENSEC and the kerberos code out of libcli/auth, and into
auth/gensec and auth/kerberos.

This also pulls the kerberos configure code out of libads (which is
otherwise dead), and into auth/kerberos/kerberos.m4

Andrew Bartlett
(This used to be commit e074d63f3d)
2007-10-10 13:11:20 -05:00
Andrew Bartlett
e6aeeb5269 r6094: Work on the Kerberos code recently merged from Samba 3.0. This fixes
up issues I introduced during the merge, that caused a segfault.

I've still not got the keytab code to work for me (using Samba3 to
generate the keytab) so this is still not fully tested, but it's
better than it was.

To add debugging, I now use the krb5_get_error_message() function from
Heimdal when present, to return the custom error string, which
contains far, far more information than the simple error code does.

(This last point may well be worth merging back into 3.0)

Andrew Bartlett
(This used to be commit ed5755d9d1)
2007-10-10 13:11:18 -05:00
Andrew Bartlett
68d7a5e383 r6078: Correctly fix the failures for NT1 (not SPNEGO) session setups in the
client.  The issue was actually a cut-and-paste bug, I was filling in
the .old not the .nt1 part of the union.

I've also removed the 'error checks' - I'll shortly document the API
for the credentials code to clarify that it will always return a
pointer here, except in cases of programmer error.

Tridge:  I hope this is OK.

Andrew Bartlett
(This used to be commit 6439de9ec8)
2007-10-10 13:11:17 -05:00
Andrew Tridgell
0c936acc47 r6074: fixed non-spnego connections for new credentials code
(This used to be commit ff6663aac8)
2007-10-10 13:11:17 -05:00
Andrew Bartlett
73b77ee151 r6030: Missing from previous commit, a small header file to link
libcli/auth/schannel.c and libcli/auth/schannel_sign.c

Andrew Bartlett
(This used to be commit 1e0e66d720)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
46b22b073c r6027: Add copyright, and add a useful debug message.
Andrew Bartlett
(This used to be commit b5260cf0d4)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
f82bafa067 r6026: Update the kerberos keytab code to match Samba3 again.
(untested at this point).

Andrew Bartlett
(This used to be commit ef7f9a01b4)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
f312d91d60 r6025: Remove unused variables. This code will be modified again for the new
cli_credentials code shortly.

Andrew Bartlett
(This used to be commit 13d09c8e9a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
b8f395cf78 r5992: Rename schannel.c -> schannel_sign.c. The rest of the schannel code
(from librpc) will be moved into schannel.c soon.

Andrew Bartlett
(This used to be commit d6c80ff74b)
2007-10-10 13:11:13 -05:00
Andrew Bartlett
79f6bcd5ae r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
(This used to be commit e13c671619)
2007-10-10 13:11:12 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
376b03ebd8 r5940: fix schannel against w2k, it skips the confounder in the signature (24 bytes) for singed packets
but it accepts 32 bytes from the client.

(w2k3 accept it the otherway arround too)

metze
(This used to be commit 08d4c3b9f8)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
928af7e6ff r5877: It is not an error to have a zero-length secret, after decryption.
Andrew Bartlett
(This used to be commit b484776cc4)
2007-10-10 13:11:06 -05:00
Jelmer Vernooij
ef213b0248 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
736797ef7f r5737: add some error codes
metze
(This used to be commit f543eb4ede)
2007-10-10 13:11:01 -05:00
Andrew Bartlett
42031bc4be r5668: Add tests to RPC-SAMLOGON to test for user@REALM style logins. These
need a NULL domain (or a "" domain, except this breaks NTLMv2, and I
need to look into it a bit more).

Add support to the Samba4 server for these logins.  This will need
extension when we handle trusted domains as a DC, as it is a principal
name, not just another format for the username.

Andrew Bartlett
(This used to be commit de02c7c222)
2007-10-10 13:10:58 -05:00
Andrew Bartlett
765832748b r5667: Move schannel state into libcli/auth (as it belongs with schannel,
which will move in with the rest of GENSEC shortly).

Add the RID as another element in the schannel state.

Andrew Bartlett
(This used to be commit 69114b4a8e)
2007-10-10 13:10:58 -05:00
Alexander Bokovoy
3a55299221 r5646: state->loadfile might be NULL after allocation so this is really
should be NT_STATUS_HAVE_NO_MEMORY(state->loadfile) instead of
NT_STATUS_NOT_OK_RETURN(status).
(This used to be commit eb57a58788)
2007-10-10 13:10:56 -05:00
Stefan Metzmacher
70f7c56168 r5601: add a gsskrb5 backend that uses lorikeet-heimdal's new gssapi with
GSS_C_DCE_STYLE support, it's just a start and does work correctly yet

metze
(This used to be commit 87ff661703)
2007-10-10 13:10:55 -05:00
Tim Potter
c9b766a9af r5551: Protect against falling off the end of the name resolve order list
if a name is not found.
(This used to be commit c23f767a9f)
2007-10-10 13:10:54 -05:00
Tim Potter
7fc5f4a6f7 r5550: Initialise retry count - valgrind was freaking out because this value
was not set.
(This used to be commit 328f37a3e8)
2007-10-10 13:10:54 -05:00
Andrew Tridgell
42d6a4c4f0 r5451: - added separate wrepl_associate(), wrepl_pull_table() and wrepl_pull_names() functions, with reasonable
parameters, so callers don't need to deal directly with wins replication packet structures

- converted the NBT-WINSREPLICATION torture test to use the new APIs
(This used to be commit cec1672662)
2007-10-10 13:10:47 -05:00
Jelmer Vernooij
c52fb55903 r5437: Allow Samba4 to be compiled by tcc (www.tinycc.org). It still crashes when linking though.
(This used to be commit 2e1e8db6dc)
2007-10-10 13:10:45 -05:00
Andrew Tridgell
a6878f6c6e r5414: - added libcli/wins/, a basic client library for WINS replication
- added a new IDL type "udlongr", which is like udlong, but with the
  two uint32 halves reversed

- modified the winsrepl.idl to cope with a wider range of packets
(This used to be commit bc8d60c918)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
93cd3e9022 r5405: try to use NBT name pointers when a netbios name is repeated in a NBT
packet. This allows much longer names to fit within the limits of NBT
name packets (rfc1002.txt also says this should be done, although
Samba3 never generates them).

The main reason for doing this is it means that our NBT name pointer
decoding code is tested with the smbtorture tests
(This used to be commit 6e2feef125)
2007-10-10 13:10:42 -05:00
Andrew Tridgell
3bbe3fe4ce r5404: allow spaces in the string representation of nbt names
(This used to be commit dd3d4ded21)
2007-10-10 13:10:42 -05:00
Andrew Tridgell
e428eee91b r5398: fixed encoding of *SMBSERVER name (thanks to Karl Melcher for spotting this)
(This used to be commit 76c49851b9)
2007-10-10 13:09:51 -05:00
Andrew Tridgell
240829d53e r5396: fixed parsing of NBT type 0xc0 compressed name pointers
(This used to be commit 666cc65d10)
2007-10-10 13:09:51 -05:00
Andrew Tridgell
352de700ca r5392: added "secure" WINS server processing. Send a WACK on name
registrations from anyone who isn't a current owner, then query the
owner addresses to see if they still want it.
(This used to be commit 8dc2a028d3)
2007-10-10 13:09:50 -05:00
Andrew Tridgell
85fd954145 r5391: cope with w2k3 getting the timeout wrong in wack replies
(This used to be commit 75766603e3)
2007-10-10 13:09:50 -05:00