1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-21 03:17:08 +03:00

648 Commits

Author SHA1 Message Date
Jeremy Allison
bc6ac4feac r22291: Fix off-by-one in tconX parsing.
Jeremy.
2007-10-10 12:19:24 -05:00
Jeremy Allison
38404c990d 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.
2007-10-10 12:19:16 -05:00
Jeremy Allison
137953226a 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.
2007-10-10 12:19:14 -05:00
Volker Lendecke
8700cd71bb r21801: Fix Coverity ID # 342 2007-10-10 12:18:35 -05:00
Jeremy Allison
7a7862c01d 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.
2007-10-10 12:18:34 -05:00
Jeremy Allison
c74bcf7677 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.
2007-10-10 12:18:31 -05:00
Jeremy Allison
33a67fd39e 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.
2007-10-10 12:18:31 -05:00
Jeremy Allison
cdf0fdb104 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.
2007-10-10 12:18:28 -05:00
Jeremy Allison
8f3d530c5a 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.
2007-10-10 12:18:24 -05:00
Jeremy Allison
b8327b21dd 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.
2007-10-10 12:18:23 -05:00
Jeremy Allison
83dbbdff34 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.
2007-10-10 12:17:47 -05:00
Volker Lendecke
01c9fb1728 r21093: Remove the hash and dnotify backends. Disabling FAM for this checkin, I'm
working on that right now.

Volker
2007-10-10 12:17:36 -05:00
Volker Lendecke
2aadb95a7e r21089: Do notifies on rename 2007-10-10 12:17:35 -05:00
Volker Lendecke
defa28f9c3 r21087: Make the param list of notify_fname match notify_trigger 2007-10-10 12:17:34 -05:00
Volker Lendecke
705f866a78 r21080: Reformatting 2007-10-10 12:17:34 -05:00
Volker Lendecke
a3c1069b0c r21079: Minimizing diff: Adopt the Samba4 style ChangeNotify flags.
Volker
2007-10-10 12:17:33 -05:00
Jeremy Allison
fe2d7cb2dc r21057: More refactoring into functions.
Jeremy.
2007-10-10 12:17:31 -05:00
Volker Lendecke
9cd6a8a827 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
2007-10-10 12:17:21 -05:00
Volker Lendecke
2f1bfc5373 r20877: Random notify fixes 2007-10-10 12:17:17 -05:00
Jeremy Allison
0296358858 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.
2007-10-10 12:17:16 -05:00
Volker Lendecke
5533cdeec1 r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)

Volker
2007-10-10 12:17:13 -05:00
Jeremy Allison
6133a694aa 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.
2007-10-10 12:17:12 -05:00
Jeremy Allison
a36d446fb6 r20843: Get rid of last BOOL ok.
Jeremy.
2007-10-10 12:17:12 -05:00
Jeremy Allison
de0bf477da r20842: Only one more BOOL ok to go...
Jeremy.
2007-10-10 12:17:12 -05:00
Jeremy Allison
c6b6519660 r20841: Remove more BOOL ok.
Jeremy.
2007-10-10 12:17:12 -05:00
Jeremy Allison
224ff05991 r20840: Keep removing the old BOOL ok logic.
Jeremy.
2007-10-10 12:17:12 -05:00
Volker Lendecke
21b8f15dd5 r20796: Fix the same problem Jeremy has fixed (improper handling of deferred opens)
for delete_driver_files. Proper fix pending... :-)

Jeremy, please check.

