1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-25 00:59:11 +03:00
Commit Graph

59 Commits

Author SHA1 Message Date
a27c351e6b r5731: Get delayed write semantics closer to W2K3. We need to store 2 times.
This may fix bug #2382.
Jeremy.
2007-10-10 10:55:58 -05:00
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
fbbdb72cf1 r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,
not an existing one.
Jeremy.
2007-10-10 10:53:27 -05:00
47bab92c0b r3895: Fix for bug #2045. May also fix other timestamp bugs with Excel
(Volker please test). Setting a last write timestamp from Windows
overrides any subsequent write timestamp changes and must be immediately
seen by and findfirst/findnexts. This is a racy solution, but should
work most of the time. This may also fix #1061, not sure.
Jeremy.
2007-10-10 10:53:24 -05:00
de7af09e72 r3067: patch based on volker's initial work in trunk that fixes the queu update problem when using the background daemon 2007-10-10 10:53:00 -05:00
ed653cd468 Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but
modified somewhat to cover all cases.
Jeremy.
-
fac5e05ca1 remove unused seek_file(); don't hardcode '\' when printing the auth-user -
019aaaf0df Patch based on work from James Peach <jpeach@sgi.com> to convert over to
using pread/pwrite. Modified a little to ensure fsp->pos is correct.
Fix for #889.
Jeremy.
-
8e2c543ebf Printf fixes for 64-bit size_t. -
10d90171ed Fix SMBseek and get/set position information SMBs. Works against
Samba4 tester. You will need a make clean; make all after this !
Jeremy.
-
c2689ed118 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 -
91984ef5ca 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
-
6c23d2030a The element in fsp->print_job should be a RAP jobid, not a uint32 RPC
jobid. This was causing Win9x client "set name" calls to fail.
Still need one cleanup fix to finish.
Jeremy.
-
379e719e98 Fix for 64 bit issues with oplocks and allocation size.
Jeremy.
-
743f2b8025 removed the following parameters
* postscript
  * printer driver
  * printer driver location
  * printer driver file

also removed the get_a_printer_driver_9x_compatible() function
-
31c0dd7e21 Added ASCII art to make this clearer.
Jeremy.
-
d40a14dbb0 Write cache bugfix from Rasmus Borup Hansen, system adm. Email: rbh@math.ku.dk
Jeremy.
-
42615b945e Sync 3.0 branch with head -
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
504e5ef049 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.
-
ebef2e7bc8 Fix lseek-on-pipe problem in VFS (where it belongs IMHO).
Jeremy.
-
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
443d2530a7 Ensure fsp->size is correct so readraw's return correct data.
Jeremy.
-
40060fe345 Found and fixed the logic bug in write cache code. Amazingly helpful
work from Juergen.Hasch@de.bosch.com in tracking this down.
Jermy.
-
7c5c035e41 Ensure identical between 2.2.3 and 3.0 - no need for difference here..
Jeremy.
-
71d647b6c0 Fix file size calculations for write cache code.
Jeremy.
-
ccda82b457 Attempt to fix bugs in write cache code (yes I know it's going away :-).
Jeremy.
-
97dca242a9 #ifdefed DMF fix so not compiled by default. We need to look at this...
Jeremy.
-
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
a95943fde0 move to SAFE_FREE() -
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
213cd0b519 Ok - fixed a bug in our levelII oplock code. We need to break a level II on
a byte range lock (write lock only, but Win2k breaks on read lock also so I
do the same) - if you think about why, this is obvious. Also fixed our client
code to do level II oplocks, if requested, and fixed the code where we would
assume the client wanted level II if it advertised itself as being level II
capable - it may not want that.
Jeremy.
-
dfe77c7046 Herb's warning fixes. Also the POSIX locking fix.
We now use our own vfs layer to do get/set acl calls (hurrah!).
Jeremy.
-
b07611f815 Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
-
7914e9351a Herb's fixes for profiling & compiler warnings.
Jeremy.
-
1ebe54666b Memleak fix for cache code.
Jeremy.
-
85738b7ee1 vfs write data fix. Fix for name matching in addtosmbpass
Jeremy.
-
92109d7b3c more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
-
f9a52cadbf Fix for misunderstanding of fsync added when vfs layer
was done. Samba was doing fsync's (bleagh).
Jeremy.
-
b899943658 Fix for read_file() returning -1.
Jeremy.
-
148628b616 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
-
ab0ecc39d6 This is a *big* checkin that may break some things, but implements the
new open mechanism Andrew & I discussed.

config.sub:
configure: Included the QNX patch.

include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).

Note that we will also need locking calls in the vfs (to be added).

lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
                          Also fix for sidsize DOS bug.

locking/locking.c: Check value of ret before using it for memdup.

printing/printing.c: Convert print_fsp_open to return an allocated fsp.

rpc_server/srv_lsa.c: Fix for NT domain logons.

I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.

smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.

smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
               open_file_stat to return an fsp from the call.

smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
             open_file_stat to return an fsp from the call.

In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.

The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.

This code will need extensive testing but seems to initially work.

Jeremy.
-
d870542c28 the changes to the main smb code
------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.
-
d1827a3648 the bulk of the changes to get rid of fd_ptr and move print open
handling to printing/printing.c

most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd

the changes in open.c are quite dramatic. Most of it is removing all
the functions that handled the fd multiplexing
-
6c442d68af Change to vfs API. POSIX states fsync should return an int, not a void.
Jeremy.
-
3aad500c0f Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
-
e48c2d9937 converted all our existing shared memory code to use a tdb database
instead of either sysv or mmap shared memory or lock files.

this means we can now completely remove
	locking_shm.c
	locking_slow.c
	shmem.c
	shmem_sysv.c
and lots of other things also got simpler

locking.c got a bit larger, but is much better compartmentalised now
-
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch -
ee6f826ccc Changed arguments to fsync() function to break dependency on
connection_struct.
-
7ced7fd395 Use VFS operations for file I/O.
Modified args to read_predict to pass in fsp.

Renamed sync_file() function to sys_sync_file().
-