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

212 Commits

Author SHA1 Message Date
Jeremy Allison
418d5684a2 Ensure we get a real fd when opening for set file allocation.
Jeremy.
(This used to be commit 00cabb2346)
2002-03-20 00:58:23 +00:00
Jeremy Allison
b9e91d2a8e Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename
problems that people have had for a while.
Needs a make clean :-) make.
Also added JohnR's printing fix.
Jeremy.
(This used to be commit 504e5ef049)
2002-03-20 00:46:53 +00:00
Jeremy Allison
5d1db25abd Mask off the aDIR on setfileinfo.
Jeremy.
(This used to be commit d9cb1bf20a)
2002-03-05 01:43:50 +00:00
Jeremy Allison
076e879ac1 Canonicalise pathnames returned to Windows directory separators.
Found by Andrew at connectathon with some new tests
Jeremy.
(This used to be commit 4aaa4f52b8)
2002-03-04 22:56:37 +00:00
Andrew Tridgell
c75396cf49 This fixes 4 info levels in a trans2 find_first that should not be null
terminated for the filenames.

this is what caused win2k to go into a loop sending 20000 packets to set
an acl on a directory. It didn't recognise ".." with a null termination as
being ".."
(This used to be commit a75a2e9e2f)
2002-02-25 02:12:38 +00:00
Andrew Tridgell
93ea482597 this fixes the security tab on mapped drives for unicode clients.
Jeremy, this is wrong in 2.2.x
(This used to be commit 367358c738)
2002-02-21 04:26:32 +00:00
Andrew Tridgell
4ddd288f9a check for empty parameters in qpathinfo
(This used to be commit c78b16c1f8)
2002-02-05 01:31:16 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Jeremy Allison
a36c10bd1e First part of UNIX extensions (#ifdefed out) more to follow.
Jeremy.
(This used to be commit 02b18f2cca)
2002-01-10 02:41:15 +00:00
Andrew Tridgell
2838f61540 fixed long filenames on win98
the fstype must not be null terminated or win98 doesn't recognise it
(This used to be commit c8a040f2aa)
2001-12-20 06:52:45 +00:00
Jeremy Allison
a17867af97 Ensure the CAN_WRITE is checked and prevents O_CREAT and O_TRUNC from
being set. Also prevent an open on a file on a readonly share from
setting delete on close.
Jeremy.
(This used to be commit 1f3dcd99bd)
2001-11-28 05:03:37 +00:00
Jeremy Allison
d05bbf0422 Fixed delete on close bug. Added core dump code to winbindd.
Jeremy.
(This used to be commit a58d0f91f9)
2001-11-23 11:18:20 +00:00
Jeremy Allison
02eda2e251 Tidyups when I was doing the big merge...
Jeremy.
(This used to be commit 9148bb9eaa)
2001-11-17 03:19:17 +00:00
Jeremy Allison
22afba62c9 Fixed allocation bug in database prog. Some format fixes.
Jeremy.
(This used to be commit 9ff6b0c20c)
2001-11-12 01:00:54 +00:00
Jeremy Allison
461641d0de Use defined constants not integers.
Jeremy.
(This used to be commit d20949fe50)
2001-11-10 01:49:50 +00:00
Jeremy Allison
c517caf305 Only 1mb allocate slop.
Jeremy.
(This used to be commit c339a99a89)
2001-11-08 02:17:03 +00:00
Jeremy Allison
00404139e1 Merge overdue changes from 2.2. Fix <4gb write problem.
Jeremy.
(This used to be commit 36ea09d3a0)
2001-11-08 01:49:57 +00:00
Jeremy Allison
04a0293601 Added more define bits. Fixed error in vol attributes.
Jeremy.
(This used to be commit eba8204bfa)
2001-11-08 00:21:26 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220)
2001-11-05 00:02:38 +00:00
Jeremy Allison
812dcab195 Made nt acl support a local parameter for w2ksp2 profile fix.
Jeremy.
(This used to be commit ebba334c15)
2001-10-12 22:00:38 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Jeremy Allison
851e60c382 Removed unneeded set of delete on close in fsp->share_mode.
Jeremy.
(This used to be commit 7816f79075)
2001-09-05 23:34:41 +00:00
Andrew Tridgell
627b1d0a61 when you update the share mode in the db you must also update
fsp->share_mode otherwise the check to see if the fsp share mode
matches the one in the db will fail when you come to delete it,
thus leaving us with a share mode on a file that isn't even open!
(This used to be commit 2020738b88)
2001-09-05 21:13:58 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
major changes include:

- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
  these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code

We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls

