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

3609 Commits

Author SHA1 Message Date
Jeremy Allison
255c2adf7b Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
2007-11-05 11:12:56 -08:00
Jeremy Allison
d50d14c300 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
2007-11-03 15:12:42 -07:00
Jeremy Allison
81ca5853b2 Change the client library to write directly out of
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
2007-11-02 12:21:34 -07:00
Gerald (Jerry) Carter
779353b86d Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test 2007-11-01 21:30:43 -04:00
Jeremy Allison
5cf2811e8e Add missing recvfile_bytes element - noticed by Kukks.
Jeremy.
2007-11-01 10:21:27 -07:00
Gerald (Jerry) Carter
b7d2fadbef Patch from Debian Samba package maintainers:
Patch 1 of 3:

- Patch 1 adds the new variables
- Patch 2 makes uses of them for files belonging to the "state" path
  and the "code pages" path
  This patch seemed more easily acceptable, which explains why we
  separated it from patch 3
- Patch 3 reassigns files to the "cache" path. Indeed all "debatable"
  changes have been moved to that one

The point is adding:

- a path for non discardable state data: basically all TDB files
  that may need to be backed up
- a path for shared data: mostly codepage stuff
- a path for cache data to host files such as
  browse.dat, printers.tbd, <printer>.tdb

All these are currently mixed in "libdir" (${prefix}/lib/samba by default).
The patch keeps these new paths to point to ${prefix}/lib/samba by default
and does therefore not change the software behaviour.  Used alone, it just
adds unused variables...so it can safely be used in sources without any
behaviour change and no impact on Samba developers work.
2007-11-01 13:00:10 -04:00
Jeremy Allison
11c03b75dd Add new parameter, "min receivefile size" (by default set
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
2007-10-30 16:22:24 -07:00
Jeremy Allison
bfbdb6324c Add in the recvfile entry to the VFS layer with a default
implementation. Needed for the zero-copy write code.
Jeremy.
2007-10-29 17:16:13 -07:00
Jeremy Allison
bda8c0bf57 Fix the setup_kaddr() call to cope with IPv6.
This is the last obvious change I can see. At
this point we can start claiming IPv6 support
(Hurrah !:-).
Jeremy.
2007-10-29 15:03:36 -07:00
Jeremy Allison
814daded90 Change our DNS code to cope with AAAA records. A6 records
look like a nightmare to use, so ignore them for now.
Jeremy.
2007-10-29 13:34:00 -07:00
Volker Lendecke
e17d3e10e8 Two patches
Hi!

Can you check and push them?

Thanks,

Volker

From b488af5905e2dee12a1a72a3b40801ae5c26f24f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@sernet.de>
Date: Sat, 27 Oct 2007 14:20:09 +0200
Subject: [PATCH] Fix some warnings and errors
2007-10-27 12:50:36 -07:00
Jeremy Allison
98e154c312 This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
2007-10-24 14:16:54 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Stefan Metzmacher
ea3173a945 remove reference to removed code
see commit 9e5ad21e67

metze
2007-10-18 16:52:26 +02:00
Günther Deschner
357f003849 Add WERR_SERVICE_ALREADY_RUNNING.
Guenther
2007-10-15 19:10:19 +02:00
Jeremy Allison
3f6bd0e1ec Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
2007-10-10 18:25:16 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Volker Lendecke
0141e64ad4 r25534: Apply some const
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
2007-10-10 12:31:12 -05:00
Jeremy Allison
18c6a2211d r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal with
the ripple effects this causes. utmp has to change etc. Remove some
global varables and store address/port in the unexpected db.
Jeremy.
2007-10-10 12:31:09 -05:00
Jeremy Allison
f1b8c5de0a r25474: Try and fix the build on Mac OS X 10.4.9.
Shuffle sa_family_t around.
Jeremy.
2007-10-10 12:31:06 -05:00
Jeremy Allison
327875182c r25472: Fix the interfaces code to detect IPv6 interfaces, using the
new standard getifaddrs() and freeifaddrs() interfaces. Currently
we only return IPv4 af_families. Needs fixing for binds to IPv6
but this has to be careful work.
Jeremy.
2007-10-10 12:31:06 -05:00
Michael Adam
066a46ba91 r25434: Add the option to print the debug class (DBGC_CLASS) in the debug header.
Control this by a new boolean smb.conf option "debug class" which is
by default set to "no" to keep the default debug header unchanged.

Michael

Note: You need to make clean for this patch.
2007-10-10 12:31:05 -05:00
Günther Deschner
b28dd747cb r25416: Add registry debug class.
Guenther
2007-10-10 12:31:03 -05:00
Gerald Carter
00a93ed336 r25407: Revert Longhorn join patch as it is not correct for the 3.2 tree.
The translate_name() used by cli_session_setup_spnego() cann rely
Winbindd since it is needed by the join process (and hence before
Winbind can be run).
2007-10-10 12:31:03 -05:00
Gerald Carter
8304ccba73 r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,
and client fixes.  Patch from Todd Stetcher <todd.stetcher@isilon.com>.
2007-10-10 12:31:02 -05:00
Jeremy Allison
b4ee924000 r25399: Excise uint - > uint32 (where appropriate) or unsigned int.
Jeremy.
2007-10-10 12:31:02 -05:00
Günther Deschner
cc38e4fc1f r25325: Rename some defines.
Guenther
2007-10-10 12:30:59 -05:00
Stefan Metzmacher
b3ee9adf28 r25128: _XOPEN_SOURCE_EXTENDED and socklen_t are always provided by libreplace
metze
2007-10-10 12:30:42 -05:00
Jeremy Allison
7632f8fb40 r25118: More pstring elimination.
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
b3f0d39d11 r25103: Ensure we don't return unwritten memory (valgrind caught).
Jeremy.
2007-10-10 12:30:40 -05:00
Jeremy Allison
cf6b6f9c3a r25102: Rewrite msdfs code to use talloced filenames. Passes make test
and make valgrindtest. Final step will be to change srvstr_get_path()
to return talloced memory in the major codepaths.
Jeremy.
2007-10-10 12:30:40 -05:00
Michael Adam
6c3c20e6c4 r25092: Add support for storing trusted domain passwords in LDAP for
passdb backend = ldapsam.

Along with reproducing the functionality of the secrets.tdb
code, I have prepared the handling of the previous trust password
(in case we are contacting a dc which does not yet know of a recent
password change). This information has still to be propagated
to the outside, but this requires a change of the api and also
a change of the secrets.tdb code.

Michael
2007-10-10 12:30:39 -05:00
Jeremy Allison
dee8beba7a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
2007-10-10 12:30:32 -05:00
Simo Sorce
113d62682a r24969: Fwd port "open" patch 2007-10-10 12:30:30 -05:00
Michael Adam
ef92d505c0 r24843: Add a "validate-cache" control message to winbindd.
So there is a new subcommand "smbcontrol winbindd validate-cache" now.

This change provides the infrastructure:
The function currently returns "true" unconditionally.
The call of a real cache validation function will be incorporated
in subsequent changes.

Michael
2007-10-10 12:30:27 -05:00
Volker Lendecke
6585ea2cb7 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
2007-10-10 12:30:24 -05:00
Günther Deschner
f5b3de4d30 r24804: As a temporary workaround, also try to guess the server's principal in the
"not_defined_in_RFC4178@please_ignore" case to make at least LDAP SASL binds
succeed with windows server 2008.

Guenther
2007-10-10 12:30:23 -05:00
Volker Lendecke
08e309e955 r24803: For some funny reason us4/gcc seems to fall over the ' 2007-10-10 12:30:22 -05:00
Jeremy Allison
e2d924248e r24762: Fix the build, missed TALLOC_SIZE -> talloc_named_const.
Jeremy.
2007-10-10 12:30:18 -05:00
Jeremy Allison
343be04643 r24759: Comment out the _nonnull calls for 3.2.x, as agreed with tridge.
Leaving the commented out code for now, in case I need to re-test
some stuff.
Jeremy
2007-10-10 12:30:18 -05:00
Stefan Metzmacher
f57d23d0f1 r24552: merge from SAMBA_4_0:
rename dcerpc_interface_table -> ndr_interface_table
rename dcerpc_interface_list  -> ndr_interface_list

and move them to libndr.h

metze
2007-10-10 12:29:56 -05:00
Stefan Metzmacher
9fec0d6c2c r24541: merge from SAMBA_4_0:
rename struct dcerpc_endpoint_list/struct dcerpc_authservice_list
into ndr_interface_string_array and move it to libndr.h

metze
2007-10-10 12:29:55 -05:00
Stefan Metzmacher
24e096b365 r24538: merge from SAMBA_4_0:
rename struct dcerpc_interface_call -> struct ndr_interface_call
and move it to librpc/ndr/libndr.h

metze
2007-10-10 12:29:55 -05:00
Stefan Metzmacher
7facd9bf3f r24533: merge from SAMBA_4_0:
rename dcerpc_syntax_id -> ndr_syntax_id

metze
2007-10-10 12:29:54 -05:00
Jeremy Allison
9256ec0a20 r24464: Now Volker removed the readbmpx we don't need cached errors any more.
Jeremy.
2007-10-10 12:29:50 -05:00
Günther Deschner
42abe8450b r24419: Hm, I think this protoype is not required here.
Guenther
2007-10-10 12:29:44 -05:00
Günther Deschner
5dc791f4cf r24413: Minor edits for libgpo.
Guenther
2007-10-10 12:29:42 -05:00
Volker Lendecke
4e819aea0b r24321: Attempt to fix the "hape" cc build 2007-10-10 12:29:28 -05:00
Stefan Metzmacher
b9ae00f498 r24311: add a reply_force_nterror() macro
metze
2007-10-10 12:29:27 -05:00
Stefan Metzmacher
81e5afc363 r24304: patch from Bjoern JAcke <bj@SerNet.DE>:
attached patches add EA support for Solaris. If no one disagrees, can
someone check this in please?

metze
2007-10-10 12:29:25 -05:00