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

218 Commits

Author SHA1 Message Date
Volker Lendecke
4254af7180 r24088: Convert reply_unlink to the new API
(This used to be commit fb0a1b7bd0)
2007-10-10 12:29:04 -05:00
Volker Lendecke
8084a39ce0 r24086: Convert reply_ulogoffX to the new API
(This used to be commit bbc99e1c3b)
2007-10-10 12:29:04 -05:00
Volker Lendecke
4694e757ba r24085: Convert reply_rmdir to the new API
(This used to be commit 7689048d71)
2007-10-10 12:29:03 -05:00
Volker Lendecke
68513d521d r24084: Convert reply_mkdir to the new API
(This used to be commit e93f3996fc)
2007-10-10 12:29:03 -05:00
Volker Lendecke
ef97e2dece r24079: Convert reply_dskattr to the new API
(This used to be commit c8e0aa5752)
2007-10-10 12:29:03 -05:00
Volker Lendecke
09b3d25252 r24077: Convert reply_tdis to the new API
(This used to be commit bd0cb48dde)
2007-10-10 12:29:02 -05:00
Volker Lendecke
7d2d4ddfa2 r24056: Another big one: This converts reply_sesssetup_and_X to the new API. As usual,
its history can be found on http://samba.org/~vlendec/sesssetup/. This very
obviously needs close review.

Volker
(This used to be commit 35675a6a33)
2007-10-10 12:29:00 -05:00
Volker Lendecke
e5cdc454aa r24046: Fix a 64-bit warning
(This used to be commit a2ecc34aa4)
2007-10-10 12:28:59 -05:00
Volker Lendecke
01d5091c26 r24004: Convert reply_checkpath to the new API
(This used to be commit e5c7c6406a)
2007-10-10 12:28:55 -05:00
Volker Lendecke
db9f25c1c5 r24003: Convert reply_tcon_and_X to the new API
(This used to be commit 9422385d9c)
2007-10-10 12:28:55 -05:00
Volker Lendecke
3d12c53eb3 r24002: Convert reply_negprot to the new API
(This used to be commit bd981f5328)
2007-10-10 12:28:54 -05:00
Volker Lendecke
9e40557047 r23999: Convert reply_open_and_X
This is an example of chained code that is executed in make test
(This used to be commit e3a10e9ffb)
2007-10-10 12:28:54 -05:00
Volker Lendecke
47cdfc0413 r23998: Convert reply_close to the new API
(This used to be commit dbf74cb747)
2007-10-10 12:28:54 -05:00
Volker Lendecke
cc6a41017c r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
The complete history of this patch can be found under
http://www.samba.org/~vlendec/inbuf-checkin/.

Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only
checking into 3_2 at the moment, as it currently will slow down operations for
all non-converted (i.e. all at this moment) operations, as it will copy the
talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort
to convert everything necessary for the normal operations an XP box does.

I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More
to come, but I would appreciate some help here.

Volker
(This used to be commit 5594af2b20)
2007-10-10 12:28:53 -05:00
Volker Lendecke
8579dd4ded r23990: Reformatting for 80 cols and trailing whitespace
(This used to be commit 0484de27d9)
2007-10-10 12:28:53 -05:00
Volker Lendecke
941db29ab4 r23988: Looks a lot more scary than it is: This just unwraps the else-branch of
if (smb_messages[type].fn == NULL) { into the function top-level. Makes
this function a bit easier to understand IMO.

Volker
(This used to be commit ada23b7f06)
2007-10-10 12:28:52 -05:00
Volker Lendecke
799c3ec8d4 r23987: Remove static pid in switch_message()
There's no point in duplicating functionality that exists in
sys_getpid() that also only used in a debug statement
(This used to be commit ebf1b1e97c)
2007-10-10 12:28:52 -05:00
Volker Lendecke
fa919f24f0 r23813: Remove unused global variable
(This used to be commit 3b811134c0)
2007-10-10 12:28:29 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
5391750ce6 r23725: Remove get_current_mid()
Jeremy, next one to review :-)
(This used to be commit a50555dda7)
2007-10-10 12:23:49 -05:00
Volker Lendecke
0bc56a2e5f r23724: Reduce access to the global inbuf a tiny bit. Add a struct smb_request
that contains some of the fields from the SMB header, removing the need
to access inbuf directly. This right now is used only in the open file
code & friends, and creating that header is only done when needed. This
needs more work, but it is a start.

