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

3509 Commits

Author SHA1 Message Date
Björn Baumbach
2052c2d6fa s3-libsmb: remove unused cli_lock()
Replaced with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 19 00:43:03 CEST 2011 on sn-devel-104
2011-07-19 00:43:03 +02:00
Stefan Metzmacher
1aae898908 s3:clikrb5: fix the build with newer heimdal versions
krb5_get_default_in_tkt_etypes() requires a 3rd argument
if KRB5_PDU_NONE is available.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jul 14 21:21:13 CEST 2011 on sn-devel-104
2011-07-14 21:21:13 +02:00
Günter Kukkukk
9b3357c54e Fix bug 8305 - nmbd segfaults - when using "smbtree ..."
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jul 13 16:35:16 CEST 2011 on sn-devel-104
2011-07-13 16:35:16 +02:00
Stefan Metzmacher
a1c1f8c83b s3:libsmb: remove unused cli_smb_inbuf()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul 13 01:19:51 CEST 2011 on sn-devel-104
2011-07-13 01:19:51 +02:00
Stefan Metzmacher
8a234cbe15 s3:libsmb: remove unused cli_oplock_handler()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 10:53:52 CEST 2011 on sn-devel-104
2011-07-12 10:53:52 +02:00
Stefan Metzmacher
c07c4123d9 s3:libsmb: s/SMBkeepalive/NBSSkeepalive
metze
2011-07-12 09:44:04 +02:00
Stefan Metzmacher
7b73b6f964 s3:libsmb: remove unused cli->privileges
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 09:30:49 CEST 2011 on sn-devel-104
2011-07-12 09:30:49 +02:00
Stefan Metzmacher
a2e248f270 s3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()
metze
2011-07-11 18:18:27 +02:00
Stefan Metzmacher
e7c9319cac s3:libsmbclient: don't log the lowlevel fd in smbc_free_context()
metze
2011-07-11 18:18:27 +02:00
Stefan Metzmacher
7bba81f69d s3:libsmb: add cli_state_disconnect()
metze
2011-07-11 18:18:26 +02:00
Stefan Metzmacher
fa60a299f5 s3:libsmb: make use of cli_state_is_connected()
metze
2011-07-11 18:18:23 +02:00
Stefan Metzmacher
2b70c0f4f3 s3:libsmb: remove unused cli_set_port()
metze
2011-07-11 16:39:15 +02:00
Stefan Metzmacher
893d137f3f s3:libsmb: also remember the local socket address after connect
metze
2011-07-11 16:39:15 +02:00
Stefan Metzmacher
a2300094db s3:smb2cli_base: add my copyright
metze
2011-07-11 16:35:11 +02:00
Björn Baumbach
f2c5a0afd2 s3-libsmb: let cli_lock64 return NTSTATUS instead of bool
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 12:48:38 CEST 2011 on sn-devel-104
2011-07-11 12:48:38 +02:00
Björn Baumbach
57194d8c5d s3-libsmb: introduce cli_lock32()
Same like cli_lock() but return NTSTATUS instead of bool

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 11:36:50 +02:00
Stefan Metzmacher
957876e76c s3:smb2cli_tcon: use tevent_req_oom()
metze
2011-07-10 17:11:14 +02:00
Volker Lendecke
fd240b546e s3: Fix Coverity ID 2587,2588: CHECKED_RETURN
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul 10 10:36:11 CEST 2011 on sn-devel-104
2011-07-10 10:36:11 +02:00
Stefan Metzmacher
244c856cbf s3:smb2cli_base: ask for the next response if there're still pending requests
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul  9 13:55:04 CEST 2011 on sn-devel-104
2011-07-09 13:55:04 +02:00
Stefan Metzmacher
8b4a3681e5 s3:smb2cli_base: make use of tevent_req_defer_callback()
In order to notify requests of transport layer errors,
we need to defer the triggering of the callbacks,
otherwise we may crash, if one of the callbacks
destroys the cli_state.

