1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

50641 Commits

Author SHA1 Message Date
Stefan Metzmacher
4a878115a7 NBT-WINS: test if the server ignores resent packets
metze
(from samba4wins tree 24eb7577414c8584b97f43c850d738d3dbb30777)
2009-01-19 07:05:23 +01:00
Stefan Metzmacher
1ffcebbf0f NBT-WINS: we don't need the slow low port tests for every name
metze
(from samba4wins tree 7862deca8555f960a5ef65e6315ce94af5023a2a)
2009-01-19 07:05:23 +01:00
Stefan Metzmacher
462e4d0cef NBT-WINS: if we're bound to port 137 trigger WACK reponses with timeouts
metze
(from samba4wins tree de7225658493006c19d139ac77ac1b1ffab01d25)
2009-01-19 07:05:22 +01:00
Stefan Metzmacher
384b9f709a NBT-WINS: try to bind to port 137 in the NBT-WINS test
metze
(from samba4wins tree 5e101475d5ed62060c991ea71c943e76b862aeef)
2009-01-19 07:05:22 +01:00
Stefan Metzmacher
ee8f481d94 winsserver: we need to ignore duplicated name register requests.
This fixes the following bug:

While we reply with a WACK response to a client.
Instead of waiting for the final reply some
windows client just resends the request using
the same name_trn_id in the nbt_name_packet.
We handled this as a new request and send a
WACK response (and the challenges) again.
Then the first request gets its final success
response, but the when we try to send the success
for the "second" request we notice that
the record was changed in between and we return
an error.

Windows 2003 (and I assume all other versions as well)
detect the packet is just a resent of a currently pending
request and ignores it.

So we now keep a list of all pending WINS name register
requests which result in a WACK response. On each incoming
name register request we search through the list to find
duplicate requests and ignore them. In theory we should
do that for all requests, but name register requests
are the only requests we response async and only
if we have to go via the WACK code path.

metze
(from samba4wins tree 382e7d384b70d03e9f81c7bb353afaed288d80f0)
2009-01-19 07:05:21 +01:00
Stefan Metzmacher
bae593bb11 ndr_print: fix the output ndr debug messages only add header line once
metze
(from samba4wins tree e99531aae325e4443fcb917a75dfe4a86b892583)
2009-01-19 07:05:21 +01:00
Stefan Metzmacher
9967907190 util_str: setup the correct talloc name for strings
metze
(partly from samba4wins tree 447e7f9532131117e896712db9def321c96718eb)
2009-01-19 07:05:21 +01:00
Stefan Metzmacher
9d4f766ae3 Revert "Remove another use of global_loadparm."
This reverts commit ee7c2170a7.

A much more correct fix will come soon.
(40ef7739f4141598a6392c203e4a2d52d972fe06 from the samba4wins tree)

metze
2009-01-19 07:05:20 +01:00
Stefan Metzmacher
3b91640fbb NBT-WINS: initialize .dest_port explicit (we should fill the whole struct each time)
This makes the code more clear.

metze
2009-01-19 07:05:20 +01:00
Andrew Bartlett
d6e801b7d9 Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel 2009-01-19 13:39:54 +11:00
Andrew Bartlett
9fa6fb3d9f Print more useful suggestion for the main provision command line 2009-01-19 12:39:57 +11:00
Andrew Bartlett
b4551bba07 Delete more Samba3-specific files 2009-01-19 12:16:30 +11:00
Andrew Bartlett
b7cafb9842 Don't give fatal python errors when guessing the realm 2009-01-19 12:16:24 +11:00
Volker Lendecke
fe9dd8710d Remove unused tdb_search_keys() 2009-01-19 00:05:56 +01:00
Volker Lendecke
eaec865148 simplify gencache_iterate a bit, fix nonempty blank lines 2009-01-19 00:05:56 +01:00
Volker Lendecke
a9542ddcb7 libnetapi_open_pipe does not need to return cli_state
The user session key is also available in rpccli->auth->user_session_key

Guenther, please check!

Thanks,

