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

48 Commits

Author SHA1 Message Date
Volker Lendecke
d61f3626b7 Remove unused init_child_connection() 2009-06-14 11:25:47 +02:00
Volker Lendecke
9b06c27cdb Convert the winbind parent->child communication to wb_reqtrans 2009-06-14 11:25:47 +02:00
Volker Lendecke
baa6084378 Make winbindd_cli_state->request a pointer instead of a struct member
In itself, this is pretty pointless. But in the next steps I'll convert the
winbind internal communication to wb_reqtrans which allocates the request
properly. This minimizes the later diff.

Volker
2009-06-14 11:25:44 +02:00
Michael Adam
3a853448ce s3:winbind_util: remove trailing spaces
Michael
2009-05-25 22:16:47 +02:00
Volker Lendecke
de6ddda45e Fix some nonempty blank lines 2009-05-11 23:08:30 +02:00
Stefan Metzmacher
0685031ccf s3:winbindd: remove unused close_winbindd_socket() function
metze
2009-03-18 07:00:41 +01:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Gerald (Jerry) Carter
5aadfe29f0 Fix "allow trusted domain" so it disables trusted domains. 2008-12-22 11:07:29 -08:00
Jeremy Allison
e4f5bfb34b Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.
This API is unusual in that if used to remove a non-list head it nulls out
the next and prev pointers. This is what you want for debugging (don't want
an entry removed from the list to be still virtually linked into it) but
means there is no consistent idiom for use as the next and prev pointers
get trashed on removal from the list, meaning you must save them yourself.
You can use it one way when deleting everything via the head pointer, as
this preserves the next pointer, but you *must* use it another way when not
deleting everything via the head pointer. Fix all known uses of this (the main
one is in conn_free_internal() and would not free all the private data entries
for vfs modules. The other changes in web/statuspage.c and winbindd_util.c
are not strictly neccessary, as the head pointer is being used, but I've done
them for consistency. Long term we must revisit this as this API is too hard
to use correctly.
Jeremy.
2008-10-01 13:15:54 -07:00
Andrew Tridgell
86612b1163 re-added "winbind:ignore domains" patch
This option really is essential, as we discover again and again at
customer sites. Due to bugs in winbind some domains are toxic. When
you are installing at a site and a particular domain in a complex
setup causes winbind to segfault or hang then you need a way to
disable that domain and continue.

In an ideal world winbind could handle arbitrarily complex ADS
domains, but we are nowhere near that yet. If we ever get to that
stage then we won't need this option.
2008-09-29 14:01:01 +02:00
Michael Adam
1b9c2ccb1f [s3]winbindd_util: add fill_domain_username_talloc().
A talloc version of fill_domain_username().

Michael
2008-09-23 10:00:26 +02:00
Michael Adam
6c8c5d7113 [s3]winbind_util: fix an implicit cast compile warning.
Michael
2008-09-23 10:00:25 +02:00
Gerald (Jerry) Carter
d6de32db2f winbindd: Add support for name aliasing.
* Add support user and group name aliasing by expanding
  the ws_name_replace() and ws_name_return() functions.
  The lookup path is
     aliases -> qualified name -> SID
     SID -> fully qualified name -> alias
  In other words, the name aliasing support is a thin layer
  built on top of SID/NAME translation.

* Rename the ws_name_XX() functions to normalize_name_map()
  and normalize_name_unmap().  Chaneg interface to return
  NTSTATUS rather than char *.

* Add associated cache validation functions.
2008-09-16 10:27:49 -07:00
Simo Sorce
f25863e04c Fix for bug 5571
Make sure that usernames are parsed using the correct separator.
Otherwise group memeberships in winbind may be result broken.
(This used to be commit 20b9c0aa7b)
2008-09-11 09:51:39 -04:00
Günther Deschner
66fa77ba9e winbindd: move set_auth_errors to util functions.
Guenther
(This used to be commit ae3fa60c45)
2008-08-25 13:18:01 +02:00
Jeremy Allison
79150da70b Here is a re-working of the winbindd
reconnect code to cope with rebooting a DC. This
replaces the code I asked Volker to revert.
The logic is pretty simple. It adds a new parameter,
"winbind reconnect delay", set to 30 seconds by
default, which determines how long to wait between
connection attempts.
To avoid overwhelming the box with DC-probe
forked children, the code now keeps track of
the DC probe child per winbindd_domain struct
and only starts a new one if the existing one
has died.
I also added a little logic to make sure the
dc probe child always sends a message whatever
the reason for exit so we will always reschedule
another connect attempt.
Also added documentation.
Jeremy.
(This used to be commit 8027197635)
2008-08-20 16:24:22 -07:00
Herb Lewis
63ff9e0081 I think the problem with these functions is that lookup_usergroups
should never include the user SID.
The comment for the function in winbindd/winbindd_ads.c says
/* Lookup groups a user is a member of. */
The following patch makes the wbinfo calls return the correct data
before and after a login.
wbinfo --user-domgroups and --user-sids
(This used to be commit 7849938906)
2008-08-15 15:28:23 -07:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fc)
2008-08-12 11:28:29 +02:00
Jeremy Allison
2a4b8fa664 Fix bug #5533. Winbindd fails to cope correctly with a workgroup name containing a '.'.
Jeremy.
(This used to be commit 96325ff44d)
2008-06-20 12:49:14 -07:00
Jeremy Allison
346dbc62b8 Split the winbindd_passdb backend into a 'builtin' and a 'sam'
backend. This allows winbindd when running on a Samba PDC to
correctly answer wbinfo -u lists and other queries.
Jeremy.
(This used to be commit e61ad0c158)
2008-05-30 23:49:36 -07:00
Jeremy Allison
433a05c1ab Fix winbindd on a PDC by reverting : 83b04c60fac76ccd2d5aecb14f8896a07d488b1f..6e66512d5beb256a44c6703cdb8c7fa7e0fd8537.
We still need to address https://bugzilla.redhat.com/show_bug.cgi?id=429024, but this
will come later.
Jeremy.
(This used to be commit 41e20becf3)
2008-05-29 10:37:52 -07:00
Günther Deschner
bea4541e11 Use sid_array_from_info3 in lookup_usergroups_cached().
Guenther
(This used to be commit 65b4cb20ea)
2008-04-04 02:53:40 +02:00
Steven Danneman
223071f01d Forest root trust flags won't overwrite child trust flags
* changed the behavior of winbind_ads.c:trusted_domains() to not overwrite
existing trust information if we're joined to a child domain, and querying the
forest root domain.  Previously if we were joined to a child domain, we'd
request all known trust information from this child domain (our primary domain)
and store it in the tdc.  We'd then request all trust information from our tree
root (to get the forests we transitively trust) and overwrite the existing trust
information we already had from the perspective of the tree root.

