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

707 Commits

Author SHA1 Message Date
Jeremy Allison
dd185c7aa8 r12956: Fix for bug #3035 from SATOH Fumiyasu <fumiyas@miraclelinux.com>
On a Windows share, a file with read-only dosmode can be opened with
DELETE_ACCESS. But on a Samba share (delete readonly = no), it
fails with NT_STATUS_CANNOT_DELETE error.

This semantic causes a problem that a user can not
rename a file with read-only dosmode on a Samba share
from a Windows command prompt (i.e. cmd.exe, but can rename
from Windows Explorer).

Jeremy.
2007-10-10 11:06:09 -05:00
Jeremy Allison
2187502732 r12491: End profile fixes from SATOH Fumiyasu <fumiya@samba.gr.jp>.
Jeremy.
2007-10-10 11:05:58 -05:00
Jeremy Allison
855f5f8c32 r12234: Reduce the race condition for renames by holding the lock
longer. Instigated by complaints on the fix for #3303 from
SATOH Fumiyasu <fumiyas@miraclelinux.com>.
Jeremy.
2007-10-10 11:05:50 -05:00
Jeremy Allison
932e337db8 r12213: Final fix for #3303 - send rename messages to smbd's
that have open file handles to allow them to correctly
implement delete on close. There is a further correctness
fix I'm intending to add to this to cope with different share
paths, but not right now...
Jeremy.
2007-10-10 11:05:49 -05:00
Jeremy Allison
22e3300911 r12194: Ensure that when we set a connection path we've canonicalized
the name (must be abolute - start with /, must not end in /,
must have ./ and ../ removed). Of course for realpath resolved
paths this won't be the case but for others we need this name
to be canonicalized. This name is going into the sharemode db
for #3303 so needs to be in a normalized format.
Jeremy.
2007-10-10 11:05:48 -05:00
Jeremy Allison
414303bc02 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.
2007-10-10 11:05:19 -05:00
Jeremy Allison
cab76c3c33 r11451: Fix -O1 "might be using uninitialized" errors.
Jeremy.
2007-10-10 11:05:16 -05:00
Jeremy Allison
f22822790c r11448: Move decl before code.
Jeremy.
2007-10-10 11:05:16 -05:00
Jeremy Allison
7edb26e765 r11428: Fix bug #3192 by actually hooking up the dfree caching
function. Oops.
Jeremy.
2007-10-10 11:05:15 -05:00
Jeremy Allison
4cd8e2a96b 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.
2007-10-10 11:05:15 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Jeremy Allison
62ba345425 r10750: Ensure we match W2K3 in forcing DOS errors in a couple of cases.
Jeremy.
2007-10-10 11:04:53 -05:00
Jeremy Allison
0e8cf8eef5 r10749: Remove one more Samba4 smbtorture RAW-OPEN difference from W2K3.
Jeremy.
2007-10-10 11:04:51 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
fc311adc79 r10551: We need to check if the source path is a parent directory of the destination
(ie. a rename of /foo/bar/baz -> /foo/bar/baz/bibble/bobble. If so we must
refuse the rename with a sharing violation. Under UNIX the above call can
*succeed* if /foo/bar/baz is a symlink to another area in the share. We
probably need to check that the client is a Windows one before disallowing
this as a UNIX client (one with UNIX extensions) can know the source is a
symlink and make this decision intelligently. Found by an excellent bug
report from <AndyLiebman@aol.com>.
Jeremy.
2007-10-10 11:03:42 -05:00
Jeremy Allison
9014b0ddcb r10136: Fix for bug #3060 from Leo Weppelman <leo@wau.mis.ah.nl>.
Ensure SMBcreate truncates the file if it exists.
Jeremy.
2007-10-10 11:03:33 -05:00
James Peach
cc680bbe22 r9985: Move the all the strict sync logic into file_sync(). 2007-10-10 11:03:30 -05:00
Jeremy Allison
6415657942 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.
2007-10-10 11:00:13 -05:00
Jeremy Allison
7ff7211b80 r8556: Fix bug #2878 - Norton commander not running on OS/2 client - we were
not correctly returning the requested open mode. Thanks to alex@infobit.ru
for reporting this.
Jeremy.
2007-10-10 11:00:09 -05:00
Jeremy Allison
3070ec288c r8457: Fix from Marcel Müller <mueller@maazl.de> to ensure
we correctly set the return packet size to include
the pad bytes in reply_readbmpx().
Jeremy.
2007-10-10 11:00:05 -05:00
Jeremy Allison
81e7a4a2cf r8290: Fix for bug in SMBwriteBraw where we incorrectly
returned the number of bytes written. Patch from
Marcel Müller <mueller@maazl.de>.
Jeremy.
2007-10-10 10:58:19 -05:00
Jeremy Allison
c7fe18761e 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.
2007-10-10 10:58:18 -05:00
Jeremy Allison
1de27da470 r7963: Add aio support to 3.0.
Jeremy.
2007-10-10 10:58:05 -05:00
Jeremy Allison
0f03a6bdcd 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.
2007-10-10 10:58:02 -05:00
Jeremy Allison
e9b8d23d61 r7842: With the patch I sent Steve yesterday this gives us complete POSIX pathnames.
ie. files containing : and \ can be accessed from Linux.
Jeremy.
2007-10-10 10:57:59 -05:00
Gerald Carter
46cd95c9b4 r7620: when adding a new printer driver, we should copy the files
(not move) to the W32X86/{2,3}/ directory.  Printmig.exe
copies the driver files for all drivers to print$/W32X86
and the calls AddPrinterDriver() for each driver.  If we
move the file, then adding a driver which shares a file with
a previous driver will fail.

I can now restore drivers in bulk to a Samba 3 server.
2007-10-10 10:57:17 -05:00
Jeremy Allison
65d1365700 r7618: Typo...
Jeremy.
2007-10-10 10:57:17 -05:00
Jeremy Allison
f397cc08b5 r7617: Fix for bug #2801 - delete veto files was broken with the new
large directory code.
Jeremy.
2007-10-10 10:57:16 -05:00
Jeremy Allison
e9604e65f4 r7447: Sync up a little between HEAD and 3.0 in preparation for moving
the AIO code across.
Jeremy.
2007-10-10 10:57:09 -05:00
Jeremy Allison
0ca2423c70 r6977: Fix bug #2735 (not mangling control characters) plus
ensure we don't create files with control characters
either.
Jeremy.
2007-10-10 10:56:59 -05:00
Jeremy Allison
3b2cd19fcb r6673: Fix the write cache based on some VERY good detective work
from Ingo Kilian <ikilian@web.de>.
You must do a make clean after updating this.
Jeremy.
2007-10-10 10:56:50 -05:00
Jeremy Allison
381da9b55d r6633: Added "check_path_syntax_posix()" in preparation for handling
POSIX pathnames. Not yet used.
Jeremy.
2007-10-10 10:56:48 -05:00
Jeremy Allison
8693df2551 r6629: Fix stupid typo. Thanks Gunther.
Jeremy.
2007-10-10 10:56:48 -05:00
Jeremy Allison
b1bfa9cb37 r6625: Remove another global variable left over from a long time ago (magic char).
Jeremy.
2007-10-10 10:56:47 -05:00
Herb Lewis
58e307664e r6502: add LOCKING debug class - pull PRINTINGDB class definition from trunk
so our numbers don't get out of sync
2007-10-10 10:56:43 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Jeremy Allison
da5a8b539d r6203: Fix attribute return on creating a directory with nttrans_create.
Fix strange allocation semantics of openX.
Jeremy.
2007-10-10 10:56:28 -05:00
Jeremy Allison
0c7de7615b r6174: Fixup T2 open call - we were returning 2 bytes short.
Jeremy.
2007-10-10 10:56:27 -05:00
Jeremy Allison
d3379fe61b r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global nastyness.
Jeremy.
2007-10-10 10:56:27 -05:00
Jeremy Allison
fb05ac4c03 r6160: Ensure allocation size is correctly returned for OpenX. Only set allocation
on create/truncate for nttrans.
Jeremy.
2007-10-10 10:56:26 -05:00
Jeremy Allison
8c64cd368f r6106: Fix bug #2551. It turns out that the incoming flags2 flag FLAGS2_LONG_PATH_COMPONENTS
determines if a reply is uppercased on a SMBsearch request, not the protocol level.
This could clear up quite a few hacks going forward I think.
Jeremy.
2007-10-10 10:56:22 -05:00
Jeremy Allison
56cc756b9d r6063: Fix for bug #2533 - ensure SMBsearch unsets UNICODE flags2 bit as this SMB is
DOS codepage only.
Jeremy.
2007-10-10 10:56:20 -05:00
Jeremy Allison
e831cef618 r6053: Fixup dfs path with the new wildcard parser code split out.
Jeremy.
2007-10-10 10:56:19 -05:00
Jeremy Allison
f8b67159fc r6048: Split out the check_path_syntax into a findfirst/next/wildcard version.
The semantics are different with wildcards.
Jeremy.
2007-10-10 10:56:18 -05:00
Jeremy Allison
b5d31b2caf r5822: Actually return an error message if disk_free fails ! Pointed out by Ying Li <ying.li2@hp.com>.
Jeremy.
2007-10-10 10:56:03 -05:00
Jeremy Allison
0b0b8686f3 r5812: We missed some RESOLVE_DFSPATH calls on pathnames for older calls.
Jeremy.
2007-10-10 10:56:03 -05:00
Jeremy Allison
2e1f727184 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.
2007-10-10 10:56:01 -05:00
Jeremy Allison
4f3b12ac73 r5720: Attempt to fix bug #2382 (Excel shared workbook stops working). Also
incorporates part of the fix created by ke_miyata@itg.hitachi.co.jp
for bug #2045 (MS-Office behavior of timestamp).
Jeremy.
2007-10-10 10:55:57 -05:00
Jeremy Allison
4348ca4854 r5637: Actually test and fix the crash bugs (sorry:-).
Jeremy.
2007-10-10 10:55:52 -05:00
Jeremy Allison
faecf639ef r5524: Don't do share mode checks on can_delete if open, the rest of the open
code will do this correctly. More for bug #2201.
Jeremy.
2007-10-10 10:55:44 -05:00