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

104 Commits

Author SHA1 Message Date
Volker Lendecke
5197d76faa s3: Make a debug msg more readable 2010-04-28 10:55:50 +02:00
Volker Lendecke
48251c3370 s3: Use sid_check_is_in_our_domain instead of a direct sid_peek_check_rid 2010-01-10 20:56:16 +01:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +01:00
Michael Adam
30ab3a762e s3:passdb: remove the uid_to_rid method - we only need uid_to_sid
Michael
2009-11-14 01:28:50 +01:00
Günther Deschner
1f4d26c487 s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.
Found by RPC-LSA-LOOKUPNAMES torture test.

Guenther
2009-10-20 15:28:31 +02:00
Volker Lendecke
a488334bf1 Rename LOOKUP_NAME_EXPLICIT to LOOKUP_NAME_NO_NSS
It took me a bit to understand what this flag does. I hope this is
a bit clearer, at least it is to me.
2009-07-31 23:19:05 +02:00
Michael Adam
a4bc5bfa95 s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().
With the previous code, the cache can never have been hit at all.

Michael
2009-06-26 14:15:44 +02:00
Marc VanHeyningen
75de7c0e87 s3: zero an uninitialized array
Invalid pointers were being dereferenced in lookup_sids causing
occasional seg faults.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 12:37:35 -07:00
Aravind Srinivasan
5aefb44bf0 s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.
This is very similar to be1dfff02d
2009-05-12 17:13:40 -07:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Volker Lendecke
f91565544f Fix bug 6097
A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.

Thanks to Pavel <wylda@volny.cz> for the bug report!
2009-03-24 11:59:42 +01:00
Tim Prouty
ef89c4bc0d s3 passdb: Add back some useful debug statements
Originally removed in be1dfff02d
2009-03-03 16:49:36 -08:00
Dan Sledz
be1dfff02d It appears that the first time we see a uid/gid that winbind can't map,
we end up returning the null sid instead of falling back to the legacy
code.  Next time through the code we'll hit the negative cache and do
the right thing, but we still fail the first time.