Volker
2009-01-18 20:10:06 +01:00
Jelmer Vernooij
6ffe233f94 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-18 17:27:41 +01:00
Volker Lendecke
0dbd396862 Add a macro async_req_setup()
This streamlines setting up a multi-step async request a bit
2009-01-18 16:45:07 +01:00
Jelmer Vernooij
bfbb0fb17f Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-18 16:19:39 +01:00
Volker Lendecke
c45b6ec29a Add code to torture the fragmentation code a bit 2009-01-18 15:40:45 +01:00
Volker Lendecke
a158ebbe49 Remove unused functions 2009-01-18 15:40:45 +01:00
Volker Lendecke
28c35b4c04 Make rpc_pipe_bind async 2009-01-18 15:40:45 +01:00
Volker Lendecke
ecb5184ce5 Fix an uninitialized variable 2009-01-18 15:40:45 +01:00
Volker Lendecke
3f9f188877 Remove sync rpc_api_pipe_req 2009-01-18 15:40:45 +01:00
Volker Lendecke
396ed3b363 Add async rpc_api_pipe_req 2009-01-18 15:40:45 +01:00
Volker Lendecke
8a1c6c2c99 Tiny simplification of prs_set_offset 2009-01-18 15:40:44 +01:00
Volker Lendecke
c655f19e1f Add rpc_write_send/recv 2009-01-18 15:40:44 +01:00
Volker Lendecke
f96335afc0 Remove unused sync functions 2009-01-18 15:40:44 +01:00
Volker Lendecke
f6740aa7ad Make rpc_api_pipe async 2009-01-18 15:40:44 +01:00
Volker Lendecke
761d164420 Rename the async version of get_complete_pdu to get_complete_frag 2009-01-18 15:40:44 +01:00
Volker Lendecke
5e6f3eaae9 Move initialization of the reply prs_struct to rpc_api_pipe 2009-01-18 15:40:44 +01:00
Volker Lendecke
5987c82697 Always check the max send sizein rpc_api_pipe, not just with DEVELOPER 2009-01-18 15:40:44 +01:00
Volker Lendecke
6d47418bc1 Make cli_api_pipe async
Also move the transport switch to this routine
2009-01-18 15:40:43 +01:00
Volker Lendecke
173d6c84a6 Remove sync rpc_read wrapper 2009-01-18 15:40:43 +01:00
Volker Lendecke
5d71fe8043 Make cli_pipe_get_current_pdu async, rename it to get_current_pdu 2009-01-18 15:40:43 +01:00
Volker Lendecke
30413f12b9 Make rpc_read async 2009-01-18 15:40:43 +01:00
Volker Lendecke
8b618d0ba9 Fix some real bugs found by "type-punned" gcc warnings
Type-casting does not the right thing if used the way it used to be. The
function arguments have not been uint32_t's, but the type cast made the calling
routine believe so. Not good...

The assignment xxx=account_policy_temp does however type-convert properly,
potentially cutting off the top-bits.
2009-01-18 13:26:21 +01:00
Tim Prouty
44ae09b82e librpc: Re-run make idl_full 2009-01-17 19:38:21 -08:00
Tim Prouty
4a40857836 librpc: Remove usage of max and replace with improved range. 2009-01-17 19:38:20 -08:00
Tim Prouty
142b2a61f8 pidl: Remove "max" and make "range" smarter about unsigned types
This eliminates a warning in pidl generated code, while preserving
cross-platform idl compatibility.
2009-01-17 19:37:52 -08:00
Derrell Lipman
6d300399b5 Determine case sensitivity based on file system attributes.
- Most of the time, we can determine from the file system we're connecting to
  whether it supports case sensitivity. In those cases, we now set the
  internal case sensitivity flag automatically. For those cases where the
  request to retrieve file system attributes fails, we'll use the
  user-specified option value.

Derrell
2009-01-17 13:33:39 -05:00
Volker Lendecke
9b3c38f4af Slightly simplify the paths after rpc_api_pipe() 2009-01-17 11:27:32 +01:00
Derrell Lipman
c6b4f3526a [Bug 6022] smbc_urlencode and smbc_urldecode were not exported
- Since the revamp of libsmbclient, there has still been an external
  declaration for smbc_urlencode and smbc_urldecode in libsmbclient.h, yet
  those functions were renamed and made private. The two choices were to
  remove the function names from libsmbclient.h or to make them public
  again. The reported requested that they be public. This commit makes it so.

Derrell
2009-01-16 20:26:46 -05:00
Derrell Lipman
1c77c7f3d5 Treat file names in POSIX-like case-sensitive fashion by default
*** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! ***

- libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default,
  it requests case-sensitive, but the old behavior of case-insensitive can be
  requested with smbc_setOptionCaseSensitive(context, False);

  The change of behavior is considered a bug fix, as it was previously
  possible to accidentally overwrite a file that had the same case-insensitive
  name but a different case-sensitive name as a previously-existing file,
  while creating a new file.

Derrell
2009-01-16 16:41:36 -05:00
Jelmer Vernooij
5cf9989a70 More work on the Samba 4 release notes. 2009-01-16 21:46:01 +01:00
Andreas Schneider
3fe974c4fe Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx. 2009-01-16 12:26:46 -08:00
Jeremy Allison
d03133e696 Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba 2009-01-16 12:25:35 -08:00
Jeremy Allison
fb904194c9 "First thing, kill all the language lawyers" :-). Ensure possible insane compilers
can't kill us later.
Jeremy.
2009-01-16 11:55:01 -08:00
Gerald (Jerry) Carter
073e9f42f0 ads_connect: Return immediately on a failed GC connection.
ads_connect_gc() feeds an explicit server to ads_connect().  However, if the
resulting connection fails, the latter function was attempting to find a DC
on its own and continuing the connection.  This resulting in GC searches being
sent over a connection using port 389 which would fail when using the base
search suffix outside of the domain naming context.

The fix is to fail immediately in ads_connect() since the GC lookup ordering
is handled already in ads_connect_gc().
2009-01-16 12:15:33 -06:00
Jelmer Vernooij
57f978d171 loadparm: Make sure various state variables get initialized even when we
couldn't load a default smb.conf file.
2009-01-16 17:37:40 +01:00