metze
2011-07-09 12:40:28 +02:00
Stefan Metzmacher
facc110c79 s3:smb2cli_base: fix memory hierachy in smb2cli_req_recv()
We need to use talloc_reference() if there're more than one
response, but we use it in a way that the caller can't
call talloc_free() or talloc_unlink() on it.

metze
2011-07-09 12:40:28 +02:00
Stefan Metzmacher
504d092aa7 s3:smb2cli_base: call smb2cli_req_unset_pending() before tevent_req_done()
metze
2011-07-09 12:40:27 +02:00
Stefan Metzmacher
242ca5dba3 s3:smb2cli_base: unset the destructor in smb2cli_req_unset_pending()
metze
2011-07-09 12:40:27 +02:00
Stefan Metzmacher
c55bfc0733 s3:smb2cli_base: keep the order of pending requests
metze
2011-07-09 12:40:27 +02:00
Stefan Metzmacher
a9f03f1982 s3:smb2cli_base: rename 'result' => 'req' in smb2cli_req_create()
metze
2011-07-09 12:40:26 +02:00
Stefan Metzmacher
d6cd1ee032 s3:libsmb: remove unused cli->inbuf and cli->bufsize
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul  8 15:21:46 CEST 2011 on sn-devel-104
2011-07-08 15:21:46 +02:00
Stefan Metzmacher
fc7359befb s3:libsmb: clistr_pull_talloc() doesn't need base_ptr and flags2 with STR_ASCII
interpret_short_filename() always parses OEM_Strings (in DOS charset).

metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
7d757d6ac3 s3:libsmb: remove unused smb_dos_errstr()
metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
83301d8b5a s3:libsmb/smberr: make global const arrays static
metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
235aedae50 s3:libsmb: don't use the cli->inbuf to store the last error
We keep the raw error in cli->raw_status now, until we fixed all
caller to get the NTSTATUS from the function calls.

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
2c160224c2 s3:libsmb: don't call cli_set_error() in cli_echo()
cli_smb_recv() already does it.

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
f0e6e5c37d s3:libsmb: remove unused enum smb_read_errors infrastructure
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
06247a7a09 s3:libsmb: remove use of cli_errstr() in SMBC_server_internal()
metze
2011-07-08 14:09:07 +02:00
Stefan Metzmacher
fdd6c4e673 s3:libsmb: add smb2cli_query_directory*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:21 +02:00
Stefan Metzmacher
548f7d3f36 s3:libsmb: add smb2cli_write*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:21 +02:00
Stefan Metzmacher
22859b0e89 s3:libsmb: add smb2cli_read*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:21 +02:00
Stefan Metzmacher
d82be9588a s3:libsmb: add smb2cli_flush*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:20 +02:00
Stefan Metzmacher
40ecdeb3fb s3:libsmb: add smb2cli_close*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:20 +02:00
Stefan Metzmacher
2abc34cb4a s3:libsmb: add smb2cli_create*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:20 +02:00
Stefan Metzmacher
f21720773f s3:libsmb: add smb2cli_tcon*() and smb2cli_tdis*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:19 +02:00
Stefan Metzmacher
4efc85c6f1 s3:libsmb: add smb2cli_sesssetup*() and smb2cli_logoff*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:18 +02:00
Stefan Metzmacher
ab913d1768 s3:libsmb: add smb2cli_negprot*()
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:17 +02:00
Stefan Metzmacher
a0cf7bae60 s3:libsmb: add basic smb2 client infrastructure
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:17 +02:00
Björn Baumbach
11426758d7 s3-libsmb: Remove use of cli_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
3cdf962d1e s3:libsmb: finally remove unused cli_state->outbuf
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
0f006751ec s3:libsmb: remove unused clistr_push_fn()
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
30574a73d8 s3:libsmb: remove unused clistr_pull_fn()
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
072a27fd9f s3:libsmb: use trans2_bytes_push_str() in cli_tcon_andx_create() for the plaintext password
This makes sure we push the string always in DOS charset.

metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
5b1ac1bcc3 s3:libsmb: use trans2_bytes_push_str() in cli_set_ea_path()
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
cea9245909 s3:libsmb: use trans2_bytes_push_str() in cli_dfs_get_referral()
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
2453164317 s3:libsmb: use a talloc_stackframe in cli_dfs_get_referral()
metze
2011-07-07 19:16:27 +02:00
Stefan Metzmacher
b77becdb55 s3:libsmb: use trans2_bytes_push_str/bytes() in cli_list_trans_*()
metze
2011-07-07 19:16:27 +02:00
Stefan Metzmacher
d921200e75 s3:libsmb: use clistr_pull_talloc() for short_name in interpret_long_filename()
metze
2011-07-07 19:16:27 +02:00
Stefan Metzmacher
af66c64e95 s3:libsmb: interpret_long_filename() short_name is always UNICODE
metze
2011-07-07 19:16:27 +02:00
Stefan Metzmacher
eaeeb5ce0e s3:libsmb: add trans2_bytes_push_bytes()
metze
2011-07-07 19:16:27 +02:00
Stefan Metzmacher
ed99caded2 s3:libsmb: make trans2_bytes_push_str() non-static
We should use this and get rid of clistr_push().

metze
2011-07-07 19:16:27 +02:00
Stefan Metzmacher
8a2290667c s3:libsmb: use clistr_pull_talloc() in cli_qfilename()
metze
2011-07-06 17:18:14 +02:00
Stefan Metzmacher
a1df729f7b s3:libsmb: let cli_qfileinfo[_recv]() return recv_flags2
metze
2011-07-06 17:18:13 +02:00
Stefan Metzmacher
2b0cc3c412 s3:libsmb: use clistr_pull_talloc() in cli_get_fs_volume_info()
metze
2011-07-06 17:18:13 +02:00
Stefan Metzmacher
27736bed83 s3:libsmb: the SMB_QUERY_FS_VOLUME_INFO response needs at least 18 data bytes
metze
2011-07-06 17:18:13 +02:00
Stefan Metzmacher
bc98d004c9 s3:libsmb: don't use cli->inbuf in cli_dfs_get_referral()
The rdata buffer returned by cli_trans() doesn't belong to
cli->inbuf, so don't use it.

metze
2011-07-06 17:18:13 +02:00
Stefan Metzmacher
af61f6fce6 s3:libsmb: fix error handling in cli_dfs_get_referral()
We should not return NT_STATUS_OK on error.

