1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

75 Commits

Author SHA1 Message Date
Volker Lendecke
1444db8be1 Fix a panic in the [ug]id2sid valgrind bug fix
Always, always run "make test" before pushing stuff :-)
2008-05-06 13:56:21 +02:00
Volker Lendecke
8717085dba Fix a valgrind bug in the new [ug]id2sid cache
When we're given a SID, it is not always padded with zeros. Only look at the
initialized parts in the SID.
2008-05-06 12:16:02 +02:00
Jeremy Allison
21594cb34c Don't return true on talloc fail.
Jeremy.
2008-02-05 18:05:59 -08:00
Michael Adam
c0d9732cf4 Fix lookup_sids to detect unix_groups and unix_users domain sids.
This fixes panics in wbcLookupRids when 1-2-22 was passed as a
domain sid.

Michael
2008-01-25 01:42:22 +01:00
Michael Adam
6c7c6c3f85 Add a debug message: show the sid lookup_sid() was called for.
Michael
2008-01-25 01:42:22 +01:00
Michael Adam
723e877c24 Add a debug message to lookup_rids() printing the domain SID.
This is to ease debugging. I sporadically get panics that are
apparently due to NULL domain sid passed to lookup_rids somewhere.

Michael
2008-01-25 01:42:22 +01:00
Volker Lendecke
4baf36784f Convert the [gu]id_sid cache to memcache 2007-12-23 12:43:29 +01:00
Michael Adam
91be824d2b Remove direct caller of secrets_fetch_trusted_domain_password().
This is a regession introduced by f7efc0eca9426e63b751c07a90265a12bb39cf95.
This calls pdb_get_trusteddom_pw() instead, again.

Michael
2007-12-17 14:51:37 +01:00
Michael Adam
f7efc0eca9 Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames.
This patch is still incomplete in that winbindd does not walk
the the trusted domains to lookup unqualified names here.
Apart from that this fix should be pretty much complete.

Michael
2007-12-17 13:06:13 +01:00
Volker Lendecke
bb35e794ec Replace sid_string_static by sid_string_dbg in DEBUGs 2007-12-15 22:09:36 +01:00
Stefan Metzmacher
cccb80b7b7 Revert "Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames."
As it breaks all tests which try to join a new machine account.
So more testing is needed...

metze

This reverts commit dd320c0924ce393a89b1cab020fd5cffc5b80380.
2007-12-14 08:28:10 +01:00
Michael Adam
dd320c0924 Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames.
This is a first patch aimed at fixing bug #4801.
It is still incomplete in that winbindd does not walk
the the trusted domains to lookup unqualified names here.
Apart from that this fix should be pretty much complete.

Michael
2007-12-13 10:15:13 +01:00
Michael Adam
03673f2cd6 Use the proper boolean constants - the type has been
changed from BOOL to bool.

Michael
2007-11-27 16:36:06 +01:00
Jeremy Allison
25bbc9a661 Ensure temporary memory is freed - pointed out by "Li, Ying (ESG)" <ying.li2@hp.com>.
We aren't currently leaking memory, but are leaving it around for
longer than we need to.
Jeremy.
2007-10-26 17:58:28 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Günther Deschner
e744efa1ee r23630: Found out what LSA_LOOKUP_NAMES level 5 means:
only query transitive forest trusts.

Guenther
2007-10-10 12:23:38 -05:00
Gerald Carter
bcc8a3290a r23244: Fix loop with nscd and NSS recusive calls.
> Here's the problem I hit:
>
> getgrnam("foo") -> nscd -> NSS -> winbindd ->
>   winbindd_passdb.c:nam_to_sid() -> lookup_global_sam_name() ->
>   getgrnam("foo") -> nscd -> ....
>
> This is in the SAMBA_3_0 specifically but in theory could happen
> SAMBA_3_0_25 (or 26) for an unknown group.
>
> The attached patch passes down enough state for the
> name_to_sid() call to be able to determine the originating
> winbindd cmd that came into the parent.  So we can avoid
> making more NSS calls if the original call came in trough NSS
> so we don't deadlock ?  But you should still service
> lookupname() calls which are needed for example when
> doing the token access checks for a "valid groups" from
> smb.conf.
>
> I've got this in testing now.  The problem has shown up with the
> DsProvider on OS X and with nscd on SOlaris and Linux.
2007-10-10 12:22:58 -05:00
Gerald Carter
3c9fb1c6f3 r23194: cherry pick two fixes from SAMBA_3_0_26
* strptime() failure check
* make legcacy sid/uid/gid calls static
2007-10-10 12:22:53 -05:00
Simo Sorce
2d636ad2a3 r23051: sid_to_[ug]id fixes for smbd 2007-10-10 12:22:17 -05:00
Gerald Carter
51aac0fcb4 r22977: Trim noise by removing redundant WARNING log message that
would flood at log level 2.  We know when we're using the legacy
mapping code anyways since it will log an informative msg.
2007-10-10 12:22:12 -05:00
Volker Lendecke
d4c5d5ffb3 r22613: Fix an uninitialized variable warning 2007-10-10 12:19:50 -05:00
Jeremy Allison
8968808c3b r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
f3ffb3f984 r22096: become_root_uid_only() is unneeded - it's only used in
messages.c. Refactor to use become_root() instead and
make it local to messages.c
Jeremy.
2007-10-10 12:19:11 -05:00
Volker Lendecke
d0d16cc55a r21853: Fix a valgrind error 2007-10-10 12:18:38 -05:00
Volker Lendecke
a2dc1f62fd r21782: Fix a memleak 2007-10-10 12:18:33 -05:00
Volker Lendecke
3c879745cf r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs.