* updated several comments and fixed typos
(This used to be commit 6aac972d79)
2008-03-31 13:40:58 -05:00
Günther Deschner
c25958a046 Use netr_SamInfo3 everywhere in winbindd.
Guenther
(This used to be commit d9502eb753)
2008-02-17 02:12:00 +01:00
Simo Sorce
2fffc9a1b1 Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 7dbfc7bdc6)
2008-02-01 14:24:31 -05:00
Simo Sorce
93a3c5b3f9 Fix winbindd running on a Samba DC,
This patch make sure we do not try to contact smbd in the main dameon
to avoid deadlocks.
All the operations that require connecting to smbd are performed in
the domain child anyway.
(This used to be commit 9347d34b50)
2008-02-01 14:23:43 -05:00
Günther Deschner
80b2e330f9 Remove include/rpc_ds.h and all references to it completly.
Jerry, please have a look if you're fine with that.

Guenther
(This used to be commit beae25c808)
2008-01-29 17:51:05 +01:00
Gerald W. Carter
235deb1b66 Always trust the domain flags in the wcache trusted domain cache.
Use the flags stored in the tdb when determining if a domain can
be contacted.  The tdb should be considered authoratative anyways unless
you know the flags in the winbindd_domain are correct (such as when
first enumerating trusts).