metze
2011-07-06 17:18:12 +02:00
Volker Lendecke
26782fbbf3 s3: make cli_resolve_path return NTSTATUS
This looks larger than it is. No parameters needed changing.
2011-07-06 08:35:27 +02:00
Volker Lendecke
80838491e6 s3: Make cli_cm_open return NTSTATUS
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul  3 23:57:53 CEST 2011 on sn-devel-104
2011-07-03 23:57:53 +02:00
Volker Lendecke
714e1014c5 s3: Make cli_cm_connect return NTSTATUS 2011-07-03 22:45:26 +02:00
Volker Lendecke
7ca63fb8fe s3: Make "do_connect" return NTSTATUS 2011-07-03 22:45:26 +02:00
Volker Lendecke
3414182af0 s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
4569a3a75a s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
8238d89823 s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
cfbd339b4a s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
e5ad524902 s3: Remove two uses of cli_errstr
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul  3 12:43:32 CEST 2011 on sn-devel-104
2011-07-03 12:43:32 +02:00
Volker Lendecke
c3a6e9b7ce s3: RAP errors are WERROR 2011-07-03 11:31:29 +02:00
Volker Lendecke
c0d168392f s3: Remove some bogus error mappings
The old cli_session_request that used this is gone
2011-07-03 11:31:29 +02:00
Volker Lendecke
c31871264c s3: Allow NULL for arg pwritten in cli_write_andx 2011-07-03 11:31:29 +02:00
Volker Lendecke
25df2fe8e2 S3: Fix some nonempty blank lines 2011-07-03 11:31:29 +02:00
Volker Lendecke
79d27e28ad s3: Fix symlink_reparse_buffer_parse 2011-07-03 11:31:29 +02:00
Volker Lendecke
c1094a8cb0 s3: Add cli_readlink 2011-07-03 11:31:29 +02:00
Volker Lendecke
bbe8e0bcf4 s3: Add cli_symlink 2011-06-24 21:24:17 +02:00
Volker Lendecke
829974c940 s3: Add symlink reparse point marshalling routines 2011-06-24 21:24:17 +02:00
Volker Lendecke
f0ff6f390a Use tevent_req_oom
This fixes a few Coverity errors
2011-06-20 12:33:24 +02:00
Rusty Russell
ca1936fbb2 tdb_compat: use tdb_open_compat.
This is a helper for the common case of opening a tdb with a logging
function, but it doesn't do all the work, since TDB1 and TDB2's log
functions are different types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
9850f25633 tdb_chainunlock: ignore return value.
TDB2 returns void here.  tdb_chainunlock will *always* return with the
chain unlocked, but it will complain via the log function if it wasn't
locked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
868d77bc5b tdb_chainlock: check returns for 0, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
6bc59d77b6 tdb_store: check returns for 0, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
1078eb21c4 tdb_delete: check returns for 0, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
058c4f8492 tdb_fetch_compat: use instead of tdb_fetch.
This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
0e4c358e27 tdb_compat.h: divert every tdb build and includes to tdb_compat
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00
Rusty Russell
20687dcd7b smb_share_modes: don't use tdb_jenkins_hash.
It's a nice hash, but this usage has nothing to do with TDB.  So use the
Jenkins hash directly from CCAN instead (it's the same one).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00
Volker Lendecke
9cc68e49ee s3: Fix Coverity ID 2583: RESOURCE_LEAK 2011-06-19 19:36:27 +02:00
Volker Lendecke
59887edd1d s3: Remove unused name_queries
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 15:14:38 CEST 2011 on sn-devel-104
2011-06-19 15:14:38 +02:00
Volker Lendecke
809e5ea5ba s3: Fix some type-punned warnings 2011-06-19 14:03:52 +02:00
Volker Lendecke
f811e894c4 s3: Add name_resolve_bcast_send/recv 2011-06-19 14:03:51 +02:00
Volker Lendecke
bc3261f0c5 s3: Fix a memleak in name_resolve_bcast
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 12:40:55 CEST 2011 on sn-devel-104
2011-06-19 12:40:55 +02:00
Volker Lendecke
8e02b70767 s3: Add incomplete cli_nttrans_create
secdesc only at this moment
2011-06-19 11:08:12 +02:00
Volker Lendecke
ef816f1c4e s3: Correctly align even 2011-06-19 11:08:12 +02:00
Andrew Tridgell
264409750a s3-util: remove the s3 nterr.c
this is now in common code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-17 17:09:00 +10:00
Andrew Bartlett
1233ba7bf3 libclu/util: Move get_friendly_nt_error_msg() in common.
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-17 17:08:59 +10:00
Volker Lendecke
c118bcf755 s3: Use resolve_wins_send/recv in resolve_wins
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 12 18:19:41 CEST 2011 on sn-devel-104
2011-06-12 18:19:41 +02:00
Volker Lendecke
0dfcf3ef78 s3: Add resolve_wins_send/recv 2011-06-12 17:07:48 +02:00
Volker Lendecke
12c3c35596 s3: Add query_wins_list_send/recv 2011-06-12 17:07:48 +02:00
Volker Lendecke
f0994c7495 s3: Fix IO_TIMEOUT handling for wins queries 2011-06-12 17:07:47 +02:00
Volker Lendecke
ebf04d79ab s3: Remove "struct ip_service" from resolve_wins 2011-06-12 17:07:47 +02:00
Stefan Metzmacher
fdfb5e95fe s3:libsmb: remove unused cli_state_seqnum infrastructure
metze

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jun 10 20:37:54 CEST 2011 on sn-devel-104
2011-06-10 20:37:54 +02:00
Stefan Metzmacher
f0ba1afe5f s3:libsmb/clireadwrite: calculate cli_write_max_bufsize() correct based on max_xmit
This is important in order to support DCERPC over ncacn_np against NT4 servers,
where max_xmit is just 4356.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
73128b7cc7 s3:libsmb/clireadwrite: calculate cli_read_max_bufsize() correct based on max_xmit
This is important in order to support DCERPC over ncacn_np against NT4 servers,
where max_xmit is just 4356.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
5d06b2197b s3:libsmb/clitrans: correctly transfer the seqnum between secondary and primary requests
This is needed to implement SMB signing correct.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
1dd24ac06a s3:libsmb/clitrans: fix handling of multi pdu [nt]trans[s][2] calls
We now keep the primary request open for the whole logical request.
The primary request is the one that gets all incoming replies.
While secondary requests are handled as separate one-way requests.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
10bb088cf1 s3:libsmb/clitrans: use subreq2 as variable for the secondary requests
metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
5146c9ba9d s3:libsmb/clitrans: move MID handling to the end of cli_trans_send() and add a comment
metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
0a8fd50bd8 s3:libsmb/clitrans: correctly marshall [nt]trans[s][2] requests
We need to align params and data to 4 byte offsets.

This also correctly recalculates the useable space after each step.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
6f7af1b038 s3:libsmb/clitrans: marshall SMBnttrans[2] as the others
This is just to make the code more readable
and easier to notice how many words we're using in vwv.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
428a86c92b s3:libsmb/clitrans: use uint32_t for param and data variables
SMBnttrans uses 32-bit values there.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
2ae565b681 s3:libsmb/clitrans: remove unused secondary_request_ctx
metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
3dd1ebd21e s3:libsmb/async_smb: add helpers to get and set the seqnum for signing
This will be used for correct signing in [nt]trans[2][s] requests.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
a25936f1b1 s3:libsmb/async_smb: don't remove pending requests if the mid is set
If the mid was set explicitly, it means the request expects more than
one reply, so leave it in the pending array.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
173fc258e4 s3:libsmb/async_smb: call cli_smb_req_unset_pending() instead of destructor directly
metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
49cdf171a5 s3:libsmb/async_smb: let cli_smb_recv() initialize output values for one way requests
metze
2011-06-10 19:27:05 +02:00
Günther Deschner
ed10726abc source3/libsmb/proto.h: fix licence/copyright
Guenther
2011-06-10 15:12:32 +02:00
Günther Deschner
005930411c source3/libsmb/nmblib.h: fix licence/copyright
Guenther
2011-06-10 15:12:31 +02:00
Günther Deschner
81b5d8538a source3/libsmb/libsmb.h: fix licence/copyright
Guenther
2011-06-10 15:12:29 +02:00
Günther Deschner
c1058ad476 source3/libsmb/errormap_wbc.h: fix licence/copyright
Guenther
2011-06-10 15:12:27 +02:00
Günther Deschner
1e9f2bdb2f source3/libsmb/clidgram.h: fix licence/copyright
Guenther
2011-06-10 15:12:25 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
f348d148b4 s3-param Remove special case for global_scope()
There is no reason this can't be a normal constant string in the
loadparm system.  (Past reasons were that we didn't have lp_set_cmdline())

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
acdf5b0d4c s3-libsmbclient Use workgroup from libsmbclient caller for domain in credentials
This previously set the workgroup, which is a different thing, but
would have been the default if no domain was specified).  This more
clearly sets the information from the credentials file into the
matching field in the credentials structure.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
8d4a8389bb s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()
Using the standard macro makes it easier to move code into common, as
TALLOC_MEMDUP isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Stefan Metzmacher
957cfd23e1 s3:libsmb/cli_np_tstream: s/TSTREAM_CLI_NP_BUF_SIZE/TSTREAM_CLI_NP_MAX_BUF_SIZE
This isn't the fixed buffer size anymore, as we use dynamic beffer
it's just the maximum size.

metze
2011-06-08 17:46:22 +02:00
Stefan Metzmacher
ad1cf187fd s3:libsmb:cli_np_tstream: use dynamic talloc buffers
Having 8192 bytes on an idle connection is a bit to much,
so we better use dynamic buffers using talloc, which also
avoids a memcpy in the common SMBtrans readv codepath.

metze
2011-06-08 17:46:22 +02:00
Stefan Metzmacher
c3ac298a1f s3:libsmb/cli_np_tstream: use larger buffers to avoid a bug NT4 servers (bug #8195)
NT4 servers return NT_STATUS_PIPE_BUSY if we try a SMBtrans
and the SMBwriteX before hasn't transmited the whole DCERPC fragment.

W2K and above is happy with that.

As a result we try to match the behavior of Windows and older Samba clients,
they use write and read buffers of 4280 bytes instead of 1024 bytes.
On Windows only the SMBtrans based read uses 1024 (while we also use 4280
there).

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jun  7 20:25:32 CEST 2011 on sn-devel-104
2011-06-07 20:25:32 +02:00
Volker Lendecke
56eab757d0 s3: Remove unused variables
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jun  7 00:42:51 CEST 2011 on sn-devel-104
2011-06-07 00:42:51 +02:00
Volker Lendecke
976a43c5aa s3: Remove a pointless if-statement
We are here only if we have more than one num_pending

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun  6 18:21:17 CEST 2011 on sn-devel-104
2011-06-06 18:21:17 +02:00
Volker Lendecke
2d90a89942 s3: Make name_resolve_bcast do parallel lookups to all interfaces 2011-06-05 14:08:00 +02:00
Volker Lendecke
fbe7b47c34 s3: Add name_queries_send/recv 2011-06-05 14:08:00 +02:00
Rusty Russell
56e72337b0 lib/util/time.c: timeval_current_ofs_msec
Several places want "milliseconds from current time", and several were
simply doing "msec * 1000" which can (and does in one place) result in
a usec value over 1 a million.

Using a helper to do this is safer and more readable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Andrew Bartlett
c7b9dbea10 s3-libsmb remove ldap_err2string() as common nterrs[] has the constants
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue May 31 08:58:00 CEST 2011 on sn-devel-104
2011-05-31 08:58:00 +02:00
Günther Deschner
6a6af31148 s3-libsmb: fix build warning of cli_qfilename().
Guenther
2011-05-31 04:09:30 +02:00
Andrew Bartlett
381423b1bd libcli/security: move secdesc.c to the top level libcli/security
This code does not rely on lp_ or other source3 only functions, so can
be part of the common library.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Günther Deschner
508e160776 s3: fix some -Wunused-but-set-variable build warnings.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon May 30 17:41:18 CEST 2011 on sn-devel-104
2011-05-30 17:41:18 +02:00
Volker Lendecke
c7c0e4ca71 s3: Remove unused cli_session_request
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun May 29 22:25:55 CEST 2011 on sn-devel-104
2011-05-29 22:25:55 +02:00
Volker Lendecke
4ee443d7b3 s3: Remove unused cli_connect 2011-05-29 21:17:27 +02:00
Volker Lendecke
f92b90c676 s3: Use cli_connect_nb in SMBC_server_internal 2011-05-29 21:10:26 +02:00
Volker Lendecke
debaf40e99 s3: Add set_socket_options to cli_connect_sock()
A leftover of stuff that cli_connect() does

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun May 29 15:47:17 CEST 2011 on sn-devel-104
2011-05-29 15:47:17 +02:00
Volker Lendecke
5676f817c7 s3: Remove unused attempt_netbios_session_request 2011-05-29 14:39:12 +02:00
Volker Lendecke
3f8621b5d3 s3: Use cli_connect_nb in do_connect 2011-05-29 14:39:11 +02:00
Volker Lendecke
01386ff313 s3: Extract the guest_login field in sesssetup 2011-05-29 12:49:34 +02:00