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

2463 Commits

Author SHA1 Message Date
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
Volker Lendecke
8637716b4b Make use of smb_bufrem() 2008-11-01 19:41:07 +01:00
Jelmer Vernooij
4d3eb32a1a ntlm_check.c: Sync some changes from Samba 4. 2008-11-01 18:50:06 +01:00
Jelmer Vernooij
434ca5fc33 Use standardized types in ntlm_check.c. 2008-11-01 17:59:25 +01:00
Jelmer Vernooij
7ec720af71 Use shared doserr.c. 2008-11-01 17:28:16 +01:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Günther Deschner
7f8bc6a2d9 errors: share dcerpc error function.
Guenther
2008-10-31 12:42:09 +01:00
Derrell Lipman
2a76f4d8c8 Error return is False, not -1
- There were a few places in SMBC_getatr() that returned -1 instead of a
  boolean.  -1 was intended to mean error, but that's what False is for, and
  the usages of this function assume that it returns a boolean with False as
  the error condition.

Derrell
2008-10-24 10:31:31 -04:00
Jelmer Vernooij
d6a5476ee7 Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).
2008-10-23 19:53:15 +02:00
Jelmer Vernooij
f9fb9436ae Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS
previously present in Samba 3.
2008-10-23 15:37:39 +02:00