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

2833 Commits

Author SHA1 Message Date
Jeremy Allison
5445694eb9 r15112: Move strict locking default to auto. Fix up the error
return for one of the Samba4 torture tests.
Jeremy.
(This used to be commit 9db6617756)
2007-10-10 11:16:24 -05:00
Volker Lendecke
76e581b983 r15103: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4's
tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be
handled?

Thanks,

Volker
(This used to be commit 0a2f1ed5e9)
2007-10-10 11:16:23 -05:00
Volker Lendecke
4f24046294 r15102: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace by uint32.
Volker
(This used to be commit 0a1665a1b7)
2007-10-10 11:16:23 -05:00
Jeremy Allison
010c725b36 r15088: Remove all time() and gettimeofday() calls out of the mainline
packet processing code. Only do these when needed (ie. in the
idle timeout code). We drop an unneccessary global here too.
Jeremy.
(This used to be commit 8272a5ab06)
2007-10-10 11:16:22 -05:00
Jeremy Allison
cc203f3e59 r15084: Try and squeeze more out of the non-read/write code path.
Jeremy.
(This used to be commit 23dcff4d50)
2007-10-10 11:16:22 -05:00
Jeremy Allison
713eaf1d67 r15083: Using talloc with destructors is nice and all, but in this
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 1c99aed563)
2007-10-10 11:16:22 -05:00
Volker Lendecke
262ffd9750 r15035: It seems that many preprocessors do not like comments in macro args..
(This used to be commit efc833dcba)
2007-10-10 11:15:58 -05:00
Jeremy Allison
fc13f28417 r15030: On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.
(This used to be commit 1217ed392b)
2007-10-10 11:15:58 -05:00
Jeremy Allison
eecdc6c956 r15022: Fix core dumps on normal server exit.
Jeremy.
(This used to be commit 13c3abf031)
2007-10-10 11:15:57 -05:00
Jeremy Allison
6c237e04b2 r15020: Fix issue with samba4 netbench torture tester,
it sends break replies to "break to none from level2"
requests and it shouldn't. Just don't log a debug
level zero message.
Jeremy.
(This used to be commit dc6a13da33)
2007-10-10 11:15:57 -05:00
Jeremy Allison
22dbd67708 r15018: Merge Volker's ipc/trans2/nttrans changes over
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 08e52ead03)
2007-10-10 11:15:57 -05:00
Jeremy Allison
c9c502442b r14989: Fix from Mathias Dietz <MDIETZ@de.ibm.com>. EPERM can be
a valid return from getting an xattr. Don't disable if
we get it.
Jeremy.
(This used to be commit 7769b678f2)
2007-10-10 11:15:55 -05:00
Jeremy Allison
876f2deb3a r14986: Fix OS/2 directory delete bug found by kukks.
(Thanks a lot for all your hard work on this).
We were caching the results of *all* directory
scans, not just the results that match the
client wildcard. This actually made no sense,
as only matches on the client wildcard can be
returned to the client and so might need to
be searched for in the cache. This fixes the
directory cache to only cache entries that we
return to the client.
Jeremy.
(This used to be commit c88af597d0)
2007-10-10 11:15:55 -05:00
Jeremy Allison
4ee43dbd47 r14954: Fix #3569 based on William Jojo's work. AIX also
has the linear posix locking issue which causes
CLEAR_IF_FIRST to cause performance problems.
As we know we're in a daemon architecture with
long-lived parent we can avoid this in the Samba
case. Add a comment explaining this.
Jeremy.
(This used to be commit 3cd5c3df0d)
2007-10-10 11:15:55 -05:00
James Peach
4fa5559800 r14898: This change is an attempt to improve the quality of the information that
is produced when a process exits abnormally.

First, we coalesce the core dumping code so that we greatly improve our
odds of being able to produce a core file, even in the case of a memory
fault. I've removed duplicates of dump_core() and split it in two to
reduce the amount of work needed to actually do the dump.

Second, we refactor the exit_server code path to always log an explanation
and a stack trace. My goal is to always produce enough log information
for us to be able to explain any server exit, though there is a risk
that this could produce too much log information on a flaky network.

Finally, smbcontrol has gained a smbd fault injection operation to test
the changes above. This is only enabled for developer builds.
(This used to be commit 56bc02d644)
2007-10-10 11:15:53 -05:00
Stefan Metzmacher
18e93247aa r14883: add 'smbd:sharedelay' option, so that we can speed up BASE-DENY2 in make test
as done in samba4

metze
(This used to be commit b98dd258a7)
2007-10-10 11:15:52 -05:00
Gerald Carter
6c9eaa6880 r14855: Various fixes:
* depreacte 'acl group control' after discussion with Jeremy
  and implement functionality as part of 'dos filemode'
