1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

517 Commits

Author SHA1 Message Date
Jeremy Allison
52fe04df8e Remove more static fstring/pstrings. Fix socket option
set on wrong fd (-1).
Jeremy.
2007-11-09 15:09:16 -08:00
Volker Lendecke
814bed029e Remove the silly "user_socket_options" global variable
This is better done with a 'lp_do_parameter(-1, "socket options", ..);
2007-11-09 15:11:54 +01:00
Jeremy Allison
963fc76852 Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
2007-11-03 23:20:10 -07:00
Jeremy Allison
95d01279a5 I can't get away without a 'length' arg. :-).
Jeremy.
2007-11-03 18:41:26 -07:00
Jeremy Allison
e848506c85 Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
2007-11-03 18:15:45 -07:00
Jeremy Allison
8fbefe18a2 Fix vfstest link - move socket calls into smbd/process.c
not smbd/server.c
Jeremy
2007-10-31 14:24:52 -07:00
Jeremy Allison
8cf78776b0 Make explicit draining the socket on RECVFILE. Add
capability for large UNIX write if not signing and
recvfile set. Cope with large UNIX write length on
incoming processing. Stevef - we can now test 1-16Mb
writes from CIFFS.
Jeremy.
2007-10-31 14:01:35 -07: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
Stefan Metzmacher
95f76ae7a5 start smbd, nmbd and winbindd with the same startup message
at debug level 0.

metze
2007-10-30 15:44:27 +01: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
2ec6224b55 Ensure we don't terminate if we fail to bind to a socket,
only fail if we can't bind to any socket.
Jeremy.
2007-10-25 14:11:35 -07:00
Jeremy Allison
d04a8a6cdc Don't terminate on an invalid address family.
Jeremy.
2007-10-24 16:11:01 -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
793a9d24a1 Fix the popt / bool issues. Some places we used BOOL
where we meant int. Fix this. Thanks to metze for
pointing this out.
Jeremy.
2007-10-19 11:38:36 -07:00
Stefan Metzmacher
9cb1937fe8 fix startup of smbd, nmbd, winbindd
jra: POPT_ARG_VAL arguments need int values.
     I assume there're more places like this
     in the cmdline tools.

     Please fix this properly, as my commit is just
     a hack to get make test working again.

in samba4 we have a workaround for this see
smbd/server.c

metze
2007-10-19 10:34:06 +02: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
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
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
Volker Lendecke
17df313db4 r24702: Remove the old API pointers 2007-10-10 12:30:14 -05:00
Stefan Metzmacher
a95d9d1ef9 r24621: - deferr calling build_options();exit(0);
- use poptPrintUsage() to give the user more info

metze
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
8532e3182a r24599: patch from Karolin Seeger <ks@sernet.de>:
smbd, nmbd and winbindd can be started with invalid options currently.
The first patch attached would be a possible solution.
It contains an exit if an invalid option has been used. The main problem
is, that existing setups with wrong options or missing arguments in start
scripts will break (which is the right behaviour from my point of view).

metze
2007-10-10 12:30:09 -05:00
Stefan Metzmacher
306846a14f r24029: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
the claim_connection() must come after the sockets are open

metze
2007-10-10 12:28:57 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Andrew Tridgell
22e8404cef r23783: Processing the UAS change message was causing problems on ppc64 Linux
systems. Rather than trying to fix this, it's much better just to
remove the code, as it serves no purpose at all (the message that is
generated is ignored by smbd).

This sort of parsing should really be done by PIDL generated code.
2007-10-10 12:28:21 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
James Peach
b4ab1a0cd9 r23502: Restore exit-on-idle. Small refactoring for clarity. Exit if
we are idle and we timed out waiting for something to do.
2007-10-10 12:23:22 -05:00
Volker Lendecke
15553d6327 r23410: Merge the core of the cluster code.
I'm 100% certain I've forgotten to merge something, but the main code
should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and
messages_ctdbd.c.

There should be no changes to the non-cluster case, it does survive make
test on my laptop.

It survives some very basic tests with ctdbd enables, I did not do the
full test suite for clusters yet.

Phew...

Volker
2007-10-10 12:23:14 -05:00
Jeremy Allison
dfb4cb5d2b r23272: Fix main event loop - reviewed by Volker.
Jeremy.
2007-10-10 12:23:01 -05:00
Volker Lendecke
476080df3f r23241: In preparation for the cluster messaging import the parent smbd needs to
respond to events.c style events.
2007-10-10 12:22:57 -05:00
Volker Lendecke
7e39d77c1f r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
branch, please check if it fulfils your needs.

Two changes: The validation is not done inside the brlock.c traverse_fn,
it's done as a separate routine.

Secondly, this patch does not call the checker routines in smbcontrol
directly but depends on a running smbd.
2007-10-10 12:22:53 -05:00
Volker Lendecke
4afe37d431 r23168: Move the lp_max_connections() into service.c. 2007-10-10 12:22:51 -05:00
Volker Lendecke
3452a870d5 r23167: Remove an unused parameter 2007-10-10 12:22:51 -05:00
Volker Lendecke
eaefd00563 r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
2007-10-10 12:22:17 -05:00
Volker Lendecke
9b8df24107 r22954: More messaging_register 2007-10-10 12:22:11 -05:00
Volker Lendecke
65335a4206 r22942: Some message_register -> messaging_register conversions 2007-10-10 12:22:10 -05:00
Volker Lendecke
330946ad23 r22908: All callers of message_init now also call messaging_init. Unify those. 2007-10-10 12:22:07 -05:00
Volker Lendecke
edbeea5207 r22900: Convert profile/ to messaging_send_pid/messaging_register 2007-10-10 12:22:05 -05:00
Volker Lendecke
74fa57ca5d r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
2007-10-10 12:22:04 -05:00
Volker Lendecke
e43e94cda1 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
2007-10-10 12:21:55 -05:00
Volker Lendecke
0ad4b1226c r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
2007-10-10 12:21:52 -05:00
Volker Lendecke
dc18ab2f34 r22533: Use lib functions where we have them 2007-10-10 12:19:43 -05:00
James Peach
29a16b2acb r22495: Create wrapper to hide the details of obtaining a set of sockets
to listen on.
2007-10-10 12:19:39 -05:00
James Peach
fc8589a337 r22418: Support running under launchd. We abstract the method of obtaining
sockets to listen on a little, because in the launchd case these
are provided for us. We also add an idle timeout so that a daemon
can exit after a period of inactivity.
2007-10-10 12:19:33 -05:00
James Peach
19c929c633 r22417: Refactor the various daemon run-mode options to make the semantics
of the various flags explicit.
2007-10-10 12:19:33 -05:00
Herb Lewis
f8f51e8648 r22395: allow profiling level to be set on startup 2007-10-10 12:19:32 -05:00
Jeremy Allison
60fc9c0aed r21882: The server part of the code has to use an AUTH_NTLMSSP struct,
not just an NTLMSSP - grr. This complicates the re-use of
common client and server code but I think I've got it right.
Not turned on of valgrinded yet, but you can see it start
to take shape !
Jeremy.
2007-10-10 12:18:43 -05:00
Volker Lendecke
3fc00977a9 r21871: Move deadtime processing into an idle event. While there, simplify
conn_idle_all() a bit.

Volker
2007-10-10 12:18:41 -05:00
Volker Lendecke
9499fd9c80 r21869: Move sending keepalives out of the main processing loop into idle event.
On the way, make lp_keepalive() a proper parameter.

Volker
2007-10-10 12:18:41 -05:00