summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_search.c
AgeCommit message (Collapse)AuthorFilesLines
2010-09-10s4/pvfs: use monotonic time for this timeoutBjörn Jacke1-3/+3
2010-02-02Change uint_t to unsigned int in source4Matt Kraai1-8/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-10-18s4-smb2: fixed SMB2 find commandsAndrew Tridgell1-2/+2
The change to check for invalid \ prefix on SMB2 paths broke the internal SMB2 code.
2009-02-05s4:pvfs: use talloc_get_type() to cast from void *Stefan Metzmacher1-16/+36
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-2/+2
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-10-11Fix include paths to new location of libutil.Jelmer Vernooij1-1/+1
2008-06-03pvfs: add PVFS_RESOLVE_NO_OPENDB flag and get the write time from the opendbStefan Metzmacher1-1/+1
By default get the current write time from the opendb, but allow callers to pass PVFS_RESOLVE_NO_OPENDB for performance reasons, if they don't need to the write time. metze (This used to be commit def52cc0988c26a815e74b3391e5857512408d90)
2007-10-10r25554: Convert last instances of BOOL, True and False to the standard types.Jelmer Vernooij1-9/+9
(This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r23067: use 'const union smb_search_data *file' also in the server code to ↵Stefan Metzmacher1-9/+9
get rid of compiler warnings in the cifs backend metze (This used to be commit 34ef07b1f5acdad27edd80de8de4c6de7f879f9b)
2007-10-10r22842: fix directory listing of SMB2 and include directories and hidden filesStefan Metzmacher1-1/+1
metze (This used to be commit e087772ec9ec561b13dbdf6bfead7394a184d7d9)
2007-10-10r18319: fixed the directory search resume code on IRIXAndrew Tridgell1-15/+24
The problem was twofold: 1) irix returns 64 bit numbers in telldir(). The protocol uses a 32 bit resume key. We now cope with this properly using the code in pvfs_list_seek_ofs(). 2) irix returns 0xFFFFFFFF from telldir() for the last entry in the directory. When added to DIR_OFFSET_BASE this became DIR_OFFSET_DOTDOT which meant an infinite loop! (This used to be commit 8cce9740ed0da9f08d6821beb4acaa9d28d149c2)
2007-10-10r17930: Merge noinclude branch:Jelmer Vernooij1-1/+1
* Move dlinklist.h, smb.h to subsystem-specific directories * Clean up ads.h and move what is left of it to dsdb/ (only place where it's used) (This used to be commit f7afa1cb77f3cfa7020b57de12e6003db7cfcc42)
2007-10-10r17752: using -1 in a uint16_t value causes compiler warnings,Stefan Metzmacher1-4/+6
use UINT16_MAX as invalid search handle metze (This used to be commit a4e19d6cc4cce611241c502de485dbd2496be0d3)
2007-10-10r16876: implement SMB2 Find in the posix ntvfs backendStefan Metzmacher1-0/+160
metze (This used to be commit 4f1afda488f2fb5cfcf98ef6a56157f954fdccfc)
2007-10-10r16834: split the level's of smb_search_first/smb_search_next and the levelsStefan Metzmacher1-38/+78
of smb_search_data metze (This used to be commit 78c201db8a47a71908698c4dda2add4cf85694d9)
2007-10-10r15855: more talloc_set_destructor() typesafe fixes. nearly done ...Andrew Tridgell1-2/+1
(This used to be commit 396d82a231b6e3a91178db08b706626d4d4b420c)
2007-10-10r14540: fix a talloc hierachie problem,Stefan Metzmacher1-25/+14
make sure file and search handles are cleaned up before anything else in the pvfs_state struct, as there destructors reply on a valid pvfs_state struct metze (This used to be commit aaa5d377b9b6145a83c0e686c7fbb7b561ae8988)
2007-10-10r14464: Don't include ndr_BASENAME.h files unless strictly required, insteadJelmer Vernooij1-1/+1
try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
2007-10-10r14456: don't access the smbsrv_tcon inside the ntvfs modulesStefan Metzmacher1-1/+1
metze (This used to be commit 5709c1c4e1a561dd9af98cfefbbbdac9b18765b7)
2007-10-10r14157: - pass a struct ntvfs_request to the ntvfs layerStefan Metzmacher1-5/+5
(for now we just do #define ntvfs_request smbsrv_request, but it's the first step...) - rename ntvfs_openfile() -> ntvfs_open() - fix the talloc hierachie in some places in the ntvfs_map_*() code metze (This used to be commit ed9ed1f48f602354810937c0b0de850b44322191)
2007-10-10r8535: no longer rely on seekdir working after a closedir. Instead, keepAndrew Tridgell1-11/+28
directories open, but close search states based on an inactivity timer, with a default of a 5 minute timeout (This used to be commit 2e8d154e7dfb9b320a1344e957a39e96e1eefadd)
2007-10-10r6229: Back out these changes ...Richard Sharpe1-1/+1
(This used to be commit 321fbae51267153102e47845736f2c3a5abfe0be)
2007-10-10r6219: This change allows us to fall back to authenticating withoutRichard Sharpe1-1/+1
DCERPC_SCHANNEL_128 if we fail. Thus, it allows us to work with Windows NT DCs ... (This used to be commit 3034b226705c4736d57c9bf4e9470c4d44c72e8e)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell1-1/+0
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell1-3/+3
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r4615: added acl checking on directory search in pvfsAndrew Tridgell1-0/+11
(This used to be commit 0e61a422bd9a1596a284c176f033e958bbeaa8ce)
2007-10-10r4263: added support for the trans2 RAW_SEARCH_EA_LIST informationAndrew Tridgell1-0/+21
level. This is quite a strange level that we've never seen before, but is used by the os2 workplace shell. note w2k screws up this level when unicode is negotiated, so it only passes the RAW-SEARCH test when you force non-unicode (This used to be commit 25189b8fbf6515d573e3398dc9fca56505dc37b9)
2007-10-10r4165: added a 100 element name cache to cope with some amount of seekingAndrew Tridgell1-5/+5
back to filenames that have been deleted. This fixes the new os/2 delete test. (This used to be commit 6d471db13ab132655a07e11533a559446e56fc00)
2007-10-10r4162: this should fix the delete/findnext problem from OS/2 clients. ThanksAndrew Tridgell1-0/+4
again to kukks for the excellent and detailed bug report (This used to be commit 7dfffe4ac0d6858ae6848708df1baa11a6819680)
2007-10-10r4067: no matches in findnext is not an errorAndrew Tridgell1-5/+0
(This used to be commit 6da058a28ba44a02964d375c9e390fbd472bc2b6)
2007-10-10r3747: - added some of the infrastructure needed for streams support in pvfsAndrew Tridgell1-2/+2
(the IDL, and the load/save meta-data logic) - changed pvfs_resolve_name() to default to non-wildcard, needing PVFS_RESOLVE_WILDCARD to enable wildcards. Most callers don't want wildcards, so defaulting this way makes more sense. - fixed deletion of EAs (This used to be commit e7afd4403cc1b7e0928776929f8988aa6f15640b)
2007-10-10r3544: fixed some #include lines to make them more consistentAndrew Tridgell1-1/+1
(This used to be commit a1a0118bd3f1cae034a1c564d05c3aa8019ff932)
2007-10-10r3455: some more portability fixes. We nearly compile on solaris again now.Andrew Tridgell1-0/+1
(This used to be commit 4f33247f1ca60416415a61a7afac43c9dc8a61fd)
2007-10-10r3447: more include/system/XXX.h include filesAndrew Tridgell1-0/+1
(This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105)
2007-10-10r3276: - allow for more than 256 open old style searches (limit currently ↵Andrew Tridgell1-4/+50
set at an arbitrary 5000) - auto-cleanup old searches that the client forgot to close (common with old searches) - expanded the RAW-SEARCH test to test more than 256 old searches, and old search rewind (w2k3 fails this - it appears to not support rewind on old style searches) (This used to be commit bc83d823b2140a10007490bf0101843a886f99a6)
2007-10-10r3262: - new pvfs_dirlist code that reopens the directory between searchAndrew Tridgell1-19/+21
calls. This is needed to allow for "new files appear during a search" behaviour - pvfs now passes RAW-SEARCH (This used to be commit 0d98f7653a1d58510a6cd4c2ac6c5e05c541109c)
2007-10-10r3260: redid the pvfs_dirlist() interface in preparation for a "keepAndrew Tridgell1-39/+30
directory open" implementation, as opposed to the "load the whole directory" interface used now. This will be needed to pass RAW-SEARCH (This used to be commit 692623c6c0a2c6817fddfa77cd1c2525c27145c4)
2007-10-10r3248: don't stop searches on failed fill_search_info()Andrew Tridgell1-7/+1
(This used to be commit 4cdd750b5cc9b26dbbaebe58b4f1c3984dac8d6c)
2007-10-10r3240: - update the rules for what error codes should be given on theAndrew Tridgell1-2/+3
different type of unlink an seach mismatches - wildcard directory listings that have attribute FILE_ATTRIBUTE_DIRECTORY and match "." or ".." should be failed. - don't set the write_time on SMBclose unless it is non-zero - added much better support for setfileinfo and setpathinfo in pvfs - better (and more efficient) handling of .. and . components in filenames (This used to be commit 9305b07af395a158cb9f0c1c9486f7122c79d357)
2007-10-10r3207: - reformat error msgs in BASE-DIR* testsAndrew Tridgell1-2/+4
- added support for mandatory attributes in old style directory search - we now pass BASE-DIR1 and BASE-DIR2 (This used to be commit efaa0eaec49e952aa515c3448246d9048a484c26)
2007-10-10r3064: - use UINT8_MAX and UINT16_MAX instead of hex values for ↵Andrew Tridgell1-2/+2
idr_get_new() limits - change idr_get_new() to use > instead of >= in the limit check (This used to be commit 834b09929bcb8aabdd151b7c2306001497cabdb4)
2007-10-10r3056: added a id -> pointer data structure (a type of radix tree). This isAndrew Tridgell1-58/+35
an extremely efficient way of mapping from an integer handle (such as an open file handle) to a pointer (such as the structure containing the open file information). The code is taken from lib/idr.c in the 2.6 Linux kernel, and is very fast and space efficient. By using talloc it even has auto cleanup. This commit converts the handling of open file handles and open directory search handles to use the idtree routines. In combination with talloc destructors, this simplifies the structure handling in the pvfs backend a lot. For example, we no longer need to keep a linked list of open directory searches at all, and we no longer need to do linear scans of the list of open files on most operations. The end result is that the pvfs code is now extremely scalable. You can have 10s of thousands of open files and open searches and the code still runs very fast. I have also added a small optimisation into the file close path, to avoid looking in the byte range locking database if we know that there are no locks outstanding. (This used to be commit 16835a0ef91a16fa01145b773aad8d43da215dbf)
2007-10-10r2904: - fixed the old style SMBsearch to return the pvfs shortname, not a ↵Andrew Tridgell1-2/+5
truncated long name. - short name can be up to 12 bytes, not 11 (This used to be commit 657103ec6264bf4c2986fedd3fc6577746395d49)
2007-10-10r2788: prevent a memory leak in the pvfs search backendAndrew Tridgell1-2/+2
(This used to be commit 1de22070610231e60d329f56997bbec2cc674a4e)
2007-10-10r2751: this is a new ntvfs design which tries to solve:Stefan Metzmacher1-12/+17
- the stacking of modules - finding the modules private data - hide the ntvfs details from the calling layer - I set NTVFS_INTERFACE_VERSION 0 till we are closer to release (because we need to solve some async problems with the module stacking) metze (This used to be commit 3ff03b5cb21bb79afdd3b1609be9635f6688a539)
2007-10-10r2561: completely redid the ntvfs module chaining code, You can now do ↵Andrew Tridgell1-5/+5
something like: ntvfs handler = nbench posix and the nbench pass-thru module will be called before the posix module. The chaining logic is now much saner, and less racy, with each level in the chain getting its own private pointer rather than relying on save/restore logic in the pass-thru module. The only pass-thru module we have at the moment is the nbench one (which records all traffic in a nbench compatibe format), but I plan on soon writing a "unixuid" pass-thru module that will implement the setegid()/setgroups()/seteuid() logic for standard posix uid handling. This separation of the posix backend from the uid handling should simplify the code, and make development easier. I also modified the nbench module so it can do multiple chaining, so if you want to you can do: ntvfs module = nbench nbench posix and it will save 2 copies of the log file in /tmp. This is really only useful for testing at the moment until we have more than one pass-thru module. (This used to be commit f84c0af35cb54c8fdc4933afefc18fa4c062aae4)
2007-10-10r2520: - finished implementing the server side of the old style search requestsAndrew Tridgell1-81/+200
(This used to be commit 4e4859c06b9de5fe60ebd17cfb09eed480b79ec1)
2007-10-10r2503: the RAW-SEARCH test now mostly passes against the posix backendAndrew Tridgell1-100/+242
(This used to be commit 9710f24b1fd103d5656c9585cdfed96449cf9f97)
2007-10-10r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 andAndrew Tridgell1-20/+90
original core level calls). The old code was completely wrong in many respects. also fixed the EA_SIZE level in the server extended the RAW-SEARCH test suite to test the new code properly (This used to be commit 71480271ad84b57fcdde264a54bb2408cf783255)