* fix winbindd on a non-member server to expand local groups
* prevent code previously only used by smbd from blindly
  turning _NO_WINBINDD back on
(This used to be commit 4ab372f4ca)
2007-10-10 11:15:51 -05:00
Jeremy Allison
872d3cea87 r14849: Fix >= that should be >. Too strict condition
checked by Volker.
Jeremy.
(This used to be commit 9a763da073)
2007-10-10 11:15:50 -05:00
Jeremy Allison
ecc0c18889 r14847: Tell static checkers that exit_server() doesn't
return.
Jeremy.
(This used to be commit 9c5e26a56a)
2007-10-10 11:15:50 -05:00
Jeremy Allison
75c965d3a4 r14790: Fix possible null deref. Coverity #277.
Jeremy.
(This used to be commit 2454af392a)
2007-10-10 11:15:48 -05:00
Jeremy Allison
1d3fd5201c r14746: Add the Samba4 replacements for opendir/readdir etc. to
Samba3 - with some 64-bit macro madness. Attempt to fix
the broken directory handling in the *BSD-of-the-month
club.
Jeremy.
(This used to be commit fd98427f64)
2007-10-10 11:15:45 -05:00
Volker Lendecke
e487835181 r14695: Patch from Björn Jacke:
- add DMAPI/XDSM support for AIX
- find JFS DMAPI libs on Linux when only they are available

Volker
(This used to be commit b6b72f8c6a)
2007-10-10 11:15:44 -05:00
James Peach
a7d1a32b14 r14669: Remove duplicate source caused by running patch(1) once too often.
(This used to be commit 0ebbfc867c)
2007-10-10 11:15:42 -05:00
James Peach
40d0707827 r14668: Set the FILE_STATUS_OFFLINE bit by observing the events a DMAPI-based
HSM is interested in. Tested on both IRIX and SLES9.
(This used to be commit 514a767c57)
2007-10-10 11:15:42 -05:00
Stefan Metzmacher
250c02554e r14618: add --no-process-group to all server programms
to make the following possible:

timelimit 20000 bin/nmbd -F -S --no-process-group
timelimit 20000 bin/smbd -F -S --no-process-group

this is needed to 'make test' working without losing child processes

metze
(This used to be commit c3a9f30e2a)
2007-10-10 11:15:39 -05:00
Jeremy Allison
5067cca077 r14602: Fix another logic bug in new oplock handling. Just
because lck->num_share_modes != 0 doesn't mean that
there *are* other valid share modes. They may be
all marked "UNUSED" or be deferred open entries.
In that case don't downgrade the granted oplock to
level2 needlessly - a client can have an exclusive
oplock in this case. The original code handled this
correctly in the lck->num_share_modes == 0 case but
not in the case where there were no valid share modes
but lck->num_share_modes != 0. I'll clean up my
Samba4 torture tester for this and commit it tomorrow.
Jeremy.
(This used to be commit 306061c93d)
2007-10-10 11:15:39 -05:00
James Peach
97ee5b1afa r14600: Refactor capability interface from being IRIX-specific to using only
the POSIX interface. Note that this removes support for inherited
capabilities. This wasn't used, and probably should not be.
(This used to be commit 763f4c0148)
2007-10-10 11:15:39 -05:00
Jeremy Allison
292afdba59 r14596: Fix a logic bug with multiple oplock contention.
The sad thing is the core of this bug fix is just
removing a paranoia "exit_server" call, as the
rest of the logic was already correct :-).

Lots of comments to explain the logic added.

I will look at adding tests to exercise this,
might be possible.

