1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

658 Commits

Author SHA1 Message Date
Jeremy Allison
01a7017d7b r23014: For all branches, ensure that if we're blocked on a POSIX
lock we know nothing about that we retry the lock every
10 seconds instead of waiting for the standard select
timeout. This is how we used to (and are supposed to)
work.
Jeremy.
(This used to be commit fa18fc25a50cf13c687ae88e7e5e2dda1120e017)
2007-10-10 12:22:15 -05:00
Jeremy Allison
63e74f3059 r23007: Ensure we don't allow large read over the possible
packet size.
Jeremy.
(This used to be commit 5d465dd2d559df29d18a844137c8e14ffbb1a269)
2007-10-10 12:22:14 -05:00
Jeremy Allison
2b2eec4cfc r22925: Sync read_and_X with 3.0.26 code (use setup_readX_header()).
Jeremy.
(This used to be commit e1052c0e3d50473a9ded6092b6a85d78590a00e7)
2007-10-10 12:22:09 -05:00
Jeremy Allison
c3bde5a591 r22922: Move "normal_read:" label out of ifdef guard. Fix the build.
Jeremy.
(This used to be commit 3c1ccc68f03b02d2223ec745e241129766e0c15e)
2007-10-10 12:22:08 -05:00
Jeremy Allison
32106b2395 r22920: Add in the UNIX capability for 24-bit readX, as discussed
with the Apple guys and Linux kernel guys. Still looking
at how to do writeX as there's no recvfile().
Jeremy.
(This used to be commit a53268fb2082de586e2df250d8ddfcff53379102)
2007-10-10 12:22:08 -05:00
Volker Lendecke
b92064fcfd r22846: Chunk one to replace message_send_pid with messaging_send: Deep inside
locking/locking.c we have to send retry messages to timed lock holders.
The majority of this patch passes a "struct messaging_context" down
there. No functional change, survives make test.
(This used to be commit bbb508414683eeddd2ee0d2d36fe620118180bbb)
2007-10-10 12:22:02 -05:00
Jeremy Allison
1e6e3f8279 r22765: Fix from Alison Winters <alisonw@sgi.com> for missing return
in sendfilereadbraw.
Jeremy.
(This used to be commit b523e782b0f3a3899e5f448698fbecddd59f4369)
2007-10-10 12:21:55 -05:00
Jeremy Allison
2ad66881df r22502: Fix bug #4536 - delete symlinks to a directory correctly.
Jeremy.
(This used to be commit dcc6517d9d349c65b045160e8a1358af088ae97a)
2007-10-10 12:19:40 -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 2d80a96120a5fe2fe726f00746d36d85044c4bdb)
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 b49e90335d1e589916b5ab4992e3c4a2d221ca7e)
2007-10-10 12:19:30 -05:00
Jeremy Allison
2da54a66b9 r22291: Fix off-by-one in tconX parsing.
Jeremy.
(This used to be commit bc6ac4feac8c62cda2b6151eb648d3d5979e8a95)
2007-10-10 12:19:24 -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 38404c990db1436241c3a774c51196bc058d7576)
2007-10-10 12:19:16 -05:00
Jeremy Allison
bca29ddbba r22122: Start to fix csc issue with Vista. Make smbd support
the extended 7 word response for tconX rather than the
3 word one we supported previously.
Jeremy.
(This used to be commit 137953226a2d691259e7e84d6ae0dc24755e5a3a)
2007-10-10 12:19:14 -05:00
Volker Lendecke
81c820d77d r21801: Fix Coverity ID # 342
(This used to be commit 8700cd71bb3af3a55f025b34b61062aa5b66b6bc)
2007-10-10 12:18:35 -05:00
Jeremy Allison
24cdd7c733 r21800: Check-in the DFS rewrite. I am still testing this but it
works from smbclient and Windows, and I am promising to
support and fix both client and server code moving forward.
Still need to test the RPC admin support but I haven't
changed that code.
Jeremy.
(This used to be commit 7a7862c01d07796ef206b255c676ad7dc2cc42fc)
2007-10-10 12:18:34 -05:00
Jeremy Allison
dd011f453e r21770: For old DOS style searches we must remember if
the initial search had a wildcard in order to
correctly return no error on end of search.
Found by Samba4 torture tester.
Jeremy.
(This used to be commit c74bcf7677123f273d44181ca053ba49b8c7ddae)
2007-10-10 12:18:31 -05:00
Jeremy Allison
12c617af08 r21769: Attempt to fix bug #4384 in old search code.
We were accessing a pathname that hadn't gone
through unix_convert ! That's a big no-no...
Jeremy.
(This used to be commit 33a67fd39e1a51944bf0783350aa6ef95dfafb84)
2007-10-10 12:18:31 -05:00
Jeremy Allison
7b2c2e4155 r21754: Volker is completely correct. There's no need for
the RESOLVE_DFSPATH macros and their varients
any more. Fix reporting profile bug with all
error returns.
Jeremy.
(This used to be commit cdf0fdb1049fd68b46885cbea887dc0e595fa524)
2007-10-10 12:18:28 -05:00
Jeremy Allison
4952fe368a r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
(This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
2007-10-10 12:18:24 -05:00
Jeremy Allison
10ab7a3a78 r21672: The cannonical file access pattern should look like this :
srvstr_get_path(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), 0, STR_TERMINATE, &status);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

	RESOLVE_DFSPATH(name, conn, inbuf, outbuf);

	status = unix_convert(conn, name, False, NULL, &sbuf);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

	status = check_name(conn, name);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

