1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

104 Commits

Author SHA1 Message Date
Volker Lendecke
a9184f49d3 r24595: Fix Coverity ID 393
In this error case we would have used "start" not having it initialized
(This used to be commit 751834fff9)
2007-10-10 12:30:08 -05:00
Volker Lendecke
f5ab9ddd76 r24549: Fix unix_convert to return the already converted part
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 d4f442ed9b)
2007-10-10 12:29:56 -05:00
Volker Lendecke
bcc7bdcfe3 r24497: Revert r24485 -- this needs more thought
(This used to be commit 01f701ba1e)
2007-10-10 12:29:52 -05:00
Volker Lendecke
93fc3a0248 r24485: Even in the failure case unix_convert must pass the already converted
part of the string to the caller.
(This used to be commit 301ae3d68b)
2007-10-10 12:29:51 -05:00
Stefan Metzmacher
4b15f31f10 r24120: add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to
overload this function.

metze
(This used to be commit cdaa24e804)
2007-10-10 12:29:08 -05:00
Volker Lendecke
d537225c4c r23879: Fix two memleaks, found by the IBM checker
(This used to be commit 4d1b33f513)
2007-10-10 12:28:37 -05:00
Volker Lendecke
e84f8662e6 r23878: Fix an error return, found by the IBM checker
(This used to be commit a369c67f66)
2007-10-10 12:28:37 -05:00
Jeremy Allison
b114d3dc70 r23846: Belt-and-braces on the msdfs bug. Ensure ELOOP maps
correctly.
Jeremy.
(This used to be commit f2cf4b6b9d)
2007-10-10 12:28:34 -05:00
Jeremy Allison
f01698027d r23844: Add patch series from Volker (after review and consultation).
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 ea6ef36889)
2007-10-10 12:28:34 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
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 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
ead70dc92e r23761: Rename reduce_name to check_reduced_name
The function name reduce_name is misleading, making the user believe it
changes an argument.
(This used to be commit 68234f0bc6)
2007-10-10 12:23:53 -05:00
Volker Lendecke
e8156439f2 r23183: Check in a change made by Tridge:
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 9b10dbbd5d)
2007-10-10 12:22:52 -05:00
Jeremy Allison
aacd16e7c4 r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
(This used to be commit 7f817067a7)
2007-10-10 12:17:19 -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 6133a694aa)
2007-10-10 12:17:12 -05:00
Jeremy Allison
50b3dacb52 r20722: RAW-CHKPATH should now pass, build farm should
go back to normal. Sorry about that.
Jeremy.
(This used to be commit d4127034fb)
2007-10-10 12:17:06 -05:00
Jeremy Allison
dd5e9e2ae7 r20721: Fix the search unix_convert error returns. Only open
to go...
Jeremy.
(This used to be commit 89f03a8db4)
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 c5be0082ef)
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 f4474edf6a)
2007-10-10 12:17:04 -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 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
defe1f3aa8 r11945: Make us follow the newly documented pathname processing rules:
"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 abc21cc732)
2007-10-10 11:05:38 -05:00
Jeremy Allison
056f06915e r11861: Fix inspired by Thomas Neumann <t.neumann@iku-ag.de> to ensure that
default case applies only to new files and correctly examines 8.3
and long names.
Jeremy.
(This used to be commit ba931a0151)
2007-10-10 11:05:31 -05:00
Jeremy Allison
f9b7505429 r11346: Fix for bug found by Dina Fine. If in case sensitive mode then
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 238b35d2e6)
2007-10-10 11:05:13 -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 0f03a6bdcd)
2007-10-10 10:58:02 -05:00
Jeremy Allison
0deab47cc6 r7210: Fix my own mistakes up, sorry.
Jeremy.
(This used to be commit 53c3a954ee)
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 0b6f87d5e1)
2007-10-10 10:57:05 -05:00
Jeremy Allison
5622d96cd6 r6631: More typo's. Sorry.
Jeremy.
(This used to be commit 2673ccd19f)
2007-10-10 10:56:48 -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 b1bfa9cb37)
2007-10-10 10:56:47 -05:00
Jeremy Allison
cc5ba986bf r5792: Added new parameter "inherit owner". If set on a share, the created 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 2e1f727184)
2007-10-10 10:56:01 -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 c43bae306a)
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 0b04dd9d0c)
2007-10-10 10:55:30 -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 cfa8150fd9)
2007-10-10 10:55:29 -05:00
Jeremy Allison
de728fa81a r5063: Shamelessly steal the Samba4 logic (and some code :-) for directory
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 0af1d2f6f2)
2007-10-10 10:55:13 -05:00
Jeremy Allison
3f9bc7fe07 r2152: Fix for bug #1674, move the symlinks checks into reduce_name().
Jeremy.
(This used to be commit 341771857f)
2007-10-10 10:52:33 -05:00
Jeremy Allison
db2ffe10f9 r2076: Removed old dir caching code - not being used now we have the
statcache anyway. New dir caching will be done on nanosecond
timestamps.
Jeremy.
(This used to be commit ba473a5802)
2007-10-10 10:52:30 -05:00
Gerald Carter
0c6d7f28d6 r1570: merging changes from 3.0.5
(This used to be commit 430cf63b91)
2007-10-10 10:52:15 -05:00
Jeremy Allison
fddef6fc20 r1115: Fix for #1427. Catch bad path errors at the right point. Ensure all
our pathname parsing is consistent.
Jeremy.
(This used to be commit 5e8237e306)
2007-10-10 10:51:56 -05:00
Jeremy Allison
cb03592c06 r933: When using widelinks = no, use realpath to canonicalize the
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 b562fe9fbc)
2007-10-10 10:51:50 -05:00
Jeremy Allison
400bed7a68 r716: Fix for bugid #1345 (Macromedia Homesite cannot connect anymore after upgrade to 3.0.4).
Cause was premature optimization in unix_convert(). My fault, sorry.
Jeremy.
(This used to be commit e5438f0a84)
2007-10-10 10:51:35 -05:00
Jeremy Allison
89db7e1001 r656: Make widelinks use realpath(). Tidy up cases where we need to become a service.
Jeremy.
(This used to be commit a03b6a05e0)
2007-10-10 10:51:33 -05:00
Jeremy Allison
e0da56a848 r570: Remove lots of globals to handle case issues - move them
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 578a508509)
2007-10-10 10:51:30 -05:00
Jeremy Allison
48eb635f31 Several mb tidyups - getting ready to address the XXX_sub function.
Jeremy.
(This used to be commit 92c3ae3458)
2004-03-05 22:32:45 +00:00
Jeremy Allison
893d5eba5d all_string_sub() is broken as it doesn't handle mb chars correctly (and
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 6080186fc4)
2004-03-05 01:37:12 +00:00
Jeremy Allison
fba5a72249 Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit c9f31fafed)
2004-03-03 20:55:59 +00:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Alexander Bokovoy
bc2a3748e9 Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
(This used to be commit c2689ed118)
2003-05-14 10:59:01 +00:00
Alexander Bokovoy
e7c8c15888 Fix VFS layer:
1. Finally work with cascaded modules with private data storage per module
2. Convert VFS API to macro calls to simplify cascading
3. Add quota support to VFS layer (prepare to NT quota support)

Patch by Stefan (metze) Metzemacher, with review of Jelmer and me
Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
(This used to be commit 91984ef5ca)
2003-05-11 23:34:18 +00:00
Jeremy Allison
2d7a8480cf Optimisation. We don't need to do 2 strlen's when we're setting the stat
struct in the correct place.
Jeremy.
(This used to be commit 4cd8b27671)
2003-05-10 00:35:38 +00:00
Jeremy Allison
f359b4bdf6 Fix nasty bug pointed out by samba-technical poster. If name is mangled
then we weren't always correctly detecting that it had a valid stat struct
and so might now return a 'file existed'. Finally realized this when installing
the W2K resource kit as a test case.
Jeremy.
(This used to be commit d48069ccd8)
2003-05-09 01:06:27 +00:00
Andrew Bartlett
ad0d6509a7 Merge from HEAD:
- Make ReadDirName return a const char*.

 - Consequential changes from that

 - mark our fstring/pstring assumptions in function prototypes

Andrew Bartlett
(This used to be commit 10b53d7c6f)
2003-03-17 22:56:13 +00:00