If we fail the winbind id to sid mapping, call the legacy version.  This
catches the case where we don't have a negative cache entry for the mapping.
This is better than returning the NULL sid to the caller.
2009-03-02 16:50:19 -08:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Günther Deschner
992c03a192 s4-lsa: merge lsa_LookupSids/{2,3} from s3 lsa idl.
Guenther
2008-10-27 19:33:23 +01:00
Simo Sorce
3fa16da8c7 Revert "Split lookup_name() and create a new functiong called"
This reverts commit 8594edf666.
(This used to be commit ad462e2e2d)
2008-09-03 14:36:43 -04:00
Simo Sorce
c5894e1477 Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit 8e4dca3b94)
2008-09-03 11:52:54 -04:00
Jeremy Allison
dc3f6b0861 Fix bug spotted by Simo - don't use legacy if expired entry.
Jeremy.
(This used to be commit a7bbd33139)
2008-08-26 18:05:34 -07:00
Jeremy Allison
d1f140a9ba Don't ask winbindd if we got a -ve cache entry.
Jeremy.
(This used to be commit 91f85d0dca)
2008-08-26 16:14:25 -07:00
Simo Sorce
a1de4e988d Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit e038f1cf9f)
2008-08-26 18:56:49 -04:00
Jeremy Allison
95cc5ee395 Fix the build :-(. Ask winbindd if we find a negative cache entry (or should
we just call the legacy function ?).
Jeremy.
(This used to be commit 566d3b6e76)
2008-08-26 15:51:56 -07:00
Jeremy Allison
d2f223d83d Get smbd to look (read-only) into the winbindd cache for uid/gid <--> sid mappings.
Jeremy.
(This used to be commit 31ba955d69)
2008-08-26 14:52:11 -07:00
Simo Sorce
5e7655fa27 Split lookup_name() and create a new functiong called
lookup_domain_name(). This new function accept separated
strings for domain and name.
(This used to be commit 8594edf666)
2008-08-17 19:54:41 -04:00
Volker Lendecke
e613ecbea5 Revert "Make use of sid_check_is_in_unix_users/groups"
This reverts commit cd8e63b2b4.
(This used to be commit 061e55d4f4)
2008-07-11 17:53:25 +02:00
Volker Lendecke
68071e94a5 Revert "Don't scream, better explain a bit in comments"
This reverts commit dcc39ed004.
(This used to be commit 26ca09a357)
2008-07-11 17:53:25 +02:00
Volker Lendecke
d803fa6e46 Revert "Remove an unused variable"
This reverts commit 454cb852e0.
(This used to be commit cae8ec3199)
2008-07-11 17:53:25 +02:00
Volker Lendecke
b611fd9550 Remove an unused variable
(This used to be commit 454cb852e0)
2008-07-03 16:44:13 +02:00
Volker Lendecke
d1635687ae Don't scream, better explain a bit in comments
(This used to be commit dcc39ed004)
2008-07-03 11:08:51 +02:00
Volker Lendecke
abb42b267b Make use of sid_check_is_in_unix_users/groups
Don't replicate code unnecessarily
(This used to be commit cd8e63b2b4)
2008-07-03 11:08:51 +02:00
Volker Lendecke
3643aa9a63 Fix a panic in the [ug]id2sid valgrind bug fix
Always, always run "make test" before pushing stuff :-)
(This used to be commit 1444db8be1)
2008-05-06 13:56:21 +02:00
Volker Lendecke
1fe90d8d04 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.
(This used to be commit 8717085dba)
2008-05-06 12:16:02 +02:00
Jeremy Allison
8b3004bcf9 Don't return true on talloc fail.
Jeremy.
(This used to be commit 21594cb34c)
2008-02-05 18:05:59 -08:00
Michael Adam
76e5c1f79a 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
(This used to be commit c0d9732cf4)
2008-01-25 01:42:22 +01:00
Michael Adam
60daaeeb34 Add a debug message: show the sid lookup_sid() was called for.
Michael
(This used to be commit 6c7c6c3f85)
2008-01-25 01:42:22 +01:00
Michael Adam
d682e04828 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
(This used to be commit 723e877c24)
2008-01-25 01:42:22 +01:00
Volker Lendecke
a55a08a217 Convert the [gu]id_sid cache to memcache
(This used to be commit 4baf36784f)
2007-12-23 12:43:29 +01:00
Michael Adam
9f5a16a22d Remove direct caller of secrets_fetch_trusted_domain_password().
This is a regession introduced by f7efc0eca9.
This calls pdb_get_trusteddom_pw() instead, again.

Michael
(This used to be commit 91be824d2b)
2007-12-17 14:51:37 +01:00
Michael Adam
81327b1613 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
(This used to be commit f7efc0eca9)
2007-12-17 13:06:13 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Stefan Metzmacher
adc31b9235 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 dd320c0924.
(This used to be commit cccb80b7b7)
2007-12-14 08:28:10 +01:00
Michael Adam
951466000c 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
(This used to be commit dd320c0924)
2007-12-13 10:15:13 +01:00
Michael Adam
96ea32b886 Use the proper boolean constants - the type has been
changed from BOOL to bool.

Michael
(This used to be commit 03673f2cd6)
2007-11-27 16:36:06 +01:00
Jeremy Allison
101dc36162 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.
(This used to be commit 25bbc9a661)
2007-10-26 17:58:28 -07:00
Jeremy Allison
30191d1a57 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.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Günther Deschner
39607c9129 r23630: Found out what LSA_LOOKUP_NAMES level 5 means:
only query transitive forest trusts.

Guenther
(This used to be commit e744efa1ee)
2007-10-10 12:23:38 -05:00
Gerald Carter
9b78af1f64 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.
(This used to be commit bcc8a3290a)
2007-10-10 12:22:58 -05:00
Gerald Carter
86f79c402d r23194: cherry pick two fixes from SAMBA_3_0_26
* strptime() failure check
* make legcacy sid/uid/gid calls static
(This used to be commit 3c9fb1c6f3)
2007-10-10 12:22:53 -05:00
Simo Sorce
9826a0074a r23051: sid_to_[ug]id fixes for smbd
(This used to be commit 2d636ad2a3)
2007-10-10 12:22:17 -05:00