1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

2472 Commits

Author SHA1 Message Date
Volker Lendecke
27abf6731e struct async_req doesn't really need to carry an event_context 2009-01-03 19:07:57 +01:00
Jeremy Allison
3d2d0203e5 Remove cli_cm_set_dest_ss() - removes the global dest_ss
from libsmb/clidfs.c. Keep the '-I<address>' option in
smbclient working. The intent is to remove all globals
from libsmb/clidfs.c.
Jeremy.
2009-01-02 12:49:49 -08:00
Volker Lendecke
707a5a41b5 Remove a global variable 2009-01-01 20:01:32 +01:00
Volker Lendecke
bf34e998f9 fix some nonempty blank lines 2009-01-01 20:01:32 +01:00
Jeremy Allison
bb23f5725f Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
2008-12-31 16:30:11 -08:00
Volker Lendecke
8ae4155f82 Make a CONST_DISCARD unnecessary by applying some const
Derrell, please check!
2008-12-31 19:33:25 +01:00
Volker Lendecke
e4d28dbc04 Attempt to fix bug 5953: Make cli_send_smb_direct_writeX use writev
It seems there are SMB servers around which can't cope with the write header
being sent in a packet of its own. With writev we keep the advantage of direct
writes, giving the kernel the chance to coalesce the write calls.
2008-12-29 13:24:28 +01:00
Volker Lendecke
9f31468bd3 Add async cli_write_andx and cli_pull 2008-12-19 23:16:25 +01:00
Volker Lendecke
ae1d6020f0 Fix setting smb_len for huge write&x calls 2008-12-19 18:15:30 +01:00
Volker Lendecke
fa5f11279b Add the cli_wct_ofs routine to calculate the offset for write&x 2008-12-19 18:12:44 +01:00
Volker Lendecke
13eefa7c43 Add a doxygen comment line I forgot to merge 2008-12-19 17:50:34 +01:00
Volker Lendecke
1f04d07db0 Convert cli_request->outbuf to uint8_t 2008-12-19 17:47:30 +01:00
Volker Lendecke
398ef0fb85 For large smbwrite&x, we need more than 64k bcc 2008-12-19 16:13:27 +01:00
Volker Lendecke
98c4055bcb Add some comments
If it takes more than 10 seconds to understand the code you've written yourself
less than a year ago, it's time for comments or refactoring. I couldn't find a
way to refactor that cleanly, so add comments :-)
2008-12-19 16:13:26 +01:00
Volker Lendecke
45ad3df140 Fix the padding calculation in smb_splice_chain for "bytes_padding!=0" 2008-12-19 14:53:29 +01:00
Volker Lendecke
4abdd3981e Pass "bytes_alignment" up through cli_request_send
This parameter makes smb_spice_chain add padding before the bytes field
2008-12-19 14:53:29 +01:00
Volker Lendecke
2fe7d5936a Prefer network writes over reads
If we really want to keep the pipe busy, we need to write everything we have as
early as possible, giving the kernel the chance to get rid of the buffers
quickly :-)
2008-12-19 13:46:52 +01:00
Volker Lendecke
42e407b300 Factor out cli_write_max_bufsize 2008-12-19 13:34:26 +01:00
Volker Lendecke
7c3497ef5e Remove two write-only variables
If someone wants those stats, please don't use globals :-)
2008-12-19 13:18:57 +01:00
Volker Lendecke
f87da49830 Make cli_negprot async 2008-12-19 10:50:52 +01:00
Volker Lendecke
bb8ca0fdbf Make cli_negprot return NTSTATUS instead of bool 2008-12-19 10:28:30 +01:00
Volker Lendecke
96a3d7be31 cli_negprot_send -> cli_negprot_sendsync 2008-12-19 10:28:20 +01:00
Volker Lendecke
5f079fe158 Fix a valgrind error
Reported by naga_kishore_kommuri@yahoo.com

Derrel, please check!

Thanks,

Volker
(cherry picked from commit 3356b95f72)
2008-12-17 18:25:32 +01:00
Kai Blin
3144e45085 (Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NAS-BASIC server). 2008-12-16 13:40:38 -08:00
Jeremy Allison
3edbc14405 Revert "Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NASBASIC server)."
Error in commit !