Thanks to Michael Adam <ma@sernet.de>

Volker
2007-10-10 12:17:10 -05:00
Volker Lendecke
902d81becb r20212: Attempt to fix the Solaris build 2007-10-10 12:16:32 -05:00
Simo Sorce
4a81ee9608 r20169: Support for fallback to legacy mapping code was not completely tested.
Add necessary fixes.
2007-10-10 12:16:28 -05:00
Simo Sorce
50cd8bffee r20116: Start merging in the work done to create the new idmap subsystem.
Simo.
2007-10-10 12:16:25 -05:00
Volker Lendecke
eba404e668 r19945: Fix a segfault -- lookup_rids needs to init the names even on failure 2007-10-10 12:16:14 -05:00
Gerald Carter
5b3ac400a7 r19579: BUG 4075: patch from Dmitry Butskoy <dmitry@butskoy.name>.
Allow smbd to use winbindd to lookup uids/gids outside the
idmap range if 'winbind trusted domains only = yes'
2007-10-10 12:15:42 -05:00
Volker Lendecke
d72ba9ed12 r18527: Janitor for Jeremy ;-) 2007-10-10 11:51:46 -05:00
Jeremy Allison
f787b9d156 r18483: Ensure all pdb_XXX calls are wrapped in become_root()/unbecome_root()
pairs. Should fix bug #4097.
Jeremy.
2007-10-10 11:51:44 -05:00
Gerald Carter
3da9f80c28 r18271: Big change:
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.
2007-10-10 11:51:18 -05:00
Gerald Carter
fa05708789 r17971: Disable storing SIDs in the S-1-22-1 and S-1-22-2 domain to the SID<->uid/gid cache. FIxes a bug in token creation 2007-10-10 11:39:44 -05:00
Gerald Carter
dda0b8bce6 r17709: Fix cut-n-paste error with the name of gid_to_unix_group_sid(). 2007-10-10 11:38:46 -05:00
Gerald Carter
dde552336c r17669: Remove RID algorithm support from unmapped users and groups
when using smbpasswd
2007-10-10 11:38:45 -05:00
Volker Lendecke
761cbd52f0 r17554: Cleanup 2007-10-10 11:38:38 -05:00
Volker Lendecke
f9856f6490 r17463: A bit of cleanup work:
Remove some unused code: pdb_find_alias is not used anymore, and nobody I
think has ever used the pdb_nop operations for group mapping. smbpasswd and
tdb use the default ones and ldap has its own.

Make the functions pdb_getgr* return NTSTATUS instead of BOOL. Nobody right
now really makes use of it, but it feels wrong to throw away information so
early.

Volker
2007-10-10 11:38:36 -05:00
Volker Lendecke
873a5a1211 r17451: Change pdb_getgrsid not to take a DOM_SID but a const DOM_SID * as an
argument.

Volker
2007-10-10 11:38:34 -05:00
Jeremy Allison
b5f0b1b644 r17407: Don't do strchr_m twice when once will do.
Jeremy.
2007-10-10 11:38:32 -05:00
Volker Lendecke
255475901c r17406: We need to do a translation of winbind separator -> '\\' in
lookup_name_smbconf, otherwise

force user = domain+administrator

can not work. Also attempt to fix the 'valid users = domain+group' bug at the
same time.

Volker
2007-10-10 11:38:32 -05:00
Volker Lendecke
250b9f3531 r17404: Is this XP (extreme programming)? :-)
With lp_workgroup we end up with remote names again...

Volker
2007-10-10 11:38:32 -05:00
Gerald Carter
63325b3687 r17403: add a helpful debug msg 2007-10-10 11:38:32 -05:00
Jeremy Allison
1e1fcb5eb2 r17402: Added lookup_name_smbconf() to be called when looking
up names from smb.conf. If the name is unqualified it
causes the lookup to be done in WORKGROUP\name, then
"Unix [users|groups]"\name rather than searching the
domain. Should fix the problems with "force user"
selecting a domain user by preference.
Jeremy.
2007-10-10 11:38:31 -05:00
Volker Lendecke
03e9924f5c r17075: Even without talloc_steal you can still create memory problems.... ;-) 2007-10-10 11:38:10 -05:00
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
Volker Lendecke
84913caebd r16866: No idea why I did not see the warning, sorry.... 2007-10-10 11:19:12 -05:00