summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r25167: Fix breakage from mangling rewrite. Use theJeremy Allison1-1/+2
new name if unmangling succeeded, not if it failed. Jerry - please re-test, this should fix your bug. Jeremy. (This used to be commit c215d6e84929b70e4472e19f32ec4f1db7449d90)
2007-10-10r25138: More pstring elimination. Add a TALLOC_CTX parameterJeremy Allison1-2/+2
to unix_convert(). Jeremy. (This used to be commit 39c211a702e91c34c1a5a689e1b0c4530ea8a1ac)
2007-10-10r25111: Move to talloced pathnames on most code paths.Jeremy Allison1-2/+1
There are now ony 17 pstrings left in reply.c, and these will be easy to remove (and I'll be doing that shortly). Had to fix an interesting bug in pull_ucs2_base_talloc() when a source string is not null terminated :-). Jeremy. (This used to be commit 0c9a8c4dff10974dbffd2a302ae982896122fcc0)
2007-10-10r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison1-77/+112
interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy. (This used to be commit dee8beba7a92b8a3f68bbcc59fd0a827f68c7736)
2007-10-10r24811: Simple reformatting to fit the 80 columns rule.Jeremy Allison1-63/+96
Jeremy. (This used to be commit 0cdf046dae8ba0741bb7786aa4e85c34fc35dade)
2007-10-10r24595: Fix Coverity ID 393Volker Lendecke1-2/+1
In this error case we would have used "start" not having it initialized (This used to be commit 751834fff92e85a424152c1642b238daa3060dbd)
2007-10-10r24549: Fix unix_convert to return the already converted partVolker Lendecke1-4/+10
This API will change anyway when moving away from pstrings. It took so long to fix, because that rename bug I just fixed gave make test failures that had nothing to do with this one. I have samba4 tests for both bugs, will check them in when the build farm has caught up (This used to be commit d4f442ed9b145990af4db26859663954ddd70926)
2007-10-10r24497: Revert r24485 -- this needs more thoughtVolker Lendecke1-1/+1
(This used to be commit 01f701ba1ea9859b090aaf8f4ae9722c5502316c)
2007-10-10r24485: Even in the failure case unix_convert must pass the already convertedVolker Lendecke1-1/+1
part of the string to the caller. (This used to be commit 301ae3d68bc64c9526eb7d4458584a5ebb151137)
2007-10-10r24120: add a file_id_create() hook into the VFS layerStefan Metzmacher1-1/+2
it's needed for some cluster filesystems to overload this function. metze (This used to be commit cdaa24e8047399002e4b287a31a8340a665e580f)
2007-10-10r23879: Fix two memleaks, found by the IBM checkerVolker Lendecke1-2/+4
(This used to be commit 4d1b33f51308c95293fa2494b47ba1255af8d216)
2007-10-10r23878: Fix an error return, found by the IBM checkerVolker Lendecke1-0/+1
(This used to be commit a369c67f6678bdcc0689929238bc96f45cdeeb25)
2007-10-10r23846: Belt-and-braces on the msdfs bug. Ensure ELOOP mapsJeremy Allison1-6/+15
correctly. Jeremy. (This used to be commit f2cf4b6b9d1ce561fdf9f6815564d5b4f033dd10)
2007-10-10r23844: Add patch series from Volker (after review and consultation).Jeremy Allison1-99/+207
0001-Save-a-strdup-in-stat_cache_add.patch 0002-Use-ISDOT-and-ISDOTDOT.patch 0003-Move-fname_equal-around.patch 0004-unix_convert-pstring-dirpath-char.patch 0005-Ignore-.o-files.patch 0006-Get-rid-of-pstrings-inside-unix_convert.patch 0007-revert-pstring-unix_convert.patch 0008-Make-name-an-allocated-pstring-inside-unix_convert.patch 0009-Pass-explicit-pstring-to-mangle_check_cache.patch 0010-Don-t-overwrite-orig_path-unnecessarily.patch 0011-Defer-allocating-name.patch 0012-Make-sure-dirpath-is-always-correctly-allocated.patch 0013-Remove-one-pstring-dependency-in-unix_convert.patch 0014-Remove-more-name-pstring-dependencies.patch 0015-Hide-the-nasty-API-of-mangle_check_cache-in-mangle_c.patch 0016-name-does-not-need-to-be-pstring-size-anymore.patch 0017-Make-use-of-ISDOT-and-ISDOTDOT.patch 0018-Remove-pstring-from-stat_cache_lookup.patch 0019-Add-my-copyright.patch To remove pstrings from statcache and unix_convert. Jeremy. (This used to be commit ea6ef368891af24164d2e76700c405a82b3dfc19)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23761: Rename reduce_name to check_reduced_nameVolker Lendecke1-2/+2
The function name reduce_name is misleading, making the user believe it changes an argument. (This used to be commit 68234f0bc6fb4d6d99ae94ff067db118c60804aa)
2007-10-10r23183: Check in a change made by Tridge:Volker Lendecke1-1/+1
This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
2007-10-10r20916: Add in the delete on close final fix - but only enabledJeremy Allison1-0/+6
with -DDEVELOPER. Jeremy. (This used to be commit 7f817067a70930ee3502ea3373173e0c23733253)
2007-10-10r20844: Somewhat radical change - this may break the build (I willJeremy Allison1-12/+9
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-10r20722: RAW-CHKPATH should now pass, build farm shouldJeremy Allison1-4/+13
go back to normal. Sorry about that. Jeremy. (This used to be commit d4127034fb89185fe7464d57c9f56f7914da6141)
2007-10-10r20721: Fix the search unix_convert error returns. Only openJeremy Allison1-25/+35
to go... Jeremy. (This used to be commit 89f03a8db40365f99c6755ff19a4bfbf8d1bd316)
2007-10-10r20720: Fix the chkpath problem, still looking at findfirst.Jeremy Allison1-1/+6
Jeremy. (This used to be commit c5be0082ef60cd041121a9c36f4af934cd60562d)
2007-10-10r20718: Sync up the filename path parsing changes from SAMBA_3_0_24.Jeremy Allison1-41/+119
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-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-10/+12
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r11945: Make us follow the newly documented pathname processing rules:Jeremy Allison1-0/+13
"As a special case for directories with large numbers of files, if the case options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no" then the "default case" option will be applied and will modify all filenames sent from the client when accessing this share." This is needed as fixing the case preserve rules to only apply to new filenames broke the large directory fix. Glad we caught this before release. Thanks to jht for this one. Jeremy. (This used to be commit abc21cc7322d695cf77b6fb18f4ecdb16288c19b)
2007-10-10r11861: Fix inspired by Thomas Neumann <t.neumann@iku-ag.de> to ensure thatJeremy Allison1-10/+8
default case applies only to new files and correctly examines 8.3 and long names. Jeremy. (This used to be commit ba931a015132f7e8fffa52c617cd8345a1da35d2)
2007-10-10r11346: Fix for bug found by Dina Fine. If in case sensitive mode thenJeremy Allison1-1/+10
the mangle cache is no good (3 letter extension could be wrong case - so don't demangle in this case - leave as mangled and allow the mangling of the directory entry read (which is done case insensitively) to match instead. This will lead to more false positive matches but we fail completely without it. Jeremy. (This used to be commit 238b35d2e6e21d0e07d500d446f08ec128ea7720)
2007-10-10r7893: Add in the extra parameters to opendir() to fix the large ↵Jeremy Allison1-1/+1
directory/insane app problem. Rev vfs version. Doesn't change the normal codepath. Jeremy. (This used to be commit 0f03a6bdcdbdf60da81e0aeffa84ac6e48fc6a04)
2007-10-10r7210: Fix my own mistakes up, sorry.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 53c3a954ee0e1c9dc61950f1a9d0a654de9382c6)
2007-10-10r7200: Don't use memset, use SET_STAT_INVALID (has the same effect).Jeremy Allison1-3/+3
Jeremy. (This used to be commit 0b6f87d5e14da461bd2b1c3a4e6f47a69d2cd1c4)
2007-10-10r6631: More typo's. Sorry.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 2673ccd19f194d1f7756a154afe4200e386ca1b3)
2007-10-10r6625: Remove another global variable left over from a long time ago (magic ↵Jeremy Allison1-5/+5
char). Jeremy. (This used to be commit b1bfa9cb37deb22d1d08bc60ba44d61334f6446e)
2007-10-10r5792: Added new parameter "inherit owner". If set on a share, the created ↵Jeremy Allison1-1/+1
file/directory will be owned by the same uid as the containing directory. Doing this for directories in a race-free mannor has only been tested on Linux (it depends on being able to open a directory and then do a fchown on that file descriptor). If this functionality is not available then the code silently downgrades to not changing the ownership of a new directory. This new parameter (docs to follow) finally makes it possible to create "drop boxes" on Samba, which requires all files within a directory to be commonly owned. A HOWTO on how to use this will follow. Jeremy. (This used to be commit 2e1f727184b9d025d2e3413bdd3d01d5ca803a41)
2007-10-10r5183: Ensure we correctly set the per-connection "case_sensitive" setting.Jeremy Allison1-4/+0
Rename dptrs_open to the more correct dirhandles_open. Remove old #if 1. Jeremy. (This used to be commit c43bae306a18f5716acbe8571f4f414873400cb1)
2007-10-10r5160: First cut at refactoring of directory code to handle non-wildcardJeremy Allison1-1/+1
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-10r5152: Restructure the directory handling code, stop using void * pointersJeremy Allison1-1/+1
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-10r5063: Shamelessly steal the Samba4 logic (and some code :-) for directoryJeremy Allison1-1/+3
evaluation. This stops us from reading the entire directory into memory at one go, and allows partial reads. It also keeps almost the same interface to the OpenDir/ReadDir etc. code (sorry James :-). Next I will optimise the findfirst with exact match code. This speeds up our interactive response for large directories, but not when a missing (ie. negative) findfirst is done. Jeremy (This used to be commit 0af1d2f6f24f238cb05e10d7d53dcd5b5e0f5f5d)
2007-10-10r2152: Fix for bug #1674, move the symlinks checks into reduce_name().Jeremy Allison1-17/+1
Jeremy. (This used to be commit 341771857fecf9ef72a436c42e0571d486fa0dde)
2007-10-10r2076: Removed old dir caching code - not being used now we have theJeremy Allison1-15/+3
statcache anyway. New dir caching will be done on nanosecond timestamps. Jeremy. (This used to be commit ba473a580245430009245a4c8b8dcaf9fc4b6406)
2007-10-10r1570: merging changes from 3.0.5Gerald Carter1-2/+2
(This used to be commit 430cf63b9148441bce42bfb15a8045de5da108f4)
2007-10-10r1115: Fix for #1427. Catch bad path errors at the right point. Ensure allJeremy Allison1-3/+22
our pathname parsing is consistent. Jeremy. (This used to be commit 5e8237e306f0bb0e492f10fb6487938132899384)
2007-10-10r933: When using widelinks = no, use realpath to canonicalize theJeremy Allison1-1/+1
connection path on connection create for the user. We'll be checking all symlinked paths are below this directory. Jeremy. (This used to be commit b562fe9fbca4971059b913959bbaca02af42c1a4)
2007-10-10r716: Fix for bugid #1345 (Macromedia Homesite cannot connect anymore after ↵Jeremy Allison1-0/+4
upgrade to 3.0.4). Cause was premature optimization in unix_convert(). My fault, sorry. Jeremy. (This used to be commit e5438f0a841e8ea57b515544cbf638c38405ed55)
2007-10-10r656: Make widelinks use realpath(). Tidy up cases where we need to become a ↵Jeremy Allison1-1/+1
service. Jeremy. (This used to be commit a03b6a05e02ec8415efc0e8ceade102e06f8fffe)
2007-10-10r570: Remove lots of globals to handle case issues - move themJeremy Allison1-16/+15
to connection struct entries (as they should have been from the start). Jerry, once you've cut over to 3.0.4 release branch I'll add this to 3.0 also. - Jerry cut over :-). Jeremy. (This used to be commit 578a508509d21226ad3332fc54c3ab54cd8ae452)
2004-03-05Several mb tidyups - getting ready to address the XXX_sub function.Jeremy Allison1-5/+9
Jeremy. (This used to be commit 92c3ae3458177ec7f721598311a8ad04b2db5138)
2004-03-05all_string_sub() is broken as it doesn't handle mb chars correctly (andJeremy Allison1-2/+4
so breaks when substitution '/' and '\'). It's used by unix_clean_name(), which is used by reduce_name, which is used by check_name() (phew!). Now that we know all filenames passed to check_name() are in a "good" format (no double slashes, all '\\' chars translated to '/' etc.) due to the new check_path_syntax() we can avoid calling reduce_name unless widelinks are denied. After this check-in I can fix all_string_sub() to handle mb chars correctly as it won't be in the direct path in the main path handling code. Jeremy. (This used to be commit 6080186fc4c2e7c59dd12a177539bfb77eb525cb)
2004-03-03Use a common function to parse all pathnames from the wire. This allowsJeremy Allison1-19/+8
much closer emulation of Win2k3 error return codes. Jeremy. (This used to be commit c9f31fafeda6ad79e590276f36e03ecd2e93f818)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-2/+2
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)