1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-11 17:58:16 +03:00

113 Commits

Author SHA1 Message Date
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Günther Deschner
4121ccfc3e r16939: Still clear the winbind_cache.tdb when offline logons are not enabled.
Guenther
2007-10-10 11:19:12 -05:00
Günther Deschner
48ab7f4681 r16790: Fix memleak.
Guenther
2007-10-10 11:19:10 -05:00
Volker Lendecke
8a5cebc19e r16361: Fix Klocwork ID 1731 1770 1771 1775 1796
Volker
2007-10-10 11:18:49 -05:00
Jeremy Allison
face01ef01 r16284: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned
int
in a format string.
Jeremy.
2007-10-10 11:17:31 -05:00
Günther Deschner
5ecfaf7d50 r16222: Fix DEBUG statements.
Guenther
2007-10-10 11:17:26 -05:00
Günther Deschner
58a7c09003 r16221: No need for friednly error messages at log level 10.
Guenther
2007-10-10 11:17:26 -05:00
Volker Lendecke
b5602cc4f1 r16196: A bit of defensive programming:
Klocwork ID 1773 complained about oldest being dereferenced in line 2275 where
it could be NULL. I think you can construct extreme racy conditions where this
actually could happen.

Volker
2007-10-10 11:17:24 -05:00
Günther Deschner
181fa02497 r15632: Remove length limitation from the winbind cache cleanup traversal.
Guenther
2007-10-10 11:17:04 -05:00
Günther Deschner
9e15b1659c r15428: Add "smbcontrol winbind onlinestatus" for debugging purpose.
Guenther
2007-10-10 11:16:43 -05:00
Günther Deschner
e85558f4a4 r15228: Fix -n winbind option which has become meaningless with the persistent
cache.

Guenther
2007-10-10 11:16:29 -05:00
Volker Lendecke
97d2c20b0b r15132: Fix some shadowed variable warnings 2007-10-10 11:16:25 -05:00
Gerald Carter
a95d11345e r15053: fix portabilities issues between 32-bit winbind clients and a 64-bit winbindd server 2007-10-10 11:16:00 -05:00
Günther Deschner
e162253a32 r14675: Protect against null sids and rids in the cached credentials functions.
Guenther
2007-10-10 11:15:43 -05:00
Günther Deschner
24afdda2ae r14674: Further cleanup for cached logins, only dump hashes with DEBUG_PASSWORD.
Guenther
2007-10-10 11:15:43 -05:00
Jeremy Allison
8444c997bd r14393: Fix a couple of AIX warnings.
Jeremy.
2007-10-10 11:15:28 -05:00
Jeremy Allison
07d8b02d3d r14282: Change centry_string to only use talloc. Should
quieten coverity bug #194 (which I think is a
false positive).
Jeremy.
2007-10-10 11:15:23 -05:00
Günther Deschner
200d456661 r14076: When the backends trusted_domains call comes back with no trusts the
NTSTATUS code will be NT_STATUS_NO_MORE_ENTRIES. In that case store
NT_STATUS_OK in the centry so that the entry does not automatically
deleted upon startup or invalidated upon next query.

Guenther
2007-10-10 11:11:10 -05:00
Volker Lendecke
0a2aa3a48b r13984: Fix Coverity bug # 98 2007-10-10 11:11:03 -05:00
Jeremy Allison
1d710d06a2 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.
2007-10-10 11:10:59 -05:00
Günther Deschner
286f6fc233 r13409: No functional changes, just some DEBUG cleanup.
Guenther
2007-10-10 11:09:59 -05:00
Günther Deschner
a04a5e40b7 r13377: Fix from Volker: Make offline authentication work with NT4 as well
(handle no ACB_NORMAL flag and save name2sid as early as possible).

Guenther
2007-10-10 11:09:57 -05:00
Volker Lendecke
dde8322b5c r13371: Remove an unused function 2007-10-10 11:06:26 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Volker Lendecke
d62da3e987 r13309: If the sid in the winbind name2sid cache is not valid (NT_STATUS_NONE_MAPPED),
we have S-0-0 as a SID in the cache. This leads to ugly level 0 messages from
string_to_sid. Avoid them.

Volker
2007-10-10 11:06:23 -05:00
Günther Deschner
2456832a6d r12788: Since we have agreed on the case of winbindd names, we can store a
sid_to_name lookup result already after doing a sucessfull name_to_sid
lookup.

Guenther
2007-10-10 11:06:03 -05:00
Günther Deschner
348d309688 r12787: Revert last commit that removed our logic of memorizing negative
name_to_sid lookups in the cache.

