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

133 Commits

Author SHA1 Message Date
Andrew Tridgell
2733f5352a initialise fsp->fd to -1
(This used to be commit 5257ff5d67)
2000-04-10 13:12:04 +00:00
Andrew Tridgell
689ec46450 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
(This used to be commit d1827a3648)
2000-04-10 13:05:23 +00:00
Tim Potter
16bb009dbb Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
(This used to be commit 3aad500c0f)
2000-02-03 05:17:25 +00:00
Andrew Tridgell
b3b634ff42 use string_set() instead of string_init()
bug pointed out by Richard
(This used to be commit 070f49397f)
2000-01-16 11:18:04 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
ad000ee7dc spelling mistake.
(This used to be commit b8ac96cd9c)
1999-08-13 21:11:38 +00:00
Tim Potter
1e1a52bb5f Changed arguments to fsync() function to break dependency on
connection_struct.
(This used to be commit ee6f826ccc)
1999-04-20 03:29:05 +00:00
Tim Potter
6d5ef2e929 Use VFS operations for file I/O.
(This used to be commit cfddbdb624)
1999-04-04 06:25:13 +00:00
Jeremy Allison
bb9622bfa6 Fixed crash bug which was assuming that fd_ptr was always non-null
(which is not the case with open directories).
Jeremy.
(This used to be commit c154b1601f)
1998-11-18 19:06:51 +00:00
Jeremy Allison
9bb7ac81b6 Reasonably large change to give us *exactly* correct NT delete on close semantics.
This was trickier than it looks :-). Check out the new DELETE_ON_CLOSE
flag in the share modes and the new code that iterates through all open
files on the same device and inode in files.c and trans2.c

Also changed the code that modifies share mode entries to take
generic function pointers rather than doing a specific thing so
this sort of change should be easier in the future.

Jeremy.
(This used to be commit 5e6a7cd99d)
1998-10-23 03:34:50 +00:00
Jeremy Allison
f3793be165 Re-added code to tell the user how many open files they
have. Needed for server diagnosis purposes...
Jeremy.
(This used to be commit 04d79a9ae5)
1998-10-16 06:16:10 +00:00
Andrew Tridgell
788263ba2f - fixed a bunch of warnings and minor errors
- got smbtorture to compile
- removed %D from some of lukes code - Luke, what is %D? it ain't
  portable anyway
(This used to be commit 91597c12fb)
1998-10-08 06:21:33 +00:00
Andrew Tridgell
93bbfce02b added a function set_maxfiles() to set our file rlimit to the max
possible and return the max.
(This used to be commit 7a7b5ee168)
1998-10-05 01:57:03 +00:00
Andrew Tridgell
eb7f62f911 got rid of USE_FILES_ARRAY code (it was unused)
(This used to be commit f15ece5316)
1998-10-01 03:07:09 +00:00
Jeremy Allison
5b4d94e20f (Finally) implemented "max open files" as a global smb.conf parameter.
Sets up the files array correctly - limited by the smb.conf parameter
and by the max fd's per process as found by getrlimit().
Jeremy.
(This used to be commit eca24bd243)
1998-09-30 01:49:24 +00:00
Jeremy Allison
aab2fe0216 First cut at kernel oplocks. This should have no effect unless runnin
on a machine that supports them in autoconf.

Move various functions out of lib/util.c into smbd/process.c
and smbd/oplock.c where they belong.

Jeremy.
(This used to be commit c3c5e13f85)
1998-09-23 01:48:45 +00:00
Jeremy Allison
ede44ebdf0 smb.h: Removed fdnum from file_fd_struct. Not needed.
files.c: Removed fd bitmap - not needed. Added code to do use arrays rather
         than linked list - disabled by default but can be enabled to check
         performance.
Jeremy.
(This used to be commit 069efc0454)
1998-09-10 18:57:06 +00:00
Andrew Tridgell
f6044c87c0 some cleanups to use ZERO_STRUCT() and friends
(This used to be commit 7b154dc431)
1998-09-05 13:24:20 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).

in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.

So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Jeremy Allison
98f524bde4 Bugfix for leak in reference counted file struct.
Added "nt smb support" parameter to allow NT SMB's to be turned off.
Jeremy.
(This used to be commit 63f65f5027)
1998-09-05 03:14:40 +00:00
Jeremy Allison
83900f2b68 Modified dev_t and ino_t code to be 64 bit clean (including changes
to oplock break message passing). I think that smbd/nmbd are now
inode and offset size independent (at least for 32 bit and 64 bit
systems).

