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

138 Commits

Author SHA1 Message Date
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
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 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10 12:28:20 -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 ca988f4e79e977160d82e86486972afd15d4acf5)
2007-10-10 12:23:48 -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
86e5659aba r21257: Better fix for bug #4188 :
Windows Vista RC1 and RC2 can't delete directory on Samba share
based on work by Joe Meadows <jmeadows@webopolis.com>.
Jeremy.
(This used to be commit 2dab8928769938ab79da7b7ce2d165fc388f9b00)
2007-10-10 12:17:51 -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
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
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
8e6390a160 r20411: Fix originally from SATOH Fumiyasu (slightly
modified). Ensure "hide unXXX" parameters don't
hide MSDFS links. Bug #3319.
Jeremy.
(This used to be commit e5466fffc286a99fafe0fcfbf70e903e33baa7f9)
2007-10-10 12:16:47 -05:00
Jeremy Allison
315ad641c3 r18547: Add in fixes to mangling dir code - ensure don't
look in the paths for wcard - always read directly
from incoming packet.
Jeremy.
(This used to be commit 3745a1af4ea9262fcda28931539fa6ab4c9060d1)
2007-10-10 11:51:48 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10 11:19:14 -05:00
Jeremy Allison
a24c404967 r16537: Fix for bug #3858, all files in a directory not
being deleted when hide unreadable set to true.

Here's the scoop.

This one is really interesting. The pattern of deleting a directory is to do a
findfirst to get the first part of the list, then for each name returned it
does a open/set delete on close/close -> thus deleting the file. Then it does a
findnext with the last file name THAT IT JUST DELETED ! Now we can handle this
in the findnext in the case where hide unreadable is set to false as we look
back in our cache of names and just seek to the right point. The bug is
actually fixed in the first hunk of this patch - the one that removes the
is_visible_file() check after SearchDir returns false. We don't actually need
it and in this case it's causing the delete to be aborted because it can't find
the name (doh ! it was just deleted). We don't need it as SearchDir is only
ever called from findnext, and findnext should only ever be returning names we
gave it.

The rest of the patch are the debugs I used to find
the problem but they're generically useful.

Phew - that one took a while to track down.....

Jerry, please merge for 3.0.23 final.