Guenther
2007-10-10 11:06:03 -05:00
Günther Deschner
1e0124efc5 r12742: Don't write null sid mappings into the winbindd_cache.tdb.
Guenther
2007-10-10 11:06:02 -05:00
Günther Deschner
d50098518d r12341: add DEBUG statement.
Guenther
2007-10-10 11:05:54 -05:00
Günther Deschner
499224f02a r12193: Fix some typos.
Guenther
2007-10-10 11:05:48 -05:00
Volker Lendecke
4a4f85f0ef r11704: methods->alternate_name is not used anymore -- remove it 2007-10-10 11:05:24 -05:00
Gerald Carter
0c2bb5ba7b r11652: Reinstate the netsamlogon_cache in order to work
around failed query_user calls.  This fixes
logons to a member of a Samba domain as a user from a
trusted AD domain.

As per comments on samba-technical, I still need to add

(a) cache the PAC info as werll as NTLM net_user_info_3
(b) expire the cache when the SMB session goes away

Both Jeremy and Guenther have signed off on the idea.
2007-10-10 11:05:23 -05:00
Gerald Carter
aaed605206 r11651: After talking to Jeremy, commit my winbindd "Do the Right Thing" patch.
Still needs some more testing ni domains with multiple DCs. Coming next....
2007-10-10 11:05:22 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Gerald Carter
e1de6f238f r9588: remove netsamlogon_cache interface...everything seems to work fine. Will deal with any fallout from special environments using a non-cache solution 2007-10-10 11:03:22 -05:00
Gerald Carter
4936d6d8b2 r9330: Remove the classic dual daemon since it was not being used.
It was already gone in trunk anyways.
working on fixing BUG 3000 which does work now but we are flying
without a cache.
2007-10-10 11:00:33 -05:00
Gerald Carter
c064609b94 r9322: fixing debug log and ensuring that we set the right winbind_methods
pointer in get_cache() by requiring that all domain structure be
initialized with the set_dc_type_and_flags().
2007-10-10 11:00:33 -05:00
Günther Deschner
28b5969942 r7994: This adds support in Winbindd's "security = ads"-mode to retrieve the POSIX
homedirectory and the loginshell from Active Directory's "Services for Unix".

Enable it with:

        winbind sfu support = yes

User-Accounts without SFU-Unix-Attributes will be assigned template-based
Shells and Homedirs as before.

Note that it doesn't matter which version of Services for Unix you use (2.0,
2.2, 3.0 or 3.5). Samba should detect the correct attributes (msSFULoginShell,
msSFU30LoginShell, etc.) automatically.

If you also want to share the same uid/gid-space as SFU then also use PADL's
ad-idmap-Plugin:

        idmap backend = ad

When using the idmap-plugin only those accounts will appear in Name Service
Switch that have those UNIX-attributes which avoids potential uid/gid-space
clashes between SFU-ids and automatically assigned idmap-ids.

Guenther
2007-10-10 10:58:07 -05:00
Gerald Carter
a0ac9a8ffd r7415: * big change -- volker's new async winbindd from trunk 2007-10-10 10:57:08 -05:00
Gerald Carter
8104149e6f r6755: removing domain_sid() since it is not referenced anymore 2007-10-10 10:56:53 -05:00
Volker Lendecke
fb561fe26c r6401: Fix a debug message 2007-10-10 10:56:40 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Volker Lendecke
78975ab9a9 r4967: Not being in any domain local groups is obviously valid...
Volker
2007-10-10 10:55:10 -05:00
Volker Lendecke
a84e778caf r4760: Make wbinfo --user-sids expand domain local groups. Andrew B., my testing
shows that this info is correctly returned to us in to info3 struct, so
check_info3_in_group does not need to be adapted.

Volker
2007-10-10 10:53:54 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Tim Potter
30ae13cb9f r2822: Fix parameter confusion in priming of name-to-sid cache. Found by
Qiao Yang.
2007-10-10 10:52:53 -05:00
Volker Lendecke
11f617eafd r2351: Fix use of an uninitialized variable. valgrind is sooo useful.
Volker
2007-10-10 10:52:40 -05:00
Volker Lendecke
0a3413fbe3 r2001: Fix bug 1622. Thanks to Qiao Yang for the patch and Sven Thomsen for testing
it.

Volker
2007-10-10 10:52:27 -05:00
Gerald Carter
e9f109d1b3 r991: Allow winbindd to use the domain trust account password
for setting up an schannel connection.  This solves the problem
of a Samba DC running winbind, trusting a native mode AD domain,
and needing to enumerate AD users via wbinfo -u.
2007-10-10 10:51:53 -05:00