Now to expose all this new functionality to NT clients.....

Jeremy.
(This used to be commit 5910d07bbf)
1998-09-04 20:53:58 +00:00
Jeremy Allison
1855627413 More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.

Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.

Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.

Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.

Jeremy.
(This used to be commit 28aa182dbf)
1998-09-01 20:11:54 +00:00
Jeremy Allison
693480af8b configure.in, configure: include/config.h.in: Added stropts and poll.
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where
               all the other defines live (changed them from typedefs to
               defines).
Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T
in preparation for moving to size independed (ie. 64 bit clean) device
and inode access. Stat call wrapper comes next :-).

Jeremy.
(This used to be commit 3d9ec96de5)
1998-08-31 20:20:54 +00:00
Jeremy Allison
dc76502cd8 Turning on blocking locking code. NB. Blocking lock requests that are not
the head of an SMB request (ie. are part of a chain) will not be queued -
this will be fixed when we move to the new chain code. In practice, this
doesn't seem to cause much of a problem (in my admittedly limited testing)
bug a debug level zero message will be placed in the log when this
happens to help determine how real the problem is.

smbd/locking.c: New debug messages.
smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX
smbd/chgpasswd.c: Fix for master fd leak.
smbd/files.c: Tidyup comment.
smbd/nttrans.c: Added fnum to debug message.
smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking
                lock queue processing into idle loop.
smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX.
Jeremy.
(This used to be commit e1dd03ecda)
1998-08-20 19:28:37 +00:00
Jeremy Allison
b935fc0862 Fixed bug introduced by the recent changes where the chain_fnum
could be overwritten in oplock processing code.
Jeremy.
(This used to be commit 908a583b48)
1998-08-17 22:59:53 +00:00
Andrew Tridgell
72ed7049d8 added some optimisation for the case where the number of open files is
very large. files.c now promotes a files_struct to the top of the list
if it is used when it is more than 10 elements from the top.

also moved common linked list code for the 5 sets of linked lists that
I've created over the past few days into dlinklist.h (I've explained
to Chris why I didn't use the ubiqx code)
(This used to be commit 1eb9ae2996)
1998-08-17 06:47:53 +00:00
Andrew Tridgell
983dc71c98 moved connection_struct handling code into smbd/conn.c and changed it
to a linked list with bitmap format.
(This used to be commit b7aaab1b6b)
1998-08-17 06:13:32 +00:00
Andrew Tridgell
8978aae696 much cleaner chain pointer handling for both files and pipes.
the chain pointer is now stored as a static and is set whenever a
handle is created or extracted. This also makes the code less error
prone.
(This used to be commit 068a862982)
1998-08-17 03:52:05 +00:00
Andrew Tridgell
f2d538a105 some cleanups from the conversion of Pipes[] to a linked list. I also
removed most cases where a pnum is used and substituted a pipes_struct*.

in files.c I added a offset of 0x1000 to all file handles on the
wire. This makes it much less likely that bad parsing will give us the
wrong field.
(This used to be commit 8bc2627ff2)
1998-08-17 03:06:20 +00:00
Andrew Tridgell
b590b27b45 - some tidying up in files.c
- handle null fsp in DEBUG() at end of reply_ntcreate_and_X(). Jeremy,
  can you fix this properly?

- get snum right in print queue code in ipc.c (it was broken by my
  connections_struct changes).
(This used to be commit b3dd378575)
1998-08-16 06:20:18 +00:00
Andrew Tridgell
739d0b1ddc got rid of the Files[] array completely (previously I'd just made it
private to files.c)

It now is a doubly linked list with a bitmap for allocated file
numbers. Similarly for the fd_ptr code. I also changed the default
maximum number of open files to 4096. The static cost is 1 bit per
file.

It all seems to work, and it passes the "does Sue scream" test, but if
you see weird behaviour then please investigate. With the volume of
new code that has gone in there are bound to be one or two bugs
lurking.

note that you must do a "make clean" before building this as many data
structures have changed in size.
(This used to be commit 79755ce970)
1998-08-16 04:08:47 +00:00
Andrew Tridgell
6a6e8958ad changed find_free_file() to file_new().
(This used to be commit 3daee29636)
1998-08-16 02:32:55 +00:00
Andrew Tridgell
127655cc88 this checkin gets rid of the global Files[] array and makes it local
in files.c

it should now be faily easy to expand the default MAX_OPEN_FILES to
many thousands.
(This used to be commit b088c804f9)
1998-08-15 07:27:34 +00:00