Age | Commit message (Collapse) | Author | Files | Lines |
|
(This used to be commit 2b3b9ce2a122ec5fd945728c117c321087d85203)
|
|
Destructors now take a pointer to the "real" destroyed object as an argument.
Volker
(This used to be commit 70edd716ef0ccb218fe18d1233bd30abe46b62bf)
|
|
(This used to be commit e4b8c79a9d6f7323953121887af4f482d04a9228)
|
|
we don't get the chainlock when getting the byte range
lock record read-only.
Jeremy.
(This used to be commit fcd798ca0c1b76adb2bcda4a99c40c7aacb0addb)
|
|
a POSIX lock (applying a read-lock) and we overlap
pending read locks then send them an unlock message,
we may have allowed them to proceed.
Jeremy.
(This used to be commit a7a0b6ba50f4cf7c5a0a29809fdff9e1266a29e7)
|
|
fix the messaging code to call the efficient calls :
save_re_uid()
set_effective_uid(0);
messaging_op
restore_re_uid();
instead of using heavyweight become_root()/unbecome_root()
pairs around all messaging code. Fixup the messaging
code to ensure sec_init() is called (only once) so that non-root
processes still work when sending messages.
This is a lighter weight solution to become_root()/unbecome_root()
(which swaps all the supplemental groups) and should be more
efficient. I will migrate all server code over to using this
(a similar technique should be used in the passdb backend
where needed).
Jeremy.
(This used to be commit 4ace291278d9a44f5c577bdd3b282c1231e543df)
|
|
do with
our internal share number.
Funny that it worked at all :-)
Volker
(This used to be commit afa6e9094604afe1ef929cd936fbfa07b5473fd2)
|
|
Jeremy.
(This used to be commit 42dec2192c1261090f2fac7a123c384f5c133587)
|
|
of the lock array in order to delete them individually
it's also important to make a copy of the *size* of
this array. Otherwise the unlock decrements the termination
index of your for loop :-). Doh ! Big thanks to Volker
for showing me how to set up the build farm to track
this one down. This is not a 3.0.23a issue.
Jeremy.
(This used to be commit 2c82a159ae6a4cc83989f2b453508358db516d67)
|
|
share_mode_forall().
Volker
(This used to be commit f97f6cedffdc4d10afcac90a163b93a801acf514)
|
|
region between detecting a pending lock was needed
and when we added the blocking lock record. Make
sure that we hold the lock over all this period.
Removed the old code for doing blocking locks on
SMB requests that never block (the old SMBlock
and friends).
Discovered something interesting about the strange
NT_STATUS_FILE_LOCK_CONFLICT return. If we asked
for a lock with zero timeout, and we got an error
of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though
it was a blocking lock with a timeout of 150 - 300ms.
This only happens when timeout is sent as zero and
can be seen quite clearly in ethereal. This is the
real replacement for old do_lock_spin() code.
Re-worked the blocking lock select timeout to correctly
use milliseconds instead of the old second level
resolution (far too coarse for this work).
Jeremy.
(This used to be commit b81d6d1ae95a3d3e449dde629884b565eac289d9)
|
|
test. Phew - that was painful :-). But what it means
is that we now implement lock cancels and I can add
lock cancels into POSIX lock handling which will fix
the fast/slow system call issue with cifsfs !
Jeremy.
(This used to be commit f1a9cf075b87c76c032d19da0168424c90f6cb3c)
|
|
Jeremy.
(This used to be commit a8df1863bf2817a82a55c816ba1f685828c5b6ec)
|
|
requests. Maybe the Linux kernel OOM killer will
be kinder to smbd now :-). Back to tdbtorture
tests on cifsfs.
Jeremy.
(This used to be commit 1201383e7ab2413795a395491af0a4d3877b1c8b)
|
|
Fix a small one first.... (easy to valgrind).
Jeremy
(This used to be commit 43d24fbd41ed745a5b21514b526e655663c509ee)
|
|
We shouldn't allow this on the same smbd, but the cifsfs
client negotiates POSIX locks then sends Windows ones.
Doh ! Can't fix shipped client code....
Jeremy.
(This used to be commit 2f8cabe98d3776cb0bdf6b4ef1490fe0119e260a)
|
|
look at the return code.
Jeremy.
(This used to be commit f11933b3ac91c6fbacd6b410f4d2c0d400df23ee)
|
|
Hopefully will fix the build farm. Still a few errors
in RAW-LOCK to look at though...
Jeremy.
(This used to be commit edd72d37de570fdad09f7ee983b5b22a1613e558)
|
|
cifsfs client code.
Jeremy.
(This used to be commit 53094435d89088124041d57078c21a12e761e2bf)
|
|
to do the upper layer directories but this is what
everyone is waiting for....
Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
|
|
bad cast warning.
Jeremy.
(This used to be commit d60e6e0abc17361fe180d6723b970552dc377741)
|
|
share_mode struct. Allows us to know the unix
uid of the opener of the file/directory. Needed
for info level queries on open files.
Jeremy.
(This used to be commit d929323d6f513902381369d77bcd7b714346d713)
|
|
Klocwork #1129.
Jeremy.
(This used to be commit e8d86362ba8762a5e4180e7320f5ac8bb37c203d)
|
|
int
in a format string.
Jeremy.
(This used to be commit c49ad9200bf3fdd8b9404d93182c2e04e662190a)
|
|
open_file_shared.
(This used to be commit 784126edff942d1c2f79f7c9feb59980426f331e)
|
|
We were forgetting to increment after copying
the primary group gid.
Jeremy
(This used to be commit 31d16c434e1ee94691f013ed0b31d9f26baeb2cb)
|
|
fsp pointers. Ensure we cope with this to pass Samba4
DENY tests (we used to pass these, there must have been
a regression with newer code). We now pass them.
Jeremy
(This used to be commit fd6fa1d4eaf61783df74ee2da50d331477f06998)
|
|
function we must copy the data before modifying.
Jeremy.
(This used to be commit ef4c70f58edf15dc93b22f2c80e15113ee2a46df)
|
|
db. Make this db self-cleaning on first read of entry after
open, and also on smbstatus -b call. Needs more testing when
I get back from Boston but passes valgrind at first look.
Jeremy.
(This used to be commit c66531096325848d1476054df5d53ad05c2ffc83)
|
|
pass with CIFSFS.
Jeremy.
(This used to be commit 89b604285ebe77b7cc2e0d5593117c0c5dc5ed1c)
|
|
#3721.
(This used to be commit ab5a55ec8b27146fccba97f320d649bb19bc6f11)
|
|
case it's in a performace critical path and it *hurts* us.
Go back to plain malloc/free with an explicit destructor
call.
Jeremy.
(This used to be commit 1c99aed563c29e1b3d70939878af747a0660bfec)
|
|
key around while we're using it - saves many calls to
locking_key() (now deleted).
Jeremy.
(This used to be commit 2f8b527dcf4a36fbb933ce79c720c0425de76b4a)
|
|
Jeremy.
(This used to be commit 15f39a4c720e9645f941742310b6c6d7d7fc96d5)
|
|
into 3.0. Also merge the new POSIX lock code - this
is not enabled unless -DDEVELOPER is defined.
This doesn't yet map onto underlying system POSIX
locks. Updates vfs to allow lock queries.
Jeremy.
(This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7)
|
|
this allows us to experiment with ensuring the tdb hash
size for our open files and locking db are appropriately
sized. Make the hash size larger by default (10007 instead
of 1049) and make the locking db hash size the same as the
open file db hash size.
Jeremy.
(This used to be commit e7225f7e813423c3e2a94af6a9d7ce8a1b50a166)
|
|
was confusing.
Jeremy.
(This used to be commit bc1a605a39e58a7dbdcd4d132345e957e3ed9d5e)
|
|
(This used to be commit a39cbaa699d111264c2c9dda49a6e4f42acd3fb8)
|
|
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.
The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :
tmp = realloc(p, size);
if (!tmp) {
SAFE_FREE(p);
return error;
} else {
p = tmp;
}
However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :
p = realloc(p, size)
if (!p) {
return error;
}
which will leak the memory pointed to by p on realloc fail.
This commit (hopefully) fixes all these cases by moving to
a standard idiom of :
p = SMB_REALLOC(p, size)
if (!p) {
return error;
}
Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.
For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :
tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
if (!tmp) {
SAFE_FREE(p);
return error;
} else {
p = tmp;
}
SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).
It remains to be seen what this will do to our Coverity bug count :-).
Jeremy.
(This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
|
|
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
|
|
correct system size. Fixed a bug that was accidentally introduced
by use of uint32 - uid was stored twice, not uid and gid.
Jeremy.
(This used to be commit 89db006997588c6523ce8f2470d67f3136042256)
|
|
Less trouble than I thought plus it didn't need an interface
change (thank goodness !).
Jeremy.
(This used to be commit dbe2572d1c713f46b0d1d0c405f88456c9336297)
|
|
the data struct how big the token is... :-).
Jeremy.
(This used to be commit f259de8b69f94ae8b5f4553180f245234bffd397)
|
|
by saving the UNIX token used to set a delete on close flag,
and using it when doing the delete. libsmbsharemodes.so still
needs updating to cope with this change.
Samba4 torture tests to follow.
Jeremy.
(This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
|
|
jason qian <jason@infrant.com> was a *fantastic*
help in tracking this down.
Jeremy.
(This used to be commit 9f4a9c70fa232047868e5d8a3f132a2dd6bfee82)
|
|
(I hope). Separate 3.0.21b patch sent to Jerry.
Jeremy.
(This used to be commit 837e7ea7e40cedc6b01e023445feb4a90c4bf8b9)
|
|
Jeremy.
(This used to be commit f93e1e75563679dc07958168b283dfc0eb2de5b0)
|
|
entries. Add paranioa to debug so we know when an
entry is unused.
Jeremy.
(This used to be commit fa5fab313e3728ff49c00ca1097242039506f83e)
|
|
with a NULL service path and fname (we do it all the time internally)
(This used to be commit e1f75ea63780f4a1661f19554d18bbd73b069c1b)
|
|
always linearize into little-endian. Should fix all
Solaris issues with this, plus provide a cleaner base
moving forward for cluster-aware Samba where smbd's
can communicate across different compilers/architectures
(eventually these message will have to go cross-machine).
Jeremy.
(This used to be commit d01824b78576a034428e1cef73868d1169057991)
|