but that is too much for one night
(This used to be commit 83d9896c1e)
2001-08-27 08:19:43 +00:00
Andrew Tridgell
db93134c32 fixed level2 find first for unisys clients
(This used to be commit cb8b21f71d)
2001-08-24 20:11:26 +00:00
Jeremy Allison
964bfb2193 Fix W2K profiles writing to a Samba PDC. Thanks to Microsoft for their help !
Jeremy.
(This used to be commit faae7512e0)
2001-08-23 23:37:40 +00:00
Tim Potter
4bbd1ddb27 More constant conversions.
(This used to be commit 00703d306f)
2001-08-10 05:50:47 +00:00
Jeremy Allison
c604830585 Fixed wrong placement of allocate code :-(.
Changed alignment offset to 1 to allow netmon to parse ok.
Jeremy.
(This used to be commit fd89261a2c)
2001-08-09 20:01:35 +00:00
Jeremy Allison
0c218e1abe Added fixes to return correct error codes on space allocation fail.
Jeremy.
(This used to be commit 3bf2419f4b)
2001-08-07 01:19:32 +00:00
Jeremy Allison
819a911735 Added "strict allocate" per share parameter. This causes actual on-disk allocation
to be done. Without it just does the ftruncate.
Jeremy.
(This used to be commit 0b052f103e)
2001-08-01 22:13:50 +00:00
Jeremy Allison
4b28b5a1bb Fix for potential crash bug with bad fid.
Jeremy.
(This used to be commit 82f81c830d)
2001-07-28 01:26:44 +00:00
Andrew Tridgell
1cc543ffa1 fixed some unicode and LANMAN2 bugs in trans2 find first/next
(This used to be commit d5097b2f20)
2001-07-07 21:24:00 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
17a0a89c79 Ensure we correctly round down to 2 second boundary if dos filetime
set for a share.
Jeremy.
(This used to be commit 8f57233c0f)
2001-07-04 01:01:02 +00:00
Jeremy Allison
5f633c0e5e Set support for info levels...
Jeremy.
(This used to be commit e033f75891)
2001-06-19 00:11:12 +00:00
Jeremy Allison
c0be2fc029 Best-effort so far implementation of new W2K info levels.
An-embrace-and-extending we will go...
Jeremy.
(This used to be commit 43bf9b2c7a)
2001-06-18 23:42:41 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c536)
2001-06-09 01:38:54 +00:00
Jeremy Allison
79ca1f75bb Correctly make max pathlength 255.
Jeremy.
(This used to be commit 30cffea8fa)
2001-06-08 02:49:30 +00:00
Jeremy Allison
6e7f03f9b9 This is a big, rather ugly patch. Whilst investigating the files not truncated
when copying to a full disk problem, I discovered that we were not allowing
the delete on close flag to be set properly, this led to other things, and
after investigation of the proper delete on close semantics and their relationship
to the file_share_delete flag I discovered there were some cases where we
weren't doing the deny modes properly. And this after only 5 years working
on them..... :-) :-).
So here's the latest attempt. I realised the delete on close flag needs to
be set across all smbds with a dev/ino pair open - in addition, the delete
on close flag, allow share delete and delete access requested all need to
be stored in the share mode tdb.
The "delete_on_close" entry in the fsp struct is now redundant and should
really be removed. This may also mean we can get rid of the "iterate_fsp"
calls that I didn't like adding in the first place. Whilst doing this patch,
I also discovered we needed to do the se_map_generic() call for file opens
and POSIX ACL mapping, so I added that also.
This code, although ugly, now passes the deny mode torture tests plus the
delete on close tests I added. I do need to add one more multiple connection
delete on close test to make sure I got the semantics exactly right, plus we
should also (as Andrew suggested) move to random testing here.

The good news is that NT should now correctly delete the file on disk
full error when copying to a disk :-).

Jeremy.
(This used to be commit 51987684bd)
2001-03-30 08:57:24 +00:00
Jeremy Allison
559c1692e7 Insure fix. Don't read 4 bytes from data area unless there are 4 bytes to read.
Jeremy.
(This used to be commit 3f9cf2e07b)
2001-03-28 23:20:46 +00:00
Jeremy Allison
19faeac347 Made the fixes Andrew suggested to asci string code to use srvstr_push.
Jeremy.
(This used to be commit 1391aa6a6f)
2001-03-23 18:14:22 +00:00
Jeremy Allison
a447217509 Two OS/2 printer fixes from Jim McDonough @ IBM.
First one adds a new info level into the lanman printing and an ioctl to the trans2 code.
    Andrew - this uses ASCII only. It looks ok to me but please check !
Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped.
Jeremy.
(This used to be commit da79b519e0)
2001-03-23 03:12:58 +00:00
Andrew Tridgell
096550d86c don't need to force unicode strings in flg2 anymore
(This used to be commit 899ca6e832)
2001-03-16 06:17:45 +00:00
Andrew Tridgell
977e0be9b3 finished the conversion to unicode of the last of the trans2 fns
(This used to be commit 1d145a3786)
2001-03-16 04:09:47 +00:00
Andrew Tridgell
df03c7480d converted a bunch more trans2 calls for unicode. This got quite tricky :(
(This used to be commit ddee550877)
2001-03-14 07:29:53 +00:00
Andrew Tridgell
ff0462cde8 simpler and more correct srvstr_push()
it now uses outbuf not inbuf for the unicode flag, which
allows for some server fns to be ascii and means one less
parameter in push calls
(This used to be commit a6dd666226)
2001-03-13 22:00:46 +00:00
Andrew Tridgell
f869164a16 converted findnext to unicode
(This used to be commit 84fc5a7795)
2001-03-13 01:51:44 +00:00