Original suggestion and patch from Steven Danneman <steven.danneman@isilon.com>.
Manually rewritten by me for 3.2.
(This used to be commit f53658a20d)
2008-01-25 12:29:47 -06:00
Michael Adam
3ca606731b Fix winbindd_can_contact_domain() on a samba DC.
The check for inbound trusts is invalid when samba is a DC
and has a trust with an active directory domain.

This effectively prevented tusts with an AD domain on a
samba DC from working (unless using "winbindd rpc only"),
because an ads_connect() was never performed. Only the
rpc-based winbindd methods were working properly.

Jerry: Please check!

Michael
(This used to be commit dcd42a1e06)
2008-01-25 16:43:21 +01:00
Michael Adam
2a542ce772 Add a debug message winbindd_can_contact_domain()
explaining the reason for failure.

Michael
(This used to be commit ba5373ed7f)
2008-01-25 01:42:22 +01:00
Michael Adam
614ba32b22 Fix assignment to request->data.init_conn.is_primary in init_child_connection().
The present assignment
"request->data.init_conn.is_primary = domain->internal ? False : True"
simply feels wrong. This seems to be the thing right to do:
"request->data.init_conn.is_primary = domain->primary ? true : false".

The question is: Does this have any purpose at all?
data.init_conn.is_primary seems to be used nowhere
in the whole code at all.

Is it (still) needed?

Michael
(This used to be commit 8bb21b8b38)
2008-01-25 01:42:22 +01:00
Michael Adam
3b83f49158 Initialize _domain_list to NULL.
Just to be sure the "if (!_domain_list)" in domain_list() test always works.

Michael
(This used to be commit 1f49065d44)
2008-01-23 13:52:42 +01:00
Michael Adam
f3603d5a5a Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
Michael
(This used to be commit 6b2b9a60ef)
2008-01-09 01:47:10 +01:00
Gerald (Jerry) Carter
84a50e2154 Fix the inherited trust flags when spidering the trust heirarchy.
Also *do not* clear the trust list when rescanning or else it is possible
to suffer from a race condition where no trusted domains can be found.
(This used to be commit e7164a252b)
2008-01-04 13:35:41 -06:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba776)
2007-12-15 22:47:30 +01:00
Volker Lendecke
d899b8c56a Use sid_to_string directly
It seems a bit pointless to do a fstrcpy(dst, sid_string_static(src))
(This used to be commit c221c246b1)
2007-12-15 22:09:36 +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
873f14ae40 winbindd: move domain child specific stuff into its own file
metze
(This used to be commit 075d315e0f)
2007-12-14 08:28:35 +01:00
Volker Lendecke
78c6ee0090 Remove some globals
(This used to be commit 31d0a846db)
2007-12-05 14:39:07 +01:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Stefan Metzmacher
3d9a578064 r25571: split up child_dispatch_table into domain, idmap and locator tables
metze
(cherry picked from commit abbb36a37c)
(This used to be commit 5af1b45ed3)
2007-10-22 08:46:11 +02: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
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Stefan Metzmacher
3c3b9afe7f r25571: split up child_dispatch_table into domain, idmap and locator tables
metze
(This used to be commit abbb36a37c)
2007-10-10 12:31:15 -05:00
Stefan Metzmacher
8ad2246635 r25260: add trusted domains always to the end of the list.
Now BUILTIN is always the first domain followed
by the domain of our own SAM DB and the primary
domain (in member server mode).

metze
(This used to be commit b8d67b78aa)
2007-10-10 12:30:56 -05:00
Stefan Metzmacher
1edf050ad8 r25241: remove sequence_number out of WINBINDD_DOMAIN_INFO call
as this is always answered by the winbindd parent and will
most times return old sequence number values.

metze
(This used to be commit 9caf54c868)
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
0805a4bc71 r25236: make it possible to alter WINBINDD_SOCKET_DIR via
"winbindd:socket dir=/path/to/dir" for usage in make test

metze
(This used to be commit 5566cf01e8)
2007-10-10 12:30:52 -05:00
Stefan Metzmacher
28aa4bff8d r25154: move winbindd code into winbindd/
metze
(This used to be commit 3ac7566ae1)
2007-10-10 12:30:46 -05:00