Jeremy, I'm only checking this into 3_0, please review before I merge it
to _26.

Volker
(This used to be commit ca988f4e79)
2007-10-10 12:23:48 -05:00
Volker Lendecke
864cad1353 r23537: Revert the inbuf/outbuf part of r23528: This caused the Solaris CC make test
to break. The Solaris CC put the static char InBuffer[TOTAL_BUFFER_SIZE] on an
odd address, the malloc'ed one is always aligned. The problem showed up in
pull_ucs2, ucs2_align uses the address of InBuffer as an indication whether to
bump up the src of the string by one. Unfortunately in the trans calls the
data portion is malloced and thus has different alignment guarantees than a
static variable. This one is bigger....

Volker
(This used to be commit 6affd7818f)
2007-10-10 12:23:26 -05:00
Volker Lendecke
5e8a4c12f9 r23528: Two changes to make the valgrind massif (heap profiler) output readable:
Remove the allocated inbuf/output. In async I/O we copy the buffers
explicitly now, so NewInBuffer is called exactly once. This does not
reduce memory footprint, but removes one of the larger chunks that
clobber the rest of the massif output

In getgroups_unix_user on Linux 2.6 we allocated 64k groups x 4 bytes
per group x 2 (once in the routine itself and once in libc) = 512k just
to throw it away directly again. This reduces it do a more typical limit
of 32 groups per user. We certainly cope with overflow fine if 32 is not
enough. Not 100% sure about this one, a DEVELOPER only thing?
(This used to be commit 009af09099)
2007-10-10 12:23:26 -05:00
Volker Lendecke
ac3f08ddbe 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
(This used to be commit eaefd00563)
2007-10-10 12:22:17 -05:00
Volker Lendecke
fad7dd8a60 r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
(This used to be commit 74fa57ca5d)
2007-10-10 12:22:04 -05:00
Volker Lendecke
bf7008abb8 r22695: Dummy checkin (reformatting) to make the AIX hosts retry.
(This used to be commit cd55ccef6a)
2007-10-10 12:21:46 -05:00
Volker Lendecke
fb56443427 r22691: Fix a 64-bit warning and a const const discard warning
(This used to be commit 3a2ca1b1b8)
2007-10-10 12:21:46 -05:00
Volker Lendecke
2541e0d590 r22458: Fix a comment
(This used to be commit f5ccec4228)
2007-10-10 12:19:34 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
dc90cd89a7 r22389: Start preparing for multiple encryption contexts in the
server. Allow server to reflect back to calling client
the encryption context that was sent.
Jeremy.
(This used to be commit b49e90335d)
2007-10-10 12:19:30 -05:00
Volker Lendecke
a633b42592 r22213: We can't use become_root() here, as it does DEBUG()
itself. become_root_uid_only did not :-)

Revert 21868, we need to find a better way.

Volker
(This used to be commit 629f966714)
2007-10-10 12:19:20 -05:00
Jeremy Allison
a098724734 r22145: Fix bug #4494 - reported by Kevin Jamieson <bugzilla@kevinjamieson.com>.
If returning a mapped UNIX error from sendfile, don't call chain_reply.
Jeremy.
(This used to be commit 38404c990d)
2007-10-10 12:19:16 -05:00
Volker Lendecke
496dbdf435 r21879: Move process_blocking_lock_queue to a timed event.
The idea is that we have blocking.c:brl_timeout as a timed
event that is present whenever we do have a blocking lock
pending. It fires brl_timeout_fn() which calls
process_blocking_lock_queue().

Whenever we make changes to blocking_lock_queue, we trigger
a recalc_brl_timeout() which sets a new brl_timout event if
necessary. This makes the call to
blocking_locks_timeout_ms() in setup_select_timeout()
unnecessary, this is implicitly done in
event_add_to_select_args() from the timed events.

Volker
(This used to be commit 7e31b8ce21)
2007-10-10 12:18:42 -05:00
Volker Lendecke
fe0b56ead1 r21871: Move deadtime processing into an idle event. While there, simplify
conn_idle_all() a bit.

Volker
(This used to be commit 3fc00977a9)
2007-10-10 12:18:41 -05:00
Volker Lendecke
c0e37a7496 r21870: Move sending auth_server keepalives out of the main loop into an idle event.
Volker
(This used to be commit 6226b30f38)
2007-10-10 12:18:41 -05:00
Volker Lendecke
7c2bc9c070 r21869: Move sending keepalives out of the main processing loop into idle event.
On the way, make lp_keepalive() a proper parameter.