Jeremy.
(This used to be commit c2488db727)
2007-10-10 11:15:38 -05:00
James Peach
1af229a8f8 r14574: Allow use of sendfile as long as the write cache has not been enabled
on the particular file we are performing I/O on, irrespective of whether
the write cache is globally enabled
(This used to be commit 0809e2cb1d)
2007-10-10 11:15:37 -05:00
Volker Lendecke
49ecd176ee r14559: Oplocks have changed, process_smb can be static again
(This used to be commit 19e9bc03f8)
2007-10-10 11:15:37 -05:00
Jeremy Allison
f04d5530cc r14460: SMBexit closes by pid and vuid. Tested with smbtorture.
Jeremy.
(This used to be commit 71e8158042)
2007-10-10 11:15:31 -05:00
Jeremy Allison
e6676a9a69 r14387: Try and fix the coverity issues (#53, #54) with negative
sink by ensuring all uses of rpcstr_push are consistent
with a size_t dest size arg.
Jeremy.
(This used to be commit f65d7afe19)
2007-10-10 11:15:27 -05:00
Jeremy Allison
b5c2c5cd25 r14357: Try and fix Coverity #169 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.
 line, and those below, will be ignored--

M    source/smbd/posix_acls.c
(This used to be commit b8397c9f33)
2007-10-10 11:15:26 -05:00
Jeremy Allison
ed5095a490 r14336: Try and quieten coverity #53 and #54. Make it obvious
we're using -1 as a special size_t case by casting.
Jeremy.
(This used to be commit 415530bd08)
2007-10-10 11:15:25 -05:00
Jeremy Allison
ff122b308b r14229: Something Coverity hasn't caught (yet) but I've gotten
sensitive to null derefs. get_timed_events_timeout()
can potentially return NULL. Cope with this.
Jeremy.
(This used to be commit 0483807872)
2007-10-10 11:15:18 -05:00
James Peach
a62c0925e8 r14207: Convert the lp_acl_compatibility() param into an enum.
(This used to be commit 5429c495c5)
2007-10-10 11:15:16 -05:00
Jeremy Allison
5f224c2c26 r14170: Paranioa fix for sesssetup.
Fix Coverity bug #26. Guard against NULL ref.
Jeremy.
(This used to be commit c0f906ac8d)
2007-10-10 11:15:15 -05:00
Jeremy Allison
47a11f8a4c r14168: Fix Coverity #219. I think this is a false coverity
warning as it seems to get confused with assignment
and comparison. Clarify the code anyway.
Jeremy.
(This used to be commit 754818f8cc)
2007-10-10 11:15:14 -05:00
Günther Deschner
c077d363a4 r14130: Remove make_server_info_pac alltogether, make_server_info_info3 does
already do what we need.

Guenther
(This used to be commit 773e33c971)
2007-10-10 11:11:14 -05:00
Gerald Carter
1de2983de4 r14112: * fix checks on return code from register_vuid() which could actually
fail and we would still return success in the SMBsesssetup reply :-(
* Make sure to create the local token for the server_fino struct
  in reply_spnego_kerberos() so that register_vuid() does not fail.
  (how did this ever work?)
(This used to be commit 8dafa45b97)
2007-10-10 11:11:13 -05:00
James Peach
f0210601d1 r14111: Work around additional typedefs in the gamin implementation
of the FAM API.
(This used to be commit dc96ce90e5)
2007-10-10 11:11:12 -05:00
Gerald Carter
9f18298bee r14075: * add support for long variable names in smb.conf in the form of %(....)
* add support for %(DomainSID)
* replace standard_sub_XXX() functions with wrappers around their
  alloc_sub_XXX() counterparts
* add support for using SIDs in read list, et. al. (anything that
  is checked by nt_token_contains_name_in_list())
(This used to be commit 71d960250d)
2007-10-10 11:11:09 -05:00
Volker Lendecke
dece1a2db2 r13983: Fix Coverity bug # 111
(This used to be commit 08d7fd31ab)
2007-10-10 11:11:03 -05:00
Volker Lendecke
33c9fbab12 r13980: Fix Coverity bug # 63. Jeremy, could you take a look at this?
Thanks,

Volker
(This used to be commit 49043a756d)
2007-10-10 11:11:02 -05:00
Volker Lendecke
92fa7eadc8 r13916: Fix Coverity bug #29. Looks like my code. I wonder how much there is still
lurking...

Volker
(This used to be commit 1345a52794)
2007-10-10 11:11:00 -05:00
Jeremy Allison
894358a8f3 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
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 1d710d06a2)
2007-10-10 11:10:59 -05:00
Gerald Carter
4f636b57c1 r13771: BUG 3534: ignore lines in the username map file with no right hand list rather than bailing out
(This used to be commit acff5163ca)
2007-10-10 11:10:53 -05:00
Jeremy Allison
b532e86644 r13759: As pointed out by Volker, it isn't much good creating
a new empty acl in remove_posix_acl if you don't bother
to set it on the file in question :-).
Jeremy.
(This used to be commit 12eccc8fe4)
2007-10-10 11:10:52 -05:00
Jeremy Allison
99b74908cd r13748: Don't reference memory after we just freed it (Doh!).
Thanks to tridge's changes to the directory delete on close tests
for catching this.
Jeremy.
(This used to be commit 01ef957d48)
2007-10-10 11:10:52 -05:00
Jeremy Allison
447d49be9e r13724: Remove unused variable. Bug #3559 from
jason@ncac.gwu.edu.
Jeremy.
(This used to be commit 0295ed3d5c)
2007-10-10 11:10:51 -05:00