This reverts commit bbd5824140.
2008-12-16 13:31:52 -08:00
Kai Blin
bbd5824140 Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NASBASIC server). 2008-12-16 13:19:15 -08:00
SATOH Fumiyasu
4c3aea3f62 commit b520befe6f51644d20434add9864d7a2fa30aa2e
Author: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date:   Wed Dec 17 00:42:25 2008 +0900

    libsmbclient: Fix SIGBUS on non-x86 CPUs

    We must align the struct smbc_dirent in the struct
    SMBC_internal_data because the struct smbc_dirent
    has numeric values that require alignment.

Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
2008-12-16 12:20:40 -05:00
Volker Lendecke
daeb3a190d Remove the global "cmdline_auth_info" from source3/lib/util.c
This involves changing all our clients, that's why it's so large.
2008-12-14 14:00:43 +01:00
Volker Lendecke
be3d999063 Remove a pointless static variable
Every sane compiler will only allocate "*SMBSERVER" once
2008-12-13 19:21:48 +01:00
Volker Lendecke
da6be4102e Remove a static variable
Derrell, please check!

Thanks,

Volker
2008-12-13 19:19:46 +01:00
Volker Lendecke
b04d00744e Micro-Optimize cliconnect.c
In this form, the prots array is fully read-only in the text segment and thus
can be shared between processes.

Probably pointless, but I had fun doing it :-)
2008-12-13 19:19:45 +01:00
Stefan Metzmacher
1b7b0e924f s3:dsgetdcname: retry with the clients site
metze
2008-12-13 11:47:13 +01:00
Stefan Metzmacher
895c40d03a s3:libsmb/namequery.c: add saf_join_store() function
saf_join_store() should be called after a successful
domain join, the affinity to the dc used at join time
has a larger ttl, to avoid problems with delayed replication.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 80e74a27c5)
2008-12-13 11:42:35 +01:00
Stefan Metzmacher
0c43f96330 s3: libsmb/namequery: fallback to returning all dcs, when none is available in the requested site
It could happen that all dcs in a site are unavailable
(some sites have only one dc) and then we need to fallback
to get all dcs.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit c127367b1d)
2008-12-13 11:42:35 +01:00
Volker Lendecke
fd2bac9667 For read&x replies, check the offset 2008-12-13 10:30:02 +01:00
Jeremy Allison
3878dad0c6 Fix bug #5953 - smbclient crashes: cli_list_new segmentation fault.
Jeremy.
2008-12-08 14:24:38 -08:00
Volker Lendecke
7fbb64d726 Simplify async programming a bit with helper routines
Introduce async_req_is_error() and async_req_simple_recv()
2008-12-08 22:09:33 +01:00
Volker Lendecke
ed25c6c287 Add a "bytes_padding" parameter to smb_splice_chain
For example open&x and write&x needs the bytes to be aligned relative to the
SMB header. In particular for write&x we should not have to move stuff around.
2008-12-08 22:09:33 +01:00
Volker Lendecke
f0bb53dd0f Factor out smb_splice_chain(), to be used by chain_reply() in smbd 2008-12-08 22:09:33 +01:00
Volker Lendecke
691cf386fb Slightly simplify cli_session_setup_ntlmssp
Remove three pointless variables
2008-12-07 21:30:35 +01:00
Volker Lendecke
ac4a77ccca Fix for crash bug freeing a non-malloc'ed buffer if the client sends a non-encrypted packet with the crypto state set. 2008-12-05 13:20:55 -08:00
Tim Prouty
1eb743ab8e s3: Change sockaddr util function names for consistency
Also eliminates name conflicts with OneFS system libraries
2008-12-03 10:40:20 -08:00
Volker Lendecke
8fc15ab96d remove the explicit mem_ctx from ntlmssp_state, use the state itself 2008-11-30 17:15:19 +01:00
Volker Lendecke
d253a367ef fix nonempty blank lines 2008-11-30 17:15:19 +01:00
Volker Lendecke
95873566e3 Do not build the session request if it si not used anyway 2008-11-30 12:31:04 +01:00
Volker Lendecke
88909acb6c fix nonempty blank lines 2008-11-30 12:30:51 +01:00
Volker Lendecke
9a3be6f0f8 Move cli_trans_oob to lib/util.c
Rename it to trans_oob, it will be used in the server routines.
2008-11-28 08:24:37 +01:00
Kai Blin
69debd45e5 libsmb: Fix up pointer passed to cli_send_trans in cli_link_internal 2008-11-18 11:25:14 -08:00
Günther Deschner
0474c8665d nterrors: add NT_STATUS_DS_BUSY.
Guenther
2008-11-10 21:46:24 +01:00
Günther Deschner
8d69a65110 s3-dsgetdcname: fix reply generation (forgot to map nt1 to nt5ex).
Guenther
2008-11-06 13:40:52 +01:00