Jeremy Allison [Thu, 4 May 2000 00:29:50 +0000 (00:29 +0000)]
Fix for debug statement crash.
Jeremy.
(This used to be commit
57bf92d90147b207664152d44ce4bfb5235dc7d8)
Herb Lewis [Wed, 3 May 2000 22:29:54 +0000 (22:29 +0000)]
unicode code pages are detected as compiler intermediate file so set to
nostrip
(This used to be commit
5e7bc9c3e705cfaa12bd0071a873c79e2097a5a0)
Jeremy Allison [Wed, 3 May 2000 20:33:25 +0000 (20:33 +0000)]
Fix based on Elrond's code to reduce the store size on removing dead records.
Jeremy.
(This used to be commit
09e92a61a966d09f543ba541ddb3240cc4718579)
Jeremy Allison [Wed, 3 May 2000 19:37:47 +0000 (19:37 +0000)]
Fixed the bug locktest.c found, it was an off-by-one error in the non-overlap
case.
Jeremy.
(This used to be commit
65150c408a5254215de89c8c774c33c4d011c2c0)
Jeremy Allison [Wed, 3 May 2000 18:57:21 +0000 (18:57 +0000)]
Fixed silly bug where I wasn't checking for matching fd's in closing a file.
This caused smbd crashes on SIGKILL.
Jeremy.
(This used to be commit
d4dcefd12d14df112f083c312acbea0196bc5c23)
Jeremy Allison [Wed, 3 May 2000 17:50:42 +0000 (17:50 +0000)]
Added range info to the panic message to track down the bug with
locktest.
Jeremy.
(This used to be commit
91f038356b7efa04cf4bfa5e6afd8b144b6b4ad5)
Andrew Tridgell [Wed, 3 May 2000 14:49:15 +0000 (14:49 +0000)]
improved the lock test program
(This used to be commit
a0a3931c6e5824121bf4a8d075ef24b9b70e8aa1)
Andrew Tridgell [Wed, 3 May 2000 14:29:05 +0000 (14:29 +0000)]
- clear dead locks at startup
- fixed a bug which caused lock records to not decrease in size
(This used to be commit
51624a3a2f5a4ac55b4f26f572a2fc399f9c808e)
Andrew Tridgell [Wed, 3 May 2000 13:54:28 +0000 (13:54 +0000)]
added a nasty lock testing program
it opens 2 connections to each of 2 servers, and opens 2 fnums on the
same file on each connection (a total of 8 file descriptors)
then it does random lock/unlock/reopen requests in a 100 byte range on
the file and compares the results from the 2 servers.
strangely enough, NT fails this test against itself right now - I'm
still trying to figure that out.
(This used to be commit
2f14d7c9bca5e170b8d2c169801cb200021fd467)
Jeremy Allison [Wed, 3 May 2000 02:27:41 +0000 (02:27 +0000)]
Fix for stacking locks in brlock and POSIX. Windows only allows a read lock
to overlay a write lock on the same fnum. When overlaying read locks onto
a write lock, the number of locks is counted, and the first unlock removes
the write lock and downgrades this to a read lock. Do the same when mapping
to POSIX.
Jeremy.
(This used to be commit
74d42644e6e52808037975e909aa56c850838b76)
Jeremy Allison [Wed, 3 May 2000 02:24:56 +0000 (02:24 +0000)]
Added read overlay write lock on same fnum test to locktest2.
Added locktest5 for locking stacks.
Jeremy.
(This used to be commit
65399ae1f058886b8779a01fb35fe3080cc3c145)
Jeremy Allison [Wed, 3 May 2000 02:24:01 +0000 (02:24 +0000)]
Insure uninitialized memory read fixes.
Jeremy.
(This used to be commit
577ddbfbec857dec3ade811f735ec6b183566435)
Herb Lewis [Wed, 3 May 2000 01:07:33 +0000 (01:07 +0000)]
merge 2.0 changes
(This used to be commit
7b3afe300b1ef54f7daa0f2dce6fd8c256e04b37)
Jeremy Allison [Tue, 2 May 2000 23:56:24 +0000 (23:56 +0000)]
Fixed wild pointer diff found by insure.
Jeremy.
(This used to be commit
158d9cada8c12725981d495faf8ed9f5d4306e23)
Jeremy Allison [Tue, 2 May 2000 21:07:25 +0000 (21:07 +0000)]
Implemented the last (I hope:-) part of the locking puzzle, the reference
counting when Windows downgrades a write lock to a read lock, then reference
counts the unlocks to match the locks.
With this code the POSIX unlock isn't done until the final Windows unlock.
Jeremy.
(This used to be commit
6eb4fb6eef367f68169d6ec1c816226b1ad9f110)
Andrew Tridgell [Tue, 2 May 2000 15:31:55 +0000 (15:31 +0000)]
added support for deleting printers into the spoolss system
(This used to be commit
e72a5718537b84409fc20ff21951b1d1ab24d97f)
Andrew Tridgell [Tue, 2 May 2000 13:55:42 +0000 (13:55 +0000)]
split the username in the vuser structure into a separate
userdom_struct. As the name implies this also contains a domain
(unused at the moment).
This will be important shortly, as operation in appliance mode needs
the domain to be always carried with the username.
(This used to be commit
ee8546342d5be90e730372b985710d764564b124)
Andrew Tridgell [Tue, 2 May 2000 07:50:33 +0000 (07:50 +0000)]
and yet another memory leak - this one in the client
(This used to be commit
a85ae6e0ae39530a96e8b86ab868cfd7ea5bc967)
Andrew Tridgell [Tue, 2 May 2000 07:10:54 +0000 (07:10 +0000)]
fixed a memory leak (calling hash_table_init twice)
(This used to be commit
610fcef4d33db2b62e6298bdb68546a2411d03b1)
Andrew Tridgell [Tue, 2 May 2000 07:10:26 +0000 (07:10 +0000)]
fixed a memory leak
(This used to be commit
d4743ec0be419565c805fbc5ba2680c6ad5fe36d)
Jeremy Allison [Tue, 2 May 2000 03:20:47 +0000 (03:20 +0000)]
Moved uglyness needed in fcntl locking (64->32 bit mapping, NFS
errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c
is now very small and clean.
Added (*lock) op to vfs layer.
Jeremy.
(This used to be commit
46092ee1410faa4e3c143d80a960a8adaa19d7fc)
Jeremy Allison [Tue, 2 May 2000 02:23:41 +0000 (02:23 +0000)]
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.
(This used to be commit
148628b616b5c29ba6340d65fc3ddbcabba6e67a)
Jeremy Allison [Mon, 1 May 2000 19:43:50 +0000 (19:43 +0000)]
locking/posix.c: Fixed double-free nasty crash bug found by insure.
utils/make_smbcodepage.c:
utils/make_unicodemap.c: Insure 'make install' fixes.
Jeremy.
(This used to be commit
3b25f7368be3877e9ad27498bc9451ec88d4b07f)
Andrew Tridgell [Mon, 1 May 2000 05:42:39 +0000 (05:42 +0000)]
handle tabs in printcap files
this is needed for lprng
(This used to be commit
c40e0a5d3bfa11cb3699bdba1ded91515cabaf5d)
Andrew Tridgell [Mon, 1 May 2000 05:42:09 +0000 (05:42 +0000)]
allow a DEFAULT_PRINTING to be specified in CFLAGS
(This used to be commit
80ebb0ad5499745f988921eceb4584b43ef9aaf1)
Andrew Tridgell [Mon, 1 May 2000 00:48:41 +0000 (00:48 +0000)]
Andrew Tridgell [Mon, 1 May 2000 00:41:47 +0000 (00:41 +0000)]
added TDB_INTERNAL, TDB_NOLOCK and TDB_NOMMAP flags.
TDB_INTERNAL replaces the old method of passing a null filename
(This used to be commit
8ec815920d46f205b9f3fff82397c731753c3a10)
Andrew Tridgell [Sun, 30 Apr 2000 15:13:15 +0000 (15:13 +0000)]
- added some error checking
- removed the VTP hook in smbd
(This used to be commit
09355fcd50e6c9c0c81e5f70ab9b7ff88aa897bf)
Andrew Tridgell [Sun, 30 Apr 2000 14:59:00 +0000 (14:59 +0000)]
fixed dptr_wcard handling (need to use strdup)
(This used to be commit
0bab0300748a22b4b861fa443be2014bcd7b348c)
Andrew Tridgell [Sun, 30 Apr 2000 14:58:13 +0000 (14:58 +0000)]
fixed parsing of broken NT short name
(This used to be commit
9e4b3529455840f11940136dd55c641d89b46961)
Andrew Tridgell [Sun, 30 Apr 2000 14:37:57 +0000 (14:37 +0000)]
handle the special rule of *.* for old style listings when old_list is
true
(This used to be commit
cdf4c4c812086d6e7cdc0436f5e31c420dcfb3e5)
Andrew Tridgell [Sun, 30 Apr 2000 14:34:31 +0000 (14:34 +0000)]
removed more cruft from our old wildcard matching code
(This used to be commit
4a15924ffe36ed37ec193a0ef5a0487238edc311)
Andrew Tridgell [Sun, 30 Apr 2000 14:30:47 +0000 (14:30 +0000)]
go back to ascii in SMB_FIND_FILE_BOTH_DIRECTORY_INFO
NT gives out unicode, but NT clients can't handle a unicode response!
(This used to be commit
85d634974f4f8841bf68cd2b22d134fbc010b568)
Andrew Tridgell [Sun, 30 Apr 2000 14:29:45 +0000 (14:29 +0000)]
fixed our smbsearch code. We now store the mask with the dptr, this
turns out to be essential for a correct implementation (there ins't
enough room to store all possible masks in the status return
structure!)
(This used to be commit
38f5e133670ada6e5799a16cf1a0e2e3ee1d9afd)
Andrew Tridgell [Sun, 30 Apr 2000 14:27:39 +0000 (14:27 +0000)]
fix handing of ascii_to_unistr
(This used to be commit
385b1844b60beeb9db5f412a452816444e25cb83)
Andrew Tridgell [Sun, 30 Apr 2000 14:26:59 +0000 (14:26 +0000)]
- get the findclose code right
- handle broken NT response to trans2 findfirst
(This used to be commit
64f91a7a98fe9aaf176e665677e751e4e03d4c3d)
Andrew Tridgell [Sun, 30 Apr 2000 12:34:26 +0000 (12:34 +0000)]
added cli_list_old() to allow for old style directory listing from
masktest
(This used to be commit
8a5c8cfa0ede1d119bf9013e321a497beefd4dda)
Andrew Tridgell [Sun, 30 Apr 2000 11:25:09 +0000 (11:25 +0000)]
Andrew Tridgell [Sun, 30 Apr 2000 11:15:27 +0000 (11:15 +0000)]
we don't need fnmatch.c any more
(This used to be commit
e23f43e7d3d2a068f527baa63a31f7fe4e60e79d)
Andrew Tridgell [Sun, 30 Apr 2000 11:11:19 +0000 (11:11 +0000)]
changed masktest to test the internal algorithm against one server,
rather than 2 servers
(This used to be commit
0e63b4b36334aeb6de6691436b82e1d9784b1541)
Andrew Tridgell [Sun, 30 Apr 2000 11:04:28 +0000 (11:04 +0000)]
- removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.
- moved the stat cache code into statcache.c
- fixed the uint16 alignment requirements of ascii_to_unistr() and
unistr_to_ascii()
- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
unicode always (at least thats what NT4 does)
- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
crash as much
(This used to be commit
03e9cea004bbba72161a5323cf3b4556c94aed8e)
Andrew Tridgell [Sun, 30 Apr 2000 04:45:16 +0000 (04:45 +0000)]
YIPEE!!!!!
We finally have a perfect emulation of Microsoft wildcard
matching. The routine ms_fnmatch() does wildcard matching with all MS
wildcards (including the unicode wildcards), and masktest against a
NT4 workstation with hundreds of thousands of random exmaples has not
found a single error.
amazingly it is only about 60 lines of code, but it has taken us years
to get it right. I didn't sleep much last night :)
(This used to be commit
cc9e007cdfdd300189f89e2a55e4234e47fa842d)
Andrew Tridgell [Sat, 29 Apr 2000 04:05:38 +0000 (04:05 +0000)]
put tdb utility functions in a separate file
(This used to be commit
77009422a075300e5c07a3e75806a7dac47e2113)
Jeremy Allison [Sat, 29 Apr 2000 01:09:31 +0000 (01:09 +0000)]
Removed tdb locking calls (picky Andrew...:-)
(This used to be commit
6bded3b74e974b97d54acf9289f4cf812e2b1af7)
Jeremy Allison [Fri, 28 Apr 2000 21:09:26 +0000 (21:09 +0000)]
Moved deletion of vfs handle into smbd/conn.c as it was being done too
soon in smbd/service.c (file operations were being done after the
handle was closed).
It looks cleaner in smbd/conn.c as it is part of the closing of a conn
struct anyway.
Jeremy.
(This used to be commit
858eb53dc510d1b27c4f91045fa932a3ef546754)
Jeremy Allison [Fri, 28 Apr 2000 20:54:23 +0000 (20:54 +0000)]
Ok - this is the *third* implementation of this (third time's the charm :-).
This implementation keeps all POSIX lock records in a separate in memory
tdb database only known about in locking/posix.c. In addition, the pending
close fd's are also held in a tdb which has an array of fd's indexed by
device and inode.
The walk-split code uglyness has been moved to posix.c from brlock.c,
which is the only place that needs to know about it, and the extra
functions hacked into brlock to expose internal state have been removed.
This implementation passes smbtorture locktest4, the only thing I need
to check now for completeness is what to do about lock upgrade/downgrades
which Win32 allows under some *very* strange circumstances.
Jeremy.
(This used to be commit
3f655de1c764b9ee1472a111621d4317f19f624d)
Jeremy Allison [Fri, 28 Apr 2000 19:38:38 +0000 (19:38 +0000)]
Split off of POSIX locking into separate unit as Andrew requested.
Done so I don't lose my edits... :-).
Jeremy.
(This used to be commit
31a57be658f3fa3569a552e9c5d30174f5a51649)
Shirish Kalele [Fri, 28 Apr 2000 18:36:47 +0000 (18:36 +0000)]
Added info level 1005 to netsharegetinfo (is the share a DFS root)
Added dfs_server announcement in set_default_server_announce_type()
(This used to be commit
99d07e13520b04d99999938d259d56fa65c8a8ea)
Jeremy Allison [Fri, 28 Apr 2000 02:06:19 +0000 (02:06 +0000)]
Added tdb_get/set_int_byblob, which takes a size_t len and then implemented
the tdb_get/set_int string functions in terms of them. Will be useful in storing
POSIX pending close records (which are ints but indexed by dev/inode pairs).
Jeremy.
(This used to be commit
d69e4c6a48746459f973144393529b1f40680d2f)
Jeremy Allison [Fri, 28 Apr 2000 01:08:32 +0000 (01:08 +0000)]
Forgot to close when "posix locking" is set to False.
Jeremy.
(This used to be commit
b812f09ba8ef074c9ff0747ea03a1e33f1ebbe71)
Jeremy Allison [Fri, 28 Apr 2000 01:01:07 +0000 (01:01 +0000)]
Added optimization where we are single opener (don't free POSIX locks).
Jeremy.
(This used to be commit
a2deb91128d59ad04f4ec858ffe4e30f2afb0edd)
Jeremy Allison [Fri, 28 Apr 2000 00:39:23 +0000 (00:39 +0000)]
Made changes suggested by Andrew review.
fd_close now calls fd_close_posix() directly.
set_posix_lock/release_posix_lock() now handle the reference counting.
More changes due when this gets moved to the file locking/posix.c
Jeremy.
(This used to be commit
239abd48f049c6a8d2bbc0636eacf347ab77588c)
Jeremy Allison [Thu, 27 Apr 2000 23:28:56 +0000 (23:28 +0000)]
Ok - this is more subtle than it looks :-).
When a file is being closed, once it passes the fnum and tid tests then
the locking context should be ignored when removing all locks. This is
what is done in the brl close case, but when you have outstanding
POSIX locks, then you cannot remove all the brl locks in one go, you
have to get the lock list and call do_unlock individually. As this
uses global_smbpid as the locking context, you need to make sure
that this is set correctly for the specific lock being removed. I
now do this by storing the smbpid in each entry in the unlock list returned from
the query call. I removed the smbpid from fsp (not needed) and
things seem ok (even with the stupid smbpid tricks that smbtorture plays :-).
Jeremy.
(This used to be commit
6baa96bb466915cc17e8cbad50254d6bd47b967b)
Jeremy Allison [Thu, 27 Apr 2000 22:23:04 +0000 (22:23 +0000)]
Fixed subtle unlocking bug when a file is closed. We need to store the
smbpid used when a file was opened in the files_struct. Else we use
the wrong global_smbpid when we are closing the file and trying to
remove the brl locks - this causes the brl locks to be left when the
file is closed as the samba_context check fails.
Jeremy.
(This used to be commit
2746e5602e493e5b022764b4b839eb4d2f14363b)
Jeremy Allison [Thu, 27 Apr 2000 21:12:33 +0000 (21:12 +0000)]
Did the rewrite Andrew wanted where all knowledge of POSIX locking is
removed from the smbd/open.c code.
We now use a dlink list of structures indexed by dev/inode to store
all pending fd's for close. This could be rewritten to use lib/hash.c
if this is discovered to be too slow in use.
Andrew, please take a look and let me know if this is what you
had in mind.
Jeremy.
(This used to be commit
0487841120a7584da9a2b83b9574562c415d7024)
Jeremy Allison [Thu, 27 Apr 2000 18:46:10 +0000 (18:46 +0000)]
Fixed crash bugs Andrew pointed out with LOCK4 smbtorture
test. Was miscounting posix locks, plus was not taking into account
the case where other_fsp == fsp in the 'move locks' case. DOH ! This
code will be re-written anyway :-).
Jeremy.
(This used to be commit
5278ec016cb24d8263fe6e7c1d389f466270ef24)
Jeremy Allison [Thu, 27 Apr 2000 17:14:45 +0000 (17:14 +0000)]
Fixed range check on writeX.
Jeremy.
(This used to be commit
9cde198108439358e99128fa9a1b3000e33f5414)
Jeremy Allison [Thu, 27 Apr 2000 16:53:31 +0000 (16:53 +0000)]
Tidyup of smbecho.
Jeremy.
(This used to be commit
4a4b7a994bbe327216f736133edc51cf9a351716)
Tim Potter [Thu, 27 Apr 2000 07:46:11 +0000 (07:46 +0000)]
file winbindd_ntdom.h was initially added on branch SAMBA_TNG.
(This used to be commit
b040be5ef967a9149cd6a4955b8e0404152e9f15)
Tim Potter [Thu, 27 Apr 2000 07:45:30 +0000 (07:45 +0000)]
file ntdom_config.h was initially added on branch SAMBA_TNG.
(This used to be commit
2a097e7b62441b5ccb90fa1d4a8b57ed6ee83fd0)
Andrew Tridgell [Thu, 27 Apr 2000 07:36:06 +0000 (07:36 +0000)]
quick hack to get smbtorture working again
(This used to be commit
2d37c1f98f45646546ee76743f9df90b1c0b01ae)
Jeremy Allison [Tue, 25 Apr 2000 20:30:58 +0000 (20:30 +0000)]
Added the hard code :-).
HEAD should now map brl locks correctly into POSIX locks, including the
really nasty case of large range unlock.
There is a lot of pretty ASCII art in locking/brlock.c explaining
exactly how this code works. If it is unclear, please ask me.
Jeremy.
(This used to be commit
135855dbd3b8934a49229b81646cd4469acba926)
Andrew Tridgell [Tue, 25 Apr 2000 14:06:57 +0000 (14:06 +0000)]
moved trans2.h and nterr.h into includes.h with all our other includes
(This used to be commit
d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
Andrew Tridgell [Tue, 25 Apr 2000 14:04:06 +0000 (14:04 +0000)]
split clientgen.c into several parts
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
(This used to be commit
10c5470835b43116ed48b3137c3b9cc867a20989)
Andrew Tridgell [Tue, 25 Apr 2000 01:17:45 +0000 (01:17 +0000)]
added TDB_MODIFY flag - patch from from luke
(This used to be commit
90b574296e06cd6ed4fedc1e5a8ae412a5e78b45)
Andrew Tridgell [Tue, 25 Apr 2000 00:46:46 +0000 (00:46 +0000)]
fixed a memory leak in nmblookup
(This used to be commit
49865ea06c96b01a5e5dec84d64b78bf26129be3)
Andrew Tridgell [Tue, 25 Apr 2000 00:46:24 +0000 (00:46 +0000)]
fixed a memory leak of devmode in spoolss
this stuff is screaming out for talloc() rather than malloc/free
(This used to be commit
e9576124cbe8322ed7bee9f4e72b5d1753ee0bac)
Andrew Tridgell [Tue, 25 Apr 2000 00:45:42 +0000 (00:45 +0000)]
don't qsort a list less than 2 entries
(This used to be commit
6faa3c23ae6d8aab52f8d6689e04bde9b3029804)
Jeremy Allison [Mon, 24 Apr 2000 20:48:40 +0000 (20:48 +0000)]
Added the code that keeps fd's open across a close if there are other fsp's
open on the same dev/inode pair with existing POSIX locks.
This is done at the smbd/open layer, so smbd just calls fd_close() and
the transfer of any open fd's is done under the covers of fd_close().
When an fsp is closed and no other fsp's open on the same dev/inode
pair have existing POSIX locks then all fd's associated with this fsp
are closed.
Now only the hard part of doing the POSIX range unlock code when read
locks overlap remains for full POSIX/SMB lock integration....
Jeremy.
(This used to be commit
1df48ed55ee303b6d84d7277fd79761cfe5f7052)
Jeremy Allison [Mon, 24 Apr 2000 19:23:51 +0000 (19:23 +0000)]
Now that fsp's are created on successful file open, the structure member
fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-).
NB for Luke, this patch also did not apply to TNG. TNG is not yet
identical w.r.t file serving with HEAD. This makes it impossible for
me to help maintain TNG. Please fix asap.
lib/substitute.c: Removed unused variable (pidstr).
Jeremy.
(This used to be commit
389b700a26e8a308a0dff6fc038c38068aa0119a)
Andrew Tridgell [Mon, 24 Apr 2000 14:36:44 +0000 (14:36 +0000)]
dump in a binary format
(This used to be commit
41af3232dba90832684ad8260ce0bb05e077cb02)
Andrew Tridgell [Mon, 24 Apr 2000 14:36:25 +0000 (14:36 +0000)]
use an size_t not a ssize_t when checking for out of bounds errors
(This used to be commit
044af3cf977e3172b3b1ce3f71457d5b0a4fc1b2)
Andrew Tridgell [Mon, 24 Apr 2000 11:31:20 +0000 (11:31 +0000)]
moved INSURE hook into util.c
(This used to be commit
2fba24ef0e4cae64c5a179370c83d8bbf4e70bb8)
Andrew Tridgell [Mon, 24 Apr 2000 11:31:01 +0000 (11:31 +0000)]
fixed another memory leak
(This used to be commit
780713f67a848ade49c523cda96015ab46337cde)
Andrew Tridgell [Mon, 24 Apr 2000 11:30:45 +0000 (11:30 +0000)]
fixed a parameter bug found by insure
(This used to be commit
a559a8066fb162c4da0a5046c49a105eabf131d9)
Andrew Tridgell [Mon, 24 Apr 2000 11:30:24 +0000 (11:30 +0000)]
moved the INSURE hook into util.c
(This used to be commit
8c726b9764bac0bc95cf9877e172c9e1262e576d)
Andrew Tridgell [Sun, 23 Apr 2000 14:25:36 +0000 (14:25 +0000)]
more pstring/fstring errors found by insure
(This used to be commit
ba1931bb6596b538549e712cb8898b1ed19f5adc)
Andrew Tridgell [Sun, 23 Apr 2000 14:25:04 +0000 (14:25 +0000)]
fixed a locking database bug - it was actually harmless except that
smbstatus could display the wrong filename when files change dev/inum
after a rename
(This used to be commit
990b16fcf7af74f376db157a3e5de7bb68c1a4a1)
Andrew Tridgell [Sun, 23 Apr 2000 08:45:21 +0000 (08:45 +0000)]
don't close high fd's in smbrun when using insure (prevents closing
error fd)
(This used to be commit
defbedd198f02f7bb9af70436f5a25ab754b5fb6)
Andrew Tridgell [Sun, 23 Apr 2000 08:44:55 +0000 (08:44 +0000)]
another fstring/pstring fix
(This used to be commit
91ed7d8ffe8208d06191c64f5332954ec6bf75da)
Andrew Tridgell [Sun, 23 Apr 2000 08:40:54 +0000 (08:40 +0000)]
fixed another spoolss memory leak
I am falling in love with insure - it is finding _lots_ of memory
problems
(This used to be commit
d9b4076293a4d37e1558ad63a3f522385ee3e521)
Andrew Tridgell [Sun, 23 Apr 2000 08:31:10 +0000 (08:31 +0000)]
fixed a memory leak I caused last week with my lines[] changes
(This used to be commit
4c889d08aed3cebba54abbc96f28a2d1c545a4b5)
Andrew Tridgell [Sun, 23 Apr 2000 08:30:37 +0000 (08:30 +0000)]
split out standard_sub_basic() again to fix a bug where %p was being
substituted in the loadparm code and thus leaving lpq with no printer
(This used to be commit
b7c7a4d564d36885aa7c3efb2a87caec470df7fe)
Andrew Tridgell [Sun, 23 Apr 2000 08:13:48 +0000 (08:13 +0000)]
we can't pass a fstring to a routine expecting a pstring
(This used to be commit
8af70f288723e4597bc8639fc0cbec44af2e50c7)
Andrew Tridgell [Sun, 23 Apr 2000 08:13:12 +0000 (08:13 +0000)]
check for a valid snum when running a printing command
(This used to be commit
381ddb464fd0da671d567177f1ded10f67952692)
Andrew Tridgell [Sun, 23 Apr 2000 07:56:11 +0000 (07:56 +0000)]
Makefile.in change for split of printfsp.c
(This used to be commit
980a81651a043f2281f6a8b863d31438212b584a)
Andrew Tridgell [Sun, 23 Apr 2000 07:51:15 +0000 (07:51 +0000)]
split fsp specific routines out of printing.c to fix linking problem
in TNG
(This used to be commit
82df25b28b94b0041676fb433e0e677acb544579)
Andrew Tridgell [Sun, 23 Apr 2000 07:44:01 +0000 (07:44 +0000)]
fixed two uninitialised memory references
(This used to be commit
e4ddd1a4a96b7f723d3d92e4334f4033e1dbc8a8)
Andrew Tridgell [Sun, 23 Apr 2000 07:43:32 +0000 (07:43 +0000)]
trick to get full stack trace when using the free version of insure
(This used to be commit
bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2)
Andrew Tridgell [Sun, 23 Apr 2000 07:42:13 +0000 (07:42 +0000)]
insure caught an uninitialised memory reference - ensure it starts as
zero
(This used to be commit
53077295b76487a6eafc6b14b69a91074a02aa35)
Andrew Tridgell [Sun, 23 Apr 2000 07:40:13 +0000 (07:40 +0000)]
avoided a memory leak in the ubi code by deleting a mangled cache
entry before adding to ensure that we don't ever add a duplicate entry
this code can be removed when ubi gets fixed
(This used to be commit
062d79bf8ba5308803393c7b9140d1f77db3690f)
Andrew Tridgell [Sun, 23 Apr 2000 07:38:18 +0000 (07:38 +0000)]
fixed a prs memory leak (weren't freeing input buffer)
(This used to be commit
be7186b0dd2779fc9f98b4c9f77874ef3ded37d6)
Andrew Tridgell [Sun, 23 Apr 2000 07:37:43 +0000 (07:37 +0000)]
if using insure then don't close fd 2
(This used to be commit
1c6322473afcf9065fa25777d1b0627f133af3f6)
Andrew Tridgell [Sat, 22 Apr 2000 08:29:41 +0000 (08:29 +0000)]
return NULL for a zero size memdup
(This used to be commit
9416b58b9c2ff898cdae2cb81ab1e150ef9f0e89)
Andrew Tridgell [Sat, 22 Apr 2000 08:28:49 +0000 (08:28 +0000)]
don't copy a null groups list
(This used to be commit
d0fc1675df35e65488a19d7f5929792fba347b07)
Andrew Tridgell [Sat, 22 Apr 2000 08:28:22 +0000 (08:28 +0000)]
fixed overlapping strcpy() found by insure
(This used to be commit
1106fa7f24d229c3877263b7a7dde359556435e6)
Andrew Tridgell [Sat, 22 Apr 2000 08:27:48 +0000 (08:27 +0000)]
fixed uninitialised snum
(This used to be commit
14251aab2ec00aa7f3e6a6e791e78732cb5a9eda)
Jeremy Allison [Sat, 22 Apr 2000 00:33:16 +0000 (00:33 +0000)]
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.
(This used to be commit
ab0ecc39d688f16b9692fe90b991f0b89287070a)
Andrew Tridgell [Wed, 19 Apr 2000 08:44:56 +0000 (08:44 +0000)]
use sys_fsusage() not disk_free() in printing.c
(This used to be commit
763704f78fc44976b2d977e8a08ffdeb727903c4)
Andrew Tridgell [Wed, 19 Apr 2000 08:23:13 +0000 (08:23 +0000)]
split fsusage() into a separate module (to fix linking problems with
spoolssd in tng)
(This used to be commit
e2eacdd74c369fbbcd118148149321e36f3d0010)