Volker
2007-10-10 12:17:09 -05:00
Volker Lendecke
14c88b560e r20759: Dummy checkin to let the build farm pick up the new smbtorture4 2007-10-10 12:17:08 -05:00
Jeremy Allison
c154f43071 r20743: Remove another BOOL ok from reply_getatr.
Jeremy.
2007-10-10 12:17:08 -05:00
Jeremy Allison
3d52268095 r20742: Rename chkpth -> checkpath for sanity's sake :-).
Start removing unneeded "BOOL ok" from this reply.c
(this logic is old, old, old..... :-).
Jeremy.
2007-10-10 12:17:07 -05:00
Volker Lendecke
db93c1b98d r20740: Get rid of some if-statements 2007-10-10 12:17:07 -05:00
Jeremy Allison
89f03a8db4 r20721: Fix the search unix_convert error returns. Only open
to go...
Jeremy.
2007-10-10 12:17:06 -05:00
Jeremy Allison
c5be0082ef r20720: Fix the chkpath problem, still looking at findfirst.
Jeremy.
2007-10-10 12:17:05 -05:00
Jeremy Allison
f4474edf6a 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.
2007-10-10 12:17:04 -05:00
Jeremy Allison
06e20c2878 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.
2007-10-10 12:17:00 -05:00
Volker Lendecke
f146a85e74 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
2007-10-10 12:17:00 -05:00
Volker Lendecke
58b8a242a7 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
2007-10-10 12:17:00 -05:00
Volker Lendecke
5e1da363bb r20628: Looks bigger than it is. This is just re-indenting the if (dirname) that we've
taken care of above.

Volker
2007-10-10 12:16:59 -05:00
Volker Lendecke
614651c6a7 r20627: orig_name is not needed anymore, and slightly simplify logic by doing early
returns.

Volker
2007-10-10 12:16:59 -05:00
Volker Lendecke
1798987128 r20619: bad_path is handled somewhere else, so can_delete does not need it anymore 2007-10-10 12:16:59 -05:00
Volker Lendecke
b1edc3d053 r20618: Fix a bug in bad_path handling that also exists in 3.0.23: For reply_unlink
under Linux we returned NT_STATUS_NOT_A_DIRECTORY. This is because in the
bad_path==True condition lstat(2) returns ENOTDIR and not ENOENT.

Not sure if we want to necessarily replicate the INVALID_PARAMETER here, but
this is what W2k3 does.

Jeremy, I tried to call you, but you were not around. So I'll leave it up to
you to merge this.

Volker
2007-10-10 12:16:59 -05:00
Volker Lendecke
c86fbdf8cc r20617: Do not notify if the delete failed 2007-10-10 12:16:59 -05:00
Volker Lendecke
794d5d38f1 r20612: A checkin I've wanted to do for ages: For bad_path==False set_bad_path_error
is equivalent to UNIX_ERROR. Expand the last reference. Lets see if I can kill
that as well :-)

Volker
2007-10-10 12:16:58 -05:00
Volker Lendecke
358673c366 r20611: All but one callers to set_bad_path_error have had the bad_path==True argument
being handled further up.

Volker
2007-10-10 12:16:58 -05:00
Volker Lendecke
cea9a01434 r20607: Next micro-step for reply_setatr 2007-10-10 12:16:58 -05:00
Volker Lendecke
c16775486b r20606: bad_path == True has been covered further up in reply_setatr.
I'm checking in micro-steps to make them independently checkable. This code
just very severely needs cleanup, but I don't want to break anything. So, be
patient with me, please :-)

Volker
2007-10-10 12:16:57 -05:00
Volker Lendecke
f19db8f33e r20605: Simplify logic in reply_setatr slightly 2007-10-10 12:16:57 -05:00
Volker Lendecke
e4a2e63272 r20597: Survive some of the notify mask tests. 2007-10-10 12:16:57 -05:00
Volker Lendecke
244f96388c r20589: Re-add lost bad_path handling, sorry. 2007-10-10 12:16:56 -05:00
Jeremy Allison
27dc5bebda r20558: Refactor rmdir_internals to use early termination rather
than lots of indented code. Change recursive_rmdir()
to return the smbd standards of True on success, False
on fail (it was doing the reverse, which was very confusing).
Jeremy.
2007-10-10 12:16:56 -05:00