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

76 Commits

Author SHA1 Message Date
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Günther Deschner
11ae9aff97 s3-winbind: Fixed the winbind caching. 2010-07-06 18:38:14 +02:00
Andrew Bartlett
61eb56be4e s3:winbind tidy up connecting the winbind sockets.
By putting this code inline in winbindd_setup_listeners() we remove 2
static variables and simplify the code.

By putting the get_winbind_priv_pipe_dir() in the same file, we allow
it to be reimplemented in s3compat.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-31 21:36:55 +02:00
Andrew Bartlett
8d6f88b469 s3:winbind Kill amusing but un-used winbindd_kill_all_clients
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:28 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Volker Lendecke
d53e3450c7 s3: Convert add_trusted_domains() to wb_domain_request_send() 2010-04-25 12:32:02 +02:00
Volker Lendecke
d41836fb62 s3: Simplify trustdom_state
Don't store information explicitly as boolean flags that can be easily
retrieved from the domain when it's actually needed.
2010-04-25 10:55:19 +02:00
Volker Lendecke
13cdaf9417 s3: Make "struct trustdom_state" its own talloc context 2010-04-25 10:55:19 +02:00
Günther Deschner
4b1dab5b11 s3-winbind: fix setup_domain_child() callers.
Volker, please check.

Guenther
2010-04-23 12:17:25 +02:00
Volker Lendecke
c82fd3ed30 s3: Fix a winbind crash when scanning trusts
add_trusted_domain() for a new domain always needs to be followed by a
setup_domain_child(). This was not always done, in particular not when walking
to the forest root for additional trusts.

This is a minimal patch, we need to fix add_trusted_domain().
2010-04-23 10:35:52 +02:00
Volker Lendecke
3d5732fc13 s3: Remove the separate "child" argument from setup_domain_child() 2010-04-08 15:12:42 +02:00
Volker Lendecke
a66341b993 s3: simplify find_root_domain, find_our_domain() never fails 2010-01-02 12:09:05 +01:00
Volker Lendecke
133f023d58 s3: Use global_sid_Builtin in find_builtin_domain 2010-01-02 12:09:05 +01:00
Volker Lendecke
92345f49e3 s3: Avoid adding a domain twice
If we found a match with sid==NULL, we ended up adding the domain twice
2010-01-02 12:09:05 +01:00
Volker Lendecke
22a4a000ce s3: Make free_domain_list() static 2010-01-02 12:09:05 +01:00
Volker Lendecke
d05e17f875 s3: Introduce domain_is_forest_root() helper function
Hopefully this makes the flag tests a bit more understandable
2010-01-02 12:09:05 +01:00
Volker Lendecke
634d084517 s3: Replace IS_DOMAIN_OFFLINE by a function 2009-12-26 12:26:07 +01:00
Volker Lendecke
03617df24d s3: winbindd_cli_state->getgrent_state is no longer used 2009-12-26 12:26:06 +01:00
Volker Lendecke
6dc924fcf3 s3: Remove some unused code 2009-12-23 12:02:19 +01:00
Steven Danneman
5469866242 s3/winbindd: Remove unnecessary check for NULL SID
There's a known bug in some Windows implementations of
DsEnumerateDomainTrusts() where domain SIDs are not returned for
transitively trusted domains within the same forest.

Jerry originally worked around this in the winbindd parent by checking
for S-0-0 and converting it to S-1-0 in 8b0fce0b.  Guenter later moved
these checks into the child process in commit 3bdfcbac making the
initial patch unecessary.

I've removed it and added a clarifying comment to the child process.

If ever this SID is needed we could add an extra DsEnumerateDomainTrusts()
call in trusted_domains() as suggested by the Microsoft KB.
2009-08-26 16:34:09 -07:00
Volker Lendecke
1603c608c9 s3:winbind: Even on a domain controller, "our" domain is internal
It happens to be what we also share out via NETLOGON/SAMR, but winbind has
direct access to it via the passdb domain methods
2009-08-23 10:19:32 +02:00
Volker Lendecke
963419be1b s3:winbind: For internal domains it is pointless to connect to a DC 2009-08-23 10:19:32 +02:00
Volker Lendecke
886e183b0e s3:winbind: Add const to normalize_name_map 2009-08-16 12:38:19 +02:00
Volker Lendecke
4f147388c0 Refactor 9b78af1f: Fix lookupname recursion
Pass a "flags" argument instead of the original winbind command down the
name_to_sid chain. This way we are independent of the winbind commands and
can take the decision at a much higher level
2009-08-02 11:24:48 +02:00
Volker Lendecke
ac94a8b0e3 Place a comment correctly 2009-08-01 10:33:15 +02:00
Bo Yang
b180fe34a7 s3: compile warning and upn handling
Signed-off-by: Bo Yang <boyang@samba.org>
2009-07-18 10:47:45 +08:00
Volker Lendecke
97ba4f6efd Make winbindd_cli_state->response a pointer instead of a struct member
Same comment as in baa6084378: This is just a preparatory checkin.

Volker
2009-06-14 22:22:10 +02:00
Volker Lendecke
07fac35b3b Make rescan_trusted_domains a timed event 2009-06-14 11:25:48 +02:00
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