Age | Commit message (Collapse) | Author | Files | Lines |
|
(This used to be commit 6dc79e6b12e221e9af85a1edf487b5fb5aae222b)
|
|
Thanks,
Volker
(This used to be commit 86f62484dd7db43e036d9edf29e459b8bd0e5fbe)
|
|
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)
|
|
think is a direct bug, but some code that needs clarification :-).
Jeremy.
(This used to be commit 61901a3f10de64a72b655d9aa884424a4fc88a44)
|
|
Jeremy.
(This used to be commit 46e10980927f1dfa4a1995e778df880cf823cbdb)
|
|
Add the missing comment about needing to save the new share name.
(This used to be commit bb3b15e631c8dae7aaea303be18e086d63ee16d6)
|
|
When only allowing one connection per server, the cache needs to track which
share is currently connected, or we never know whether a tdis()/tcon() for the
new share is required.
(This used to be commit ad0a725ef5f68db442b3b217c5a852086eff9297)
|
|
(This used to be commit 70e7c9de9dee9317164c0f96a44827ae8b959254)
|
|
(This used to be commit 249dba0386833803805a742aa6697cc75566f05c)
|
|
DO NOT MERGE FOR 3.0.21c PLEASE.
Jeremy.
(This used to be commit 3de0d9af6925e3dc0328c02c2a30127ea5c82a83)
|
|
This code needs a tidyup and common code with libsmb/errormap.c
merging. Should fix the winbindd crash Jerry found (I hope).
Jeremy.
(This used to be commit e81227d044fbe7c73c121e540ccafc7f6517c4ea)
|
|
against server with schannel disabled. Second part
will come tomorrow (fixing net_rpc_join_ok()).
Jeremy.
(This used to be commit 7de1ee18619bf99c5db45692e085d0646e52378f)
|
|
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
|
|
Jeremy.
(This used to be commit ea82958349a57ef4b7ce9638eec5f1388b0fba2a)
|
|
Bartlett's
Samba4 code.
Jeremy.
(This used to be commit a2fb436fc5dd536cfe860be93f55f9cb58139a0e)
|
|
I mean it this time :-).
Jeremy.
(This used to be commit 80f4868944d349015d2b64c2414b06466a8194aa)
|
|
running. More generic error return cleanup in libsmb/
needs doing (everything returning NTSTATUS not BOOL).
Jeremy
(This used to be commit 654bb9853b450c5d509d182f67ec26ac320fd590)
|
|
Guenther
(This used to be commit c0d91f9d19b33995237847389e4c37e086938b9e)
|
|
Jeremy.
(This used to be commit 4204794cc7c5e2671259652879c33f539d26958c)
|
|
(This used to be commit c15f1d553f03ad1ed4e1d52b8e46c52202bc3a83)
|
|
-----------------------------------
Thanks to a report from VL:
We were causing mayhem by weakening the keys at the wrong point in time.
I think this is the correct place to do it. The session key for SMB
signing, and the 'smb session key' (used for encrypting password sets)
is never weakened.
The session key used for bulk data encryption/signing is weakened.
This also makes more sense, when we look at the NTLM2 code.
Andrew Bartlett
-----------------------------------
With more 'try all options' testing, I found this 'simple' but in the
NTLM2 signing code.
Andrew Bartlett
-----------------------------------
After Volker's advise, try every combination of parameters. This
isn't every parameter on NTLMSSP, but it is most of the important
ones.
This showed up that we had the '128bit && LM_KEY' case messed up.
This isn't supported, so we must look instead at the 56 bit flag.
Andrew Bartlett
-----------------------------------
We should now try retesting with NT4. This should be standalone
enough to port into a SAMBA_3_0_RELEASE branch fix.
Jeremy.
(This used to be commit b9b8cd1752aeab049983c1a6038edf2231ec10a4)
|
|
makes fixes much easier to port. Fix the size of dc->sess_key to
be 16 bytes, not 8 bytes - only store 8 bytes in the inter-smbd
store in secrets.tdb though. Should fix some uses of the dc->sess_key
where we where assuming we could read 16 bytes.
Jeremy.
(This used to be commit 5b3c2e63c73fee8949108abe19ac7a448a033a7f)
|
|
from Samba4 on how to decode the 532 byte password buffers.
Getting closer to passing samba4 RPC-SCHANNEL test.
Jeremy.
(This used to be commit 205db6968a26c43dec64c14d8053d8e66807086f)
|
|
Jeremy.
(This used to be commit 2aed5b36409e05ac25b4492669f47d50be988f2c)
|
|
Less trouble than I thought plus it didn't need an interface
change (thank goodness !).
Jeremy.
(This used to be commit dbe2572d1c713f46b0d1d0c405f88456c9336297)
|
|
Jeremy.
(This used to be commit 6196446a03abeb4100bac1721977488ae5843f42)
|
|
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
|
|
(This used to be commit 6c3480f9aecc061660ad5c06347b8f1d3e11a330)
|
|
jason qian <jason@infrant.com> was a *fantastic*
help in tracking this down.
Jeremy.
(This used to be commit 9f4a9c70fa232047868e5d8a3f132a2dd6bfee82)
|
|
always update the failed time when we are adding a failed
connection.
Jeremy.
(This used to be commit 6f5af1dd413d07430ead9382422dda14acf3464d)
|
|
Fix cli_setpathinfo() to actually do what it's supposed to.
Also, get rid of some apparently drug-induced code to deal with create time
which isn't being manipulated anyway.
(This used to be commit aa25dc1248b15e8e1b39cf8a98496e5aba475c4a)
|
|
This should fix bug #3446.
- The authentication domain provided an an SMB URL was being ignored. This
patch fixes that.
- There were a number of places where string copies were not being confirmed to
be properly null-terminated. Now, all string copies in libsmbclient.c are
properly null-terminated.
(This used to be commit 5fbc2fbb461f02ad6c889de2ce9929c605a44e24)
|
|
lp_load() could not be called multiple times to modify parameter settings based
on reading from multiple configuration settings. Each time, it initialized all
of the settings back to their defaults before reading the specified
configuration file.
This patch adds a parameter to lp_load() specifying whether the settings should
be initialized. It does, however, still force the settings to be initialized
the first time, even if the request was to not initialize them. (Not doing so
could wreak havoc due to uninitialized values.)
(This used to be commit f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
|
|
The problem was that the ntlmssp bind silently failed in that case, we have to
do it anonymously. Or does anybody have a better idea?
Give a better error message if something else is wrong with the account.
Volker
(This used to be commit 0e24c701ce3755d71de7fdccb9f4564b381bf996)
|
|
auth was not generating the correct auth header on the 4th
packet. This may fix a lot of Windows client complaints and
is essential for release.
Jeremy.
(This used to be commit 48dd8c732b890e3fd3d8e80ace765487601cfb26)
|
|
These can happen in normal operation (I think - not 100%
sure) and don't want to alarm admins. Jerry please add this
to 3.0.21b.
Jeremy.
(This used to be commit 47178b1b5ad06905f345a0f6b6267701d8aefddb)
|
|
Jeremy.
(This used to be commit 103cac7dd314117b15e27fd263a64beeb36ed6e6)
|
|
area of code needs to be reworked later on.
Guenther
(This used to be commit 088abfcdd1d6b28409d4b2917bc2aeb5d371f675)
|
|
Jeremy.
(This used to be commit d9b6bdd84a16c8af44049748a0fc47844f597919)
|
|
does an implicit open/read/close and blows away an
open keytab handle - so make sure we use a new
handle.
Wonderful analysis from Luke <ldeller@xplantechnology.com>
helped fix this.
Jeremy.
(This used to be commit 9d2f2385ad68cbe11bdfb82b5f2d016626f6e679)
|
|
Jeremy.
(This used to be commit 1c32b352da270370e65d25939fdc56c2a415190f)
|
|
Yau Lam Yiu <yiuext@cs.ust.hk>.
Jeremy.
(This used to be commit 4776101107923e425a153fe0457dbf61f4c99935)
|
|
remove old superfluous comment and ifdef
(This used to be commit ee7fcb43ad456929f1f005f47c52a4b4d46c5087)
|
|
Jeremy.
(This used to be commit 4473ac4ef9c86574fc49b1e67089b59b14b6d10d)
|
|
allow for arbitrary option value types
(This used to be commit 64c8e32b6382e48bce5c1f18179e66ca765a70af)
|
|
bug (enhancement) #2651: add option to log debug messages to stderr instead of stdout
(This used to be commit 4182eb99af5b343291a661a87d08edd91fd09a7a)
|
|
do not open connection when only looking for cached connection; also, fix crash caused by missing initialization following recent locale changes
(This used to be commit 0070d816ab53eba047c009604d02f7e088290978)
|
|
fix line length and make formatting/indentation more consistent
(This used to be commit 3d45023368e651315ff5620345c755c103c91065)
|
|
When enumerating what could be a server name or a workgroup name, first
check for an existing server structure. If none exists, then go through
the previous determination of whether it's a serrver or a workgroup. This
should avoid doing a NetBIOS name query each time, if we've already
connected to the specified server. (While we're at it, clean up indenting
and line length in this area of code.)
(This used to be commit 85e4cab1d949f1ab9ce04b96de0b8d1c8113df67)
|
|
(This used to be commit a3f102f6c3ada10e74d72944e767b9b263fe83dd)
|