Make sure that every access pattern (including the
wildcard generated paths from unlink, rename, and copy)
do the same. Tidy things up a bit....

Jeremy.
(This used to be commit b8327b21ddf518d34c6cd6c01bd7fc0fd3f63c0c)
2007-10-10 12:18:23 -05:00
Jeremy Allison
7a5fa7f12e r21191: Add in the POSIX open/mkdir/unlink calls.
Move more error code returns to NTSTATUS.
Client test code to follow... See if this
passes the build-farm before I add it into
3.0.25.
Jeremy.
(This used to be commit 83dbbdff345fa9e427c9579183f4380004bf3dd7)
2007-10-10 12:17:47 -05:00
Volker Lendecke
9974656d3b r21093: Remove the hash and dnotify backends. Disabling FAM for this checkin, I'm
working on that right now.

Volker
(This used to be commit 01c9fb17281e99300b339d2cfc0acac7ca94843c)
2007-10-10 12:17:36 -05:00
Volker Lendecke
697ccab3f0 r21089: Do notifies on rename
(This used to be commit 2aadb95a7e58777ee7ff024cc9e14f4334970d50)
2007-10-10 12:17:35 -05:00
Volker Lendecke
547f77778a r21087: Make the param list of notify_fname match notify_trigger
(This used to be commit defa28f9c3eda85a072b972fffd2d5de8bcf01f7)
2007-10-10 12:17:34 -05:00
Volker Lendecke
434bf5fadd r21080: Reformatting
(This used to be commit 705f866a78ec3f1169543bf82fb48ea6580160a9)
2007-10-10 12:17:34 -05:00
Volker Lendecke
b0bf3ddb38 r21079: Minimizing diff: Adopt the Samba4 style ChangeNotify flags.
Volker
(This used to be commit a3c1069b0c3da914e2ac7337fd9e924b1c811d39)
2007-10-10 12:17:33 -05:00
Jeremy Allison
845647f468 r21057: More refactoring into functions.
Jeremy.
(This used to be commit fe2d7cb2dcd7c4d25d71f196aa557ce3e287bb4c)
2007-10-10 12:17:31 -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 9cd6a8a82792b7b6967141565d043b6337836a5d)
2007-10-10 12:17:21 -05:00
Volker Lendecke
2958f46733 r20877: Random notify fixes
(This used to be commit 2f1bfc53733ac3debc6a8b51642ab191869cd792)
2007-10-10 12:17:17 -05:00
Jeremy Allison
fd37f98158 r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.
Allow us to correctly refuse to set delete on close on a
non-empty directory. There are still some delete-on-close
wrinkles to be fixed, but I understand how to do that better
now. I'll fix this tomorrow.
Jeremy.
(This used to be commit 029635885825a5562e7974a6f5675cce3bf1b5dc)
2007-10-10 12:17:16 -05:00
Volker Lendecke
940192ddcc r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)

Volker
(This used to be commit 5533cdeec1b0cdee39b1d89e2320587dc9281ee6)
2007-10-10 12:17:13 -05:00
Jeremy Allison
83eb0d1d6d r20844: Somewhat radical change - this may break the build (I will
watch carefully - so I'm doing it in one transaction so I can
roll back).

Change check_name(), reduce_name() and dptr_create() to
return NTSTATUS. This helps a lot in error path processing
and especially in reduce_name() allows us to ditch the flaky
and error-prone saving of errno and return errors directly.