Jeremy.
(This used to be commit cd048cb775f0a8525fc19aa463db07c477521f5b)
2007-10-10 11:18:57 -05:00
Paul Green
e18c9a926f r15196: Update a comment that I found confusing (I confuse easily).
(This used to be commit eb53f01863f8f9d2980d9c2c8d27899dd39e5fa2)
2007-10-10 11:16:28 -05:00
Jeremy Allison
876f2deb3a r14986: Fix OS/2 directory delete bug found by kukks.
(Thanks a lot for all your hard work on this).
We were caching the results of *all* directory
scans, not just the results that match the
client wildcard. This actually made no sense,
as only matches on the client wildcard can be
returned to the client and so might need to
be searched for in the cache. This fixes the
directory cache to only cache entries that we
return to the client.
Jeremy.
(This used to be commit c88af597d042390ff11b26fe802b0b10d0faa6ce)
2007-10-10 11:15:55 -05:00
Jeremy Allison
d14af63e6a r13293: Rather a big patch I'm afraid, but this should fix bug #3347
by saving the UNIX token used to set a delete on close flag,
and using it when doing the delete. libsmbsharemodes.so still
needs updating to cope with this change.
Samba4 torture tests to follow.
Jeremy.
(This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10 11:06:21 -05:00
Paul Green
5a06869da7 r11657: Tiny improvement to debug error message in dir_check_ftype.
(This used to be commit 46674ca21d9c257bc48af97e313b49118c7b478d)
2007-10-10 11:05:23 -05:00
Jeremy Allison
6d5757395a r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
(This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
2007-10-10 11:05:19 -05:00
Jeremy Allison
6baec64a73 r11420: Fix issue pointed out by Dina Fine <dina@exanet.com>. We can
only tell at parse time from the wire if an incoming name
has wildcards or not. If it's a mangled name and we demangle
the demangled name may contain wildcard characters. Ensure
these are ignored.
Jeremy.
(This used to be commit 4cd8e2a96b98ff711905e8c6f416b22440c16062)
2007-10-10 11:05:15 -05:00
Jeremy Allison
22f603ac56 r10558: Fix bug #3010 yet again. Die monster, die !
Jeremy.
(This used to be commit dba56e8d23dc10a31f0f700b02c8776bdc8f57c1)
2007-10-10 11:04:47 -05:00
Jeremy Allison
f98f86394a r9483: Changed DIR to SMB_STRUCT_DIR because of the amazing stupidity of a UNIX vendor
not understanding abstract data types :-(.
Jeremy.
(This used to be commit be5b4e2fa3ed30b0ff01b47d2354e5f782a12e25)
2007-10-10 11:01:11 -05:00
Jeremy Allison
f069f96a1f r9457: Attempt to fix bug #3010 by handling END_OF_DIRECTORY_OFFSET
consistently.
Jeremy.
(This used to be commit ac8f22a328d878f064277638d63446bf68b68dfd)
2007-10-10 11:01:11 -05:00
Jeremy Allison
15b842d401 r9286: Fix false positive found by Coverity - wcard must not be null.
Jeremy.
(This used to be commit 31104e5bcfffdd48071b2062809313679f29961f)
2007-10-10 11:00:31 -05:00
Jeremy Allison
58a3749e9c r8689: Fixes bugid #2889 for sure. Turns out the OS/2 dos box doesn't like two offsets
to be identical. Make offsets for . and .. different (and explicit).
Jeremy.
(This used to be commit 217cc66e46b3df35a66fed4055bd5032aab4d73f)
2007-10-10 11:00:15 -05:00
Jeremy Allison
aa63997c23 r8655: Still trying to fix #2889. We don't need the DPTR_MASK after
all, now thinking it might be to do with flags2...
Jeremy.
(This used to be commit a3ceabf7c678b5e7f77cc073cf535498ffc67eb6)
2007-10-10 11:00:14 -05:00
Jeremy Allison
78e3b4f04b r8610: If I'm going to do a debug level zero, at least make it useful.
Jeremy.
(This used to be commit 99dae22dcf4050b5aacbb2cd4d2a08a183611402)
2007-10-10 11:00:13 -05:00
Jeremy Allison
87801bc387 r8609: Fix for bugid #2889. I think the problem is that the top 16 bits of the "server state" field must be
non-zero. As we're using the 32 bit field as an offset then normally this field
will be zero. W2K3 fills this field with a counter enumerating the number of
SMBsearch calls on this directory - starting at 1. Add back the 1<<31 bit flag
DPTR_MASK to ensure this is non-zero - with better checks on use.
Jeremy.
(This used to be commit 6415657942c49ea51d4e4f4ee2189c7d70b9c5fa)
2007-10-10 11:00:13 -05:00
Jeremy Allison
af8a691db1 r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
(This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10 10:58:18 -05:00
Jeremy Allison
ff7e5c2673 r7893: Add in the extra parameters to opendir() to fix the large directory/insane app
problem. Rev vfs version. Doesn't change the normal codepath.
Jeremy.
(This used to be commit 0f03a6bdcdbdf60da81e0aeffa84ac6e48fc6a04)
2007-10-10 10:58:02 -05:00
Jeremy Allison
7e509e9b99 r7842: With the patch I sent Steve yesterday this gives us complete POSIX pathnames.
ie. files containing : and \ can be accessed from Linux.
Jeremy.
(This used to be commit e9b8d23d6138d909a65ea70b2e801881e8333b38)
2007-10-10 10:57:59 -05:00
Jeremy Allison
741b0a97bb r7617: Fix for bug #2801 - delete veto files was broken with the new
large directory code.
Jeremy.
(This used to be commit f397cc08b5628913af4d7f9c2c6d20c778e5d8ca)
2007-10-10 10:57:16 -05:00
Jeremy Allison
c3fedee2a6 r7474: A *foul* and *disgusting* hack to ensure that, at the very lowest
level, . and .. are the first two entries returned when reading a
directory. This also means we can't seek to these offsets, but we
will never be doing that anyway (as far as I can think). The reason
we have to do this is that the NT4 explorer will happily display a
folder marked ".." as a clickable folder (and probably would display
"." as a clickable folder too) if these are not in positions zero
and one of the returned file list. W2K seems to have fixed this but
there are too many older systems out there... Never mind, more for
the "Undocumented CIFS talk", coming to a CIFS2005 conference near
you soon.... :-).
Jeremy.
(This used to be commit 7b6e907922b7d98abe4430ea73712a9c6419ea08)
2007-10-10 10:57:10 -05:00
Jeremy Allison
0deab47cc6 r7210: Fix my own mistakes up, sorry.
Jeremy.
(This used to be commit 53c3a954ee0e1c9dc61950f1a9d0a654de9382c6)
2007-10-10 10:57:05 -05:00
Jeremy Allison
ed5e7ff9f1 r7200: Don't use memset, use SET_STAT_INVALID (has the same effect).
Jeremy.
(This used to be commit 0b6f87d5e14da461bd2b1c3a4e6f47a69d2cd1c4)
2007-10-10 10:57:05 -05:00
Jeremy Allison
02e3717ee9 r6625: Remove another global variable left over from a long time ago (magic char).
Jeremy.
(This used to be commit b1bfa9cb37deb22d1d08bc60ba44d61334f6446e)
2007-10-10 10:56:47 -05:00
Jeremy Allison
0483dd60de r6550: Move function make_dir_struct from util to dir.c
Jeremy.
(This used to be commit 5b86e3dcdf31dec61449d2faede61d24c3a8d79f)
2007-10-10 10:56:45 -05:00
Jeremy Allison
431a28a315 r6548: Fix bug #2622 - remove DPTR_MASK as it makes no sense.
Jeremy.
(This used to be commit 927681c8c4458c77de2622557f1465fd5ca1c28b)
2007-10-10 10:56:44 -05:00
Jeremy Allison
e0c105ece6 r6473: Fix for bug #2644 - test for special files to be ignored was reversed.
Jeremy.
(This used to be commit 7c173dec2efcbe3fe42ffb9a2e85f3fbc8710ec4)
2007-10-10 10:56:41 -05:00
Jeremy Allison
d0a0930485 r6417: Strange old IRIX systems return -1 for telldir() when
end of directory reached. Don't check for that and bail
when reading directory entries as it's a valid value.
Excellent work from Cale Fairchild <cale@brocku.ca>
tracked this down.
Jeremy.
(This used to be commit a60fe9aba16eac4f195a2359d8b7672d8c8aa240)
2007-10-10 10:56:41 -05:00
Herb Lewis
978ca84860 r6225: get rid of warnings from my compiler about nested externs
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10 10:56:30 -05:00
Jeremy Allison
8d2e18ac53 r6169: Fix bug #2563. Infinite loop on non-existant file with findnext.
Jeremy
(This used to be commit 065ab9182dc39557b8c26d3d110abe9963ad9568)
2007-10-10 10:56:26 -05:00
Jeremy Allison
445a9729f0 r6044: Ensure the old search calls always ask mask_match to translate
patterns like ????????.??? - even if using an NT1 protocol.
Matches W2K3 behavior.
Jeremy.
(This used to be commit 67f6473f50f3284b9ccbe6f983f23cd42b3b7c9f)
2007-10-10 10:56:18 -05:00
Jeremy Allison
143bf1202c r6022: Fix for bug #2533. Incorrect dir listings from OS/2 clients.
Jeremy.
(This used to be commit cf8949f684ee9adcd35d56d923b2f5733efc05ac)
2007-10-10 10:56:16 -05:00
Jeremy Allison
ff107a93cd r5922: Fix for NASTY NASTY bug #2501. All my fault :-(. Brown paper bag time.
Stops Win98 from looping doing findnext on a singleton directory. More
testing very welcome.
Jeremy.
(This used to be commit e32a58742e618a49934e19b72cd5222c9666cf95)
2007-10-10 10:56:09 -05:00
Jeremy Allison
ee804161aa r5843: Removed unused variable - pointed out by jason@ncac.gwu.edu in bugid #2460.
Jeremy.
(This used to be commit 1f988333ecaedfb21a8deee6eebb9bd4de91bfd6)
2007-10-10 10:56:05 -05:00
Jeremy Allison
5713c65a82 r5632: Fix infinite looping bug found by nasty BlueArc test :-).
When finding a singleton directory remember that we're
at the end and don't continuously return the same name.
Jeremy.
(This used to be commit 3da50060279609f534aeffe6338b0a2b07d0e8f1)
2007-10-10 10:55:51 -05:00
Jeremy Allison
fcbb7b0e25 r5508: Typo - ZERO_STRUCT -> ZERO_STRUCTP.
Jeremy.
(This used to be commit 76e1d90aef45ccc089492d962e0f284e2e4d8e7a)
2007-10-10 10:55:43 -05:00
Jeremy Allison
91ef89daa0 r5183: Ensure we correctly set the per-connection "case_sensitive" setting.
Rename dptrs_open to the more correct dirhandles_open.
Remove old #if 1.
Jeremy.
(This used to be commit c43bae306a18f5716acbe8571f4f414873400cb1)
2007-10-10 10:55:32 -05:00
Jeremy Allison
021011f900 r5160: First cut at refactoring of directory code to handle non-wildcard
directory match more efficiently. Passes RAW-SEARCH under valgrind but needs more
testing (which I'll do later today :-).
Jeremy.
(This used to be commit 0b04dd9d0c6d1fe02d1b5e43f203577bf5466f33)
2007-10-10 10:55:30 -05:00
Jeremy Allison
c1d7588c74 r5154: Tidy up interface a little.
Jeremy.
(This used to be commit a38eeb765f4c744ca7bf0aca86bb448240ad295d)
2007-10-10 10:55:29 -05:00
Jeremy Allison
784adfbcbb r5152: Restructure the directory handling code, stop using void * pointers
that just allow the wrong pointer to be assigned :-) and make the
interface more consistent. Fix the FreeBSD directory problem. Last
thing to do is to add the "singleton" directory concept from James
Peach's code.
Jeremy.
(This used to be commit cfa8150fd9932470cb8f3b5e14c0156dda67125d)
2007-10-10 10:55:29 -05:00