Volker
(This used to be commit 9499fd9c80)
2007-10-10 12:18:41 -05:00
Volker Lendecke
8d0cfddb26 r21868: Remove check_log_size from the central smbd processing loop. This can be done
with a become_root/unbecome_root in debug.c.
(This used to be commit 4632a0caaf)
2007-10-10 12:18:41 -05:00
Volker Lendecke
2864d86b37 r21867: Simplify calling convention of timeout_processing. lp_deadtime is only
referenced in conn_idle_all().
(This used to be commit c0aaee6d36)
2007-10-10 12:18:40 -05:00
Volker Lendecke
0d91334fe7 r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
(This used to be commit af3308ce5a)
2007-10-10 12:18:33 -05:00
Jeremy Allison
235b0f97f2 r21731: Fix long-standing bug in our chain processing code.
Should fix a bug with WinPE. Probably a candidate
for the Vista patchset.
Jeremy.
(This used to be commit ef32de6b59)
2007-10-10 12:18:26 -05:00
Volker Lendecke
fe881c3e38 r21278: The main goal of this was to get rid of the NetInBuffer / set_InBuffer. But it
turns out that this patch actually speeds up the async writes considerably.

I tested writing 100.000 times 65535 bytes with the allowed 10 ops in
parallel. Without this patch it took about 32 seconds on my dual-core 1.6GHz
laptop. With this patch it dropped to about 26 seconds. I can only explain it
by better cache locality, NewInBuffer allocates more than 128k, so we jump
around in memory more.

Jeremy, please check!

Volker
(This used to be commit 452d51bc6f)
2007-10-10 12:17:53 -05:00
Volker Lendecke
c59a49d83b r21184: Dummy checkin to let the build farm pick up r21183 of Samba4
(This used to be commit 22c9511314)
2007-10-10 12:17:46 -05:00
Jeremy Allison
14785319cc r21166: Ensure we return the correct "EROFS" error on a non-writable
filesystem.
Jeremy.
(This used to be commit 1e25501e8e)
2007-10-10 12:17:45 -05:00
Volker Lendecke
d5206610cd r20931: This changes the notify infrastructure from a polling-based to an event-driven
based approach. The only remaining hook into the backend is now

	void *(*notify_add)(TALLOC_CTX *mem_ctx,
			    struct event_context *event_ctx,
			    files_struct *fsp, uint32 *filter);

(Should we put this through the VFS, so that others can more easily plug in?)

The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.

The backend can notify the main smbd process via

void notify_fsp(files_struct *fsp, uint32 action, char *name);

The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.

Based on this I'll continue with inotify now.

Volker
(This used to be commit 9cd6a8a827)
2007-10-10 12:17:21 -05:00
Volker Lendecke
bf219447a3 r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This
is step zero to import lib/events.

Jeremy, I rely on you to watch the change in receive_message_or_smb()
closely. For the normal code path this should be the only relevant change. The
rest is either not yet used or is cosmetic.

Volker
(This used to be commit cd07f93a8a)
2007-10-10 12:17:13 -05:00
Jeremy Allison
ab46f9cdd2 r20742: Rename chkpth -> checkpath for sanity's sake :-).
Start removing unneeded "BOOL ok" from this reply.c
(this logic is old, old, old..... :-).
Jeremy.
(This used to be commit 3d52268095)
2007-10-10 12:17:07 -05:00
Volker Lendecke
7a915ec3a6 r20700: In the main processing loop we select() on the fam socket. If it fires, it
might be possible that we hang in the receive_smb() although that socket is
not the reason for the select() to return.

This immediately reacts to the fam socket to become readable, and goes into
the select loop again. This fixes delays in files showing up in Windows.

Jeremy, James please review this and merge to 3_0_24 if appropriate.

Thanks,

Volker
(This used to be commit c846153b2e)
2007-10-10 12:17:04 -05:00
Volker Lendecke
ab7fc62edf r20432: Apply some const
(This used to be commit 22163fee59)
2007-10-10 12:16:49 -05:00
Stefan Metzmacher
258a465e20 r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()
and DLIST_DEMOTE() now take the type of the tmp pointer
not the tmp pointer itself anymore.

metze
(This used to be commit 2f58645b70)
2007-10-10 11:51:59 -05:00