Jeremy.
(This used to be commit 6133a694aa429d638320e39ffe1c49d172583ccf)
2007-10-10 12:17:12 -05:00
Jeremy Allison
52a36db39f r20843: Get rid of last BOOL ok.
Jeremy.
(This used to be commit a36d446fb612f87654c645f6507d413b95efaf21)
2007-10-10 12:17:12 -05:00
Jeremy Allison
f065b42dcc r20842: Only one more BOOL ok to go...
Jeremy.
(This used to be commit de0bf477dab1d57b5f7bc6bf70d8e76f9bfac63f)
2007-10-10 12:17:12 -05:00
Jeremy Allison
16f96517f1 r20841: Remove more BOOL ok.
Jeremy.
(This used to be commit c6b651966039b1c21facd4c4789bf873b5b49426)
2007-10-10 12:17:12 -05:00
Jeremy Allison
6d16226a2d r20840: Keep removing the old BOOL ok logic.
Jeremy.
(This used to be commit 224ff059915b2c92ec86d2c3c4b10c3bc552ffa2)
2007-10-10 12:17:12 -05:00
Volker Lendecke
0cfc6a8e11 r20796: Fix the same problem Jeremy has fixed (improper handling of deferred opens)
for delete_driver_files. Proper fix pending... :-)

Jeremy, please check.

Volker
(This used to be commit 21b8f15dd5ad567efeacf5ba22dc4d8c64b09b76)
2007-10-10 12:17:09 -05:00
Volker Lendecke
fb9a229643 r20759: Dummy checkin to let the build farm pick up the new smbtorture4
(This used to be commit 14c88b560e5c8fd59b84333e92337805620ccd7c)
2007-10-10 12:17:08 -05:00
Jeremy Allison
78fbb597c2 r20743: Remove another BOOL ok from reply_getatr.
Jeremy.
(This used to be commit c154f430710a4646fac42774817dfed7b936b087)
2007-10-10 12:17:08 -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 3d52268095c605a80dfcd371769198a332baa0a5)
2007-10-10 12:17:07 -05:00
Volker Lendecke
165e08e8b1 r20740: Get rid of some if-statements
(This used to be commit db93c1b98d5445071ad0af229afed1f11ab0a862)
2007-10-10 12:17:07 -05:00
Jeremy Allison
dd5e9e2ae7 r20721: Fix the search unix_convert error returns. Only open
to go...
Jeremy.
(This used to be commit 89f03a8db40365f99c6755ff19a4bfbf8d1bd316)
2007-10-10 12:17:06 -05:00
Jeremy Allison
1a40a6e08a r20720: Fix the chkpath problem, still looking at findfirst.
Jeremy.
(This used to be commit c5be0082ef60cd041121a9c36f4af934cd60562d)
2007-10-10 12:17:05 -05:00
Jeremy Allison
db0ad252a0 r20718: Sync up the filename path parsing changes from SAMBA_3_0_24.
The only difference between the two trees now w.r.t file
serving are the changes to smbd/open.c in this branch I need
to review.
Jeremy.
(This used to be commit f4474edf6a0c71001dbd01429ef70bafad6abd74)
2007-10-10 12:17:04 -05:00
Jeremy Allison
b538c2b86b r20635: Add placeholder to ensure we don't go into the
wcard unlink if bad_path was set. The error
returned here is almost certainly incorrect
and will need testing properly with smbtorture,
but I don't want to forget about this path
(yes Volker I know this is currently incorrect :-).
Jeremy.
(This used to be commit 06e20c287898d21e437ab117eb5eeeaf2420ba78)
2007-10-10 12:17:00 -05:00
Volker Lendecke
46fdae1b6b r20634: A *LOT* more work is necessary before touching notify remotely starts to make
sense. Until then, remove it from the tree to keep the diff between 3_0_24 and
3_0 small.

Volker
(This used to be commit f146a85e74c84e78a11e616a1cbeaeef4693a0e0)
2007-10-10 12:17:00 -05:00
Volker Lendecke
87bd4d2723 r20632: The extended RAW-SAMBA3BADPATH test led me to some wrong assumptions, in
particular the NT_STATUS_INVALID_PARAMETER thing was badly wrong. Remove the
changes based on it. Using gentest is much more effective in this respect, but
it will take a while to figure out the wildcard error handling of W2k3.

Volker
(This used to be commit 58b8a242a7f08c1292d24fc73df170dbcd68c10d)
2007-10-10 12:17:00 -05:00
Volker Lendecke
45e7b954cd r20628: Looks bigger than it is. This is just re-indenting the if (dirname) that we've
taken care of above.

Volker
(This used to be commit 5e1da363bb3f2675beb9fd9240301bb432e5239b)
2007-10-10 12:16:59 -05:00
Volker Lendecke
b5cad2c2a7 r20627: orig_name is not needed anymore, and slightly simplify logic by doing early
returns.

Volker
(This used to be commit 614651c6a72742173de5fa8723403880acc37c09)
2007-10-10 12:16:59 -05:00
Volker Lendecke
dbac39f74e r20619: bad_path is handled somewhere else, so can_delete does not need it anymore
(This used to be commit 1798987128be579a1a4574294a7c3094040ebaf2)
2007-10-10 12:16:59 -05:00