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

501 Commits

Author SHA1 Message Date
Günther Deschner
c48186f507 s3: use samba4 prototype for ndr_push/pull_struct_blob.
Guenther
2008-09-23 09:37:23 +02:00
Gerald (Jerry) Carter
7d5fb989ac idmap_adex: Add new idmap plugin for support RFC2307 enabled AD forests.
The adex idmap/nss_info plugin is an adapation of the Likewise
Enterprise plugin with support for OU based cells removed
(since the Windows pieces to manage the cells are not available).

This plugin supports

  * The RFC2307 schema for users and groups.
  * Connections to trusted domains
  * Global catalog searches
  * Cross forest trusts
  * User and group aliases

Prerequiste: Add the following attributes to the Partial Attribute
Set in global catalog:

  * uidNumber
  * uid
  * gidNumber

A basic config using the current trunk code would look like

 [global]
      idmap backend = adex
      idmap uid = 10000 - 19999
      idmap gid = 20000 - 29999
      idmap config US:backend = adex
      idmap config US:range = 20000 - 29999
      winbind nss info = adex

       winbind normalize names = yes
       winbind refresh tickets = yes
       template homedir = /home/%D/%U
       template shell = /bin/bash
2008-09-22 15:46:19 -07:00
Gerald (Jerry) Carter
28d2683903 * Allow an admin to define the "uid" attribute for a RFC2307
user object in AD to be the username alias.

For example:

  $ net ads search "(uid=coffeedude)"
  distinguishedName: CN=Gerald W. Carter,CN=Users,DC=pink,DC=plainjoe,DC=org
  sAMAccountName: gcarter
  memberOf: CN=UnixUsers,CN=Users,DC=pink,DC=plainjoe,DC=org
  memberOf: CN=Domain Admins,CN=Users,DC=pink,DC=plainjoe,DC=org
  memberOf: CN=Enterprise Admins,CN=Users,DC=pink,DC=plainjoe,DC=org
  memberOf: CN=Schema Admins,CN=Users,DC=pink,DC=plainjoe,DC=org
  uid: coffeedude
  uidNumber: 10000
  gidNumber: 10000
  unixHomeDirectory: /home/gcarter
  loginShell: /bin/bash

  $ ssh coffeedude@192.168.56.91
  Password:

  coffeedude@orville:~$ id
  uid=10000(coffeedude) gid=10000(PINK\unixusers) groups=10000(PINK\unixusers)

  $ getent passwd PINK\\gcarter
  coffeedude:*:10000:10000::/home/gcarter:/bin/bash

  $ getent passwd coffeedude
  coffeedude:*:10000:10000::/home/gcarter:/bin/bash

  $ getent group PINK\\Unixusers
  PINK\unixusers10000:coffeedude
2008-09-16 10:35:21 -07:00
Gerald (Jerry) Carter
63554b4078 idmap_hash: Add the idmap/nss-info provider from Likewise Open.
* Port the Likewise Open idmap/nss_info provider (renamed to
  idmap_hash).

* uids & gids are generated based on a hashing algorithm that collapse
  the Domain SID to a 31 bit number.  The reverse mapping from the
  high order 11 bits to the originat8ing sdomain SID is stored in
  a has table initialized at start up.

* Includes support for "idmap_hash:name_map = <filename>" for the
  name aliasing layer.  The name map file consist of entries in
  the form "alias = DOMAIN\name"
2008-09-16 10:28:11 -07:00
Gerald (Jerry) Carter
544cd1b4b9 winbindd: Update the calls to ws_name_XX() to reflect API changes.
* Ensures that all points an which a name is received or returned
  to/from a client passes through the name aliases layer (users
  and groups).
2008-09-16 10:27:59 -07: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
Gerald W. Carter
62791bbd03 idmap_ad: Fix a segfault when calling nss_get_info() with a NULL ads structure. 2008-09-15 17:18:23 -05: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
ce9d896781 Revert "winbindd: the ad trusted_domains call should return talloced strings."
This reverts commit b57cbf62e8.
(This used to be commit b2a3f13e5b)
2008-09-05 23:29:54 +02:00
Qiao Yang
38c287740f Fix a memleak
request.extra_data is not freed if there is no extra_data in response or
when there is some error happens in processing. This patch will free the
buffer right after processing a request before sending back a response.
(This used to be commit be6f12273f)
2008-09-05 14:13:39 +02:00
James Ding
72df999759 Fix winbindd crash bug with trusted domains. Bug #5736
(This used to be commit d4f5caa3d3)
2008-09-04 15:13:12 -07:00
Herb Lewis
24992010cb get rid of unneeded argument in get_methods and get_alloc_methods
(This used to be commit 07b0323472)
2008-09-04 14:35:27 -07:00
Steven Danneman
304554115a Cleanup of DC enumeration in get_dcs()
This is a fix for a few small inefficiencies/bugs in the get_dcs() path.

* because the third add_one_dc_unique() loop was outside the ADS check all DCs
  returned from the non-sitename lookup were being tacked onto the dc_name_ip
  list twice.
* add_one_dc_unique() now checks if the given IP address already exists before
  adding it to the list, making the returned list actually unique
* added more thorough doxygen comment headers
(This used to be commit cb2d488e1d)
2008-09-04 11:50:25 -07: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
Günther Deschner
aac60fead2 winbindd: the ad trusted_domains call should return talloced strings.
Guenther
(This used to be commit b57cbf62e8)
2008-09-02 21:53:04 +02:00
Volker Lendecke
ec4015d34f Fix Coverity ID 592
The scanner did not figure out that we always have a primary domain, so it
complained about us potentially passing a NULL pointer down to
set_domain_online_request() where it is dereferenced.

Make the code a bit clearer.
(This used to be commit e6e8d108f9)
2008-08-31 11:36:27 +02:00
Günther Deschner
52e23fe460 winbindd: fix invalid sid copy (hit when enumerating sibling domains).
Guenther
(This used to be commit 5eee742335)
2008-08-28 12:29:52 +02:00
Jeremy Allison
29af730964 Fix the wcache_invalidate_samlogon calls.
Jeremy.
(This used to be commit 7c820899ed)
2008-08-27 17:29:10 -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
Volker Lendecke
13c66c8eb1 Move idmap_cache.c from winbindd/ to lib/
(This used to be commit fe70dcc1b6)
2008-08-26 12:56:47 -07:00
Günther Deschner
e682f09da5 winbindd: use set_auth_errors() in winbindd_dual_check_machine_acct as well.
Guenther
(This used to be commit bb9c59e892)
2008-08-25 13:18:02 +02: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
Günther Deschner
fd5b2f4206 winbindd: only create machine pwd change event when in primary domain child.
Guenther
(This used to be commit 543dfdc1cf)
2008-08-25 11:37:57 +02:00
Volker Lendecke
d7d3b37d56 Fix some nonempty blank lines
(This used to be commit 541e088656)
2008-08-23 15:12:10 +02:00
Volker Lendecke
c33e648fa5 Use talloc_stackframe() in machine_password_change_handler
(This used to be commit 79103000b1)
2008-08-23 13:19:35 +02:00
Volker Lendecke
03dfaf37fd Fix a memleak in calculate_next_machine_pwd_change
(This used to be commit 5314f06dcd)
2008-08-23 13:19:35 +02:00
Günther Deschner
6e89443eba winbindd: add event based machine password change.
Guenther
(This used to be commit 15b72d44cb)
2008-08-23 13:19:35 +02:00
Jeremy Allison
4a5ccfb91f Don't re-initialize a token when we already have one. This fixes the build farm failures when winbindd connects as guest.
This one took a *lot* of tracking down :-).
Jeremy.
(This used to be commit dca8277912)
2008-08-22 13:49:46 -07:00
Gerald (Jerry) Carter
5571bd2913 idmap_gid_to_sid: Fix a cut-a-npaste error.
The call was looking up a uid and not gid in the cache.
(This used to be commit 25293ba150)
2008-08-22 14:54:50 -05:00
Gerald (Jerry) Carter
7e0314f6a2 winbindd: Fix crash in cm_connect_sam()
Fix segv when talking to parent DC (joined to child domain).

The root cause was

(a) storing the parent domain in the cli_state struct caused
    the NTLMSSP pipe bind to fail which made us fallover to
    the schannel code path
(b) the dcinfo pointer in cm_get_schannel_dcinfo() was returning
    NULL even though the function indicated success.
(This used to be commit 5ce4a2ae66)
2008-08-22 14:50:58 -05: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
Günther Deschner
477e6bb40d winbindd: consistently use false/true.
Guenther
(This used to be commit e8619121d1)
2008-08-19 22:01:00 +02:00
Günther Deschner
d9484d4331 winbindd: use set_auth_errors (avoid code duplication).
Guenther
(This used to be commit ae35a5110e)
2008-08-19 22:00:48 +02:00
Günther Deschner
4289e4b878 winbindd: fill_in_password_policy (to avoid redundant code).
Guenther
(This used to be commit dbfa7ba14c)
2008-08-19 22:00:36 +02:00
Günther Deschner
9f28b99ba8 winbindd: kill some trailing/leading whitespace.
Guenther
(This used to be commit b5bb784495)
2008-08-19 15:20:07 +02: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
Jeremy Allison
ee6c02f7c8 Fix bug 5696. The problem was when smbd
was asking for a winbindd name to SID lookup of
"Unix Group\name" where "name" was also a valid username,
the winbindd passdb lookup of that name was losing the
domain string info before calling lookup name (ie. lookup_name()
was being called with just the string "name", not the
full string "Unix Group\name").

The passdb backend of winbindd has to cope with
not only names from it's own global SAM domain,
but it does lookups for BUILTIN and "Unix User"
and "Unix Group" also, so making it guess by
losing the domain string is "A Bad Idea" (tm) :-).

Note that as winbind globally calls winbind_off()
at startup, it's safe for winbind to call sys_getgrnam()
to do the "Unix Group" lookup from inside lookup_name().

Jeremy.
(This used to be commit 5293af6c3c)
2008-08-16 19:23:38 -07:00
Volker Lendecke
165f5c0c0a Attempt to fix Coverity ID 596
Jeremy, please check & push if it's ok.
(This used to be commit f06070c188)
2008-08-16 10:38:39 -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
e90dc23ff5 Revert "Add winbind:online check timeout parameter"
This reverts commit 9920473cc1.
(This used to be commit 34a32db906)
2008-08-14 11:09:37 +02:00
Andrew Tridgell
4d76ed4f38 use transactions in idmap_tdb2
(This used to be commit 32b8db2765)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Andrew Tridgell
9c79d1c23e got rid of the redundent cache database
(This used to be commit 126f4ac8e8)
2008-08-13 11:54:08 +02:00
Michael Adam
620d873183 idmap tdb2: fix inconsistent mappings by checking for race and retrying to fetch mapping.
Michael
(This used to be commit cb4c74c9c2)
2008-08-13 11:54:08 +02:00
Michael Adam
134ea91278 idmap tdb2: fix broken logic in tdb2_delete_bystring().
1. use the return value that idmap_tdb2_open_perm_db() gives us
2. don't delete frep the local db if deleting from the perm db failed.
3. fix wrong interpretation of return value of the local delete

Michael
(This used to be commit 147573d7f6)
2008-08-13 11:54:07 +02:00
Michael Adam
6afa8e573e idmap tdb2: fix broken logic in tdb2_store_bystring().
1. use the return value that idmap_tdb2_open_perm_db() gives us
2. don't write to the local db if writing to the perm db failed.
3. fix wrong interpretation of return value of the local store

Michael
(This used to be commit be8c6b4f2f)
2008-08-13 11:54:07 +02:00
Volker Lendecke
5a3642d5aa Add winbind:online check timeout parameter
This is a band-aid for the rather convoluted offline/online mess in winbind
right now. Winbind re-uses the offline functionality that is targeted at domain
client installations on laptops to not overload disfunctional DCs. It uses the
winbind cache timeout as the retry timeout after a DC reboot.

I am using a parametric options because when this mess is cleaned up, that
parameter needs to go away again.

I'd recommend to use something like

winbind:online check timeout = 30

in typical LAN environments. This means a reconnect is attempted every 30
seconds.

Volker
(This used to be commit 9920473cc1)
2008-08-13 11:40:35 +02:00
Volker Lendecke
e3ec81c519 Attempt to fix the build on Irix CC
(cherry picked from commit 666bf8456a)
(This used to be commit 8819c51809)
2008-08-13 00:01:23 +02:00
Volker Lendecke
68fe1a1d86 Remove two unused variables
(This used to be commit 257b0401ee)
2008-08-12 11:59:13 +02:00
Volker Lendecke
a93d0f6f4e Do not create a new mapping if a domain with an explicit config fails
(This used to be commit 2c27de4426)
2008-08-12 11:28:29 +02:00
Volker Lendecke
18bc97287c Some doxygen comments for idmap
(This used to be commit adecc6d913)
2008-08-12 11:28:29 +02:00
Volker Lendecke
8d25729705 Fix prototypes
(This used to be commit 8b9d127146)
2008-08-12 11:28:29 +02:00
Volker Lendecke
2a3698e5c0 Remove "idmap alloc config : range" parameter
This was overwritten by "idmap uid/gid" anyway. These are now the range
parameters for the alloc backend.
(This used to be commit d563a7b80d)
2008-08-12 11:28:29 +02:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fc)
2008-08-12 11:28:29 +02:00
Volker Lendecke
8d4bd2d960 Remove the multi-ID lookup code and the 3.2.0 version of idmap_cache
(This used to be commit 1bd98521dc)
2008-08-12 11:28:29 +02:00
Volker Lendecke
0c1e27abf6 Directly call backends from idmap_[ugs]_to_[ugs]id
(This used to be commit f955407042)
2008-08-12 11:28:28 +02:00
Volker Lendecke
1bdbe772ad Move the gid2sid cache to the parent winbind process
(This used to be commit a86a6835e2)
2008-08-12 11:28:28 +02:00
Volker Lendecke
08f7c2d0fc Move the uid2sid cache to the parent winbind process
(This used to be commit 6e885aeabb)
2008-08-12 11:28:28 +02:00
Andrew Tridgell
8fed76b73e fixed a fd leak when trying to regain contact to a domain controller
in winbind

When a w2k3 DC is rebooted the 139/445 ports come up before the
udp/389 cldap port. During this brief period, winbind manages to
connect to 139/445 but not to udp 389. It then enters a tight loop
where it leaks one fd each time. In a couple of seconds it runs out of
file descriptors, and leaves winbind crippled after the DC does
finally come up
(This used to be commit 57187cafbc)
2008-08-06 10:50:16 +02:00
Günther Deschner
3bdfcbac5c winbindd: handle trusted domains without sid.
Guenther
(This used to be commit 0c1efc6c89)
2008-07-30 17:09:58 +02:00
Volker Lendecke
0fdffbc959 Fix an incompatible pointer warning
(cherry picked from commit 3282f7289b)
(This used to be commit fc86414439)
2008-07-25 23:35:00 +02:00
Volker Lendecke
0f9c30c114 Fix a race condition in winbind leading to a crash
When SIGCHLD handling is delayed for some reason, sending a request to a child
can fail early because the child has died already. In this case
async_main_request_sent() directly called the continuation function without
properly removing the malfunctioning child process and the requests in the
queue. The next request would then crash in the DLIST_ADD_END() in
async_request() because the request pending for the child had been
talloc_free()'ed and yet still was referenced in the list.

This one is *old*...

Volker
(cherry picked from commit 8691709626)
(This used to be commit c70e2b6476)
2008-07-25 12:12:49 +02:00
Volker Lendecke
8ea3ce5342 Remove unused request_finished_cont()
(This used to be commit 865ea6fcbc)
2008-07-24 15:01:04 +02:00
Volker Lendecke
d7b87cdce2 Make use of TALLOC_FREE when freeing the per-winbindrequest memory context
(This used to be commit 9e49d390f7)
2008-07-24 14:50:22 +02:00
Zach Loafman
06d0790c07 Fix various build warnings
This fixes various build warnings on our platform. I'm sure I haven't
caught them all, but it's a start.
(This used to be commit 6b73f259cb)
2008-07-22 15:00:48 +02:00
Volker Lendecke
ba2cb35ca5 Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel_with_key
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 78e9c937ff)
2008-07-20 17:37:13 +02:00
Volker Lendecke
e0be03d8d5 Refactoring: Change calling conventions for cli_rpc_pipe_open_ntlmssp
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit a13f059955)
2008-07-20 17:37:11 +02:00
Volker Lendecke
1335da2a7c Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 9abc9dc4dc)
2008-07-20 17:37:11 +02:00
Jeremy Allison
1484b7f3b5 From Jim McDonough
In reloading the smb.conf, if a "log file" is specified in smb.conf,
winbind children will overwrite the logfile name to be the same as the
parent.

Jeremy.
(This used to be commit 62d319cc1a)
2008-07-17 20:10:18 -07:00
Simo Sorce
9669411d1e Fix regression introduced with 4086ef15b3
We must not return an error here just because we are offline.
We must instead fix the mappings to the best of our knowledge
(ie mark as mapped, expired ones, and as unmapped, unknown ones)
(This used to be commit 4436272dd4)
2008-07-12 21:42:23 -04:00
Simo Sorce
8812606c43 Remove one nested level by reversing if condition
(This used to be commit 657a2f20dd)
2008-07-12 21:41:55 -04:00
Simo Sorce
eda1a267e1 Add back mem leak fixes
(This used to be commit 2adea093c5)
2008-07-12 21:40:33 -04:00
Simo Sorce
02e592486f Make again idmap_init static
(This used to be commit e113b7c13f)
2008-07-12 21:40:28 -04:00
Volker Lendecke
343c7ff3d2 Revert "Fix two memory leaks in an error path in idmap.c"
This reverts commit 7cec389e19.
(This used to be commit d0b34cbb4e)
2008-07-11 17:53:26 +02:00
Volker Lendecke
622d36aa41 Revert "Make idmap_init() static"
This reverts commit c8d1bbfddc.
(This used to be commit 5cded3da00)
2008-07-11 17:53:26 +02:00
Volker Lendecke
025689ad18 Revert "Fix typo"
This reverts commit fe58926283.
(This used to be commit fe216bff1d)
2008-07-11 17:53:26 +02:00
Volker Lendecke
b76fb9ac73 Revert "Fix a debug msg, this was probably a leftover from gencache"
This reverts commit daa171552d.
(This used to be commit b826420c3a)
2008-07-11 17:53:26 +02:00
Volker Lendecke
a25278a522 Revert "Fix indentation"
This reverts commit 954556b527.
(This used to be commit 1b1124bcb9)
2008-07-11 17:53:26 +02:00
Volker Lendecke
be187b787f Revert "Fix nonempty whitespace only lines"
This reverts commit 0da9d0d0f9.
(This used to be commit b2f7bd6a05)
2008-07-11 17:53:25 +02:00
Volker Lendecke
979496d5c1 Revert "fix typos"
This reverts commit e0957c6f4b.
(This used to be commit 0d2fc3c394)
2008-07-11 17:53:25 +02:00
Volker Lendecke
0439d4ba61 Revert "Fix nonempty whitespace only lines"
This reverts commit cc77db2acb.
(This used to be commit ed5b516c20)
2008-07-11 17:53:25 +02:00
Volker Lendecke
f7ee7d2fe9 Revert "Tiny logic simplification: Remove an unnecessary else branch"
This reverts commit 6009ae3293.
(This used to be commit b71ce00796)
2008-07-11 17:53:25 +02:00
Volker Lendecke
0948a5cda8 Revert "Fix typo"
This reverts commit fe79c8a5b7.
(This used to be commit 62835f8d7e)
2008-07-11 17:53:25 +02:00
Volker Lendecke
f70c8ecde2 Revert "Fix indentation"
This reverts commit c4e6de9e34.
(This used to be commit fa9b128e93)
2008-07-11 17:53:25 +02:00
Volker Lendecke
d1edba537f Revert "Simplify idmap_cache_build_[s]idkey a bit"
This reverts commit 80932c0266.
(This used to be commit 847609a148)
2008-07-11 17:53:24 +02:00
Volker Lendecke
ebb9437f4f Revert "Simplify idmap_cache_set() a bit"
This reverts commit 55b976ba93.
(This used to be commit 23edc4ec0a)
2008-07-11 17:53:24 +02:00
Volker Lendecke
50a84acc40 Revert "IDMAP_READ_CACHE_DATA_FMT_TEMPLATE is unused, remove it"
This reverts commit 2396d5d5d2.
(This used to be commit 447d77949f)
2008-07-11 17:53:24 +02:00
Volker Lendecke
b6dcc24987 Revert "Convert idmap_cache to gencache"
This reverts commit 0bf0434f22.
(This used to be commit cc53667773)
2008-07-11 17:53:24 +02:00
Volker Lendecke
ebb2d70a60 Revert "Make use of ADD_TO_ARRAY"
This reverts commit 81f334bd6d.
(This used to be commit d4d106776a)
2008-07-11 17:53:24 +02:00
Volker Lendecke
6c3c068716 Revert "Tiny logic simplification -- remove an else branch"
This reverts commit 01c8c7bbf6.
(This used to be commit b0fe0c7ac1)
2008-07-11 17:53:24 +02:00
Jeremy Allison
06b3a79d1f Allow authentication and memory credential refresh after password change from gdm/xdm. Patch from boyang <boyang@novell.com>.
Jeremy.
(This used to be commit 8cfc6afc7b)
2008-07-07 11:26:16 -07:00
Simo Sorce
4be7a83a2c Clean up winbindd_group.c too
(This used to be commit 50a347f550)
2008-07-06 12:55:07 -04:00
Simo Sorce
fae6a4e79b Clean up the rest of the file too
(This used to be commit f6c92c4759)
2008-07-06 12:27:34 -04:00
Simo Sorce
632e42e165 More clean up, indentation and trailing space removal
(This used to be commit d17d401603)
2008-07-06 12:17:22 -04:00
Simo Sorce
d0a71a00bb Make code more readable, fix indentation and traling spaces.
(This used to be commit e19e12d5cb)
2008-07-06 12:03:35 -04:00
Volker Lendecke
4dbfa7a211 Tiny logic simplification -- remove an else branch
(This used to be commit 01c8c7bbf6)
2008-07-05 12:19:13 +02:00
Volker Lendecke
ca34287063 Make use of ADD_TO_ARRAY
(This used to be commit 81f334bd6d)
2008-07-05 12:19:13 +02:00
Volker Lendecke
0234276af8 Convert idmap_cache to gencache
(This used to be commit 0bf0434f22)
2008-07-05 12:19:13 +02:00
Volker Lendecke
9c7e12d9f7 IDMAP_READ_CACHE_DATA_FMT_TEMPLATE is unused, remove it
(This used to be commit 2396d5d5d2)
2008-07-03 21:19:09 +02:00
Volker Lendecke
60582d1fb4 Simplify idmap_cache_set() a bit
sid_check_is_in_unix_* will only give true if it is of the corresponding type,
so the check if the struct idmap actually represents a user or group is
unnecessary.
(This used to be commit 55b976ba93)
2008-07-03 21:19:09 +02:00
Volker Lendecke
8857affd3c Simplify idmap_cache_build_[s]idkey a bit
(This used to be commit 80932c0266)
2008-07-03 21:19:09 +02:00
Volker Lendecke
47f1090de7 Fix indentation
(This used to be commit c4e6de9e34)
2008-07-03 15:17:58 +02:00
Volker Lendecke
ec7aa52a3b Fix typo
(This used to be commit fe79c8a5b7)
2008-07-02 15:13:14 +02:00
Volker Lendecke
7207b41a5e Tiny logic simplification: Remove an unnecessary else branch
(This used to be commit 6009ae3293)
2008-07-02 15:13:01 +02:00
Volker Lendecke
e467fae948 Fix nonempty whitespace only lines
(This used to be commit cc77db2acb)
2008-07-02 15:04:46 +02:00
Volker Lendecke
ec77a06a5d fix typos
(This used to be commit e0957c6f4b)
2008-07-02 14:54:59 +02:00
Volker Lendecke
62dddd04f4 Fix nonempty whitespace only lines
(This used to be commit 0da9d0d0f9)
2008-07-02 14:18:15 +02:00
Volker Lendecke
69b9cffe6e Fix indentation
(This used to be commit 954556b527)
2008-07-02 14:18:10 +02:00
Volker Lendecke
d6ab71f06c Fix a debug msg, this was probably a leftover from gencache
(This used to be commit daa171552d)
2008-07-02 14:18:05 +02:00
Volker Lendecke
dd7691ce68 Fix typo
(This used to be commit fe58926283)
2008-07-02 14:18:01 +02:00
Volker Lendecke
1999791b7c Make idmap_init() static
This is called only from idmap_alloc_init, which feels kindof weird.

Digging deeper in the code...
(This used to be commit c8d1bbfddc)
2008-07-02 13:34:09 +02:00
Volker Lendecke
ab57861686 Fix two memory leaks in an error path in idmap.c
(This used to be commit 7cec389e19)
2008-07-02 13:34:09 +02:00
Darshan Purandare
065760ede0 MSG_DEBUG now forwarded to all the winbindd children by parent.
smbcontrol winbindd debug level would only set the debug level of the
parent winbindd process and not the child processes. This patch adds
the functionality of broadcasting the debug message to all winbindd
children. Now the debug level message is propagated to all the winbindd
processes that includes parent and children.
(This used to be commit cfbcfc3ffe)
2008-07-01 17:52:24 -07:00
Karolin Seeger
3b1de7f7f4 Revert "winbind cache: Don't create SN cache entries during name-to-sid queries."
This reverts commit b58e4f6b3d.

Details can be found on the samba-technical mailing list.

Karolin
(This used to be commit 534a445df4)
2008-07-01 10:34:22 +02:00
Jeremy Allison
4aaa3a0fac Fix from Atte Peltomki - atte.peltomaki@f-secure.com to correctly check
error code in winbindd group expansion.
Jeremy.
(This used to be commit e321377174)
2008-06-30 09:20:05 -07:00
Gerald W. Carter
9ff1ffcbee libads: Add API call to connect to a global catalog server.
Extends ads_connect() to a new call ads_connect_gc() which connects on port
3268 rather than port 389.  Also makes ads_try_connect() static and
only used internally to ldap.c
(This used to be commit f4c37dbe2c)
2008-06-27 10:26:11 -04:00
Jeremy Allison
120c09b125 From Steve Danneman @ Isilon.
Attached is the companion patch to
(037b9689d9), which
made handling of WINBINDD_LIST_GROUPS asynchronous.

Because most all of the list_groups code was reusable, I abstracted it,
and implemented both list_groups and list_users on top of it.

On my large test domain a "wbinfo -u" call went from 70 seconds to 30
seconds with this patch.  Plus, the parent process is no longer blocked
from receiving new requests during that time.

Steven Danneman | Software Development Engineer
Isilon Systems    P +1-206-315-7500     F +1-206-315-7501
www.isilon.com
(This used to be commit 5188f28611)
2008-06-26 14:02:39 -07:00
Michael Adam
89ce05bb14 winbind: remove duplicate debug message for failing messaging_init().
Leave the message inside winbind_messaging_context() for now.
There might be callers, where this debug message could prove useful...

Michael
(This used to be commit e9177ec56a)
2008-06-26 12:31:10 +02:00
Michael Adam
b33d226a61 winbind: untangle logic in winbind_messaging_context() slightly.
Michael
(This used to be commit e710a9b73e)
2008-06-26 12:31:10 +02:00
Michael Adam
7f8df9c217 winbindd: don't panic if messaging_init() fails - return NULL instead.
Leave appropriate handling to the callers.

Michael
(This used to be commit 3e0c24323a)
2008-06-26 12:31:10 +02:00
Jeremy Allison
9f71be1250 Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test
(This used to be commit 9075c5f2ad)
2008-06-25 15:24:18 -07:00
Jeremy Allison
ae16606a90 Part of fix for #5551. Split out the group enumeration functions to a BUILTIN and a Domain
specific version. Stops the domain groups appearing twice.
Jeremy.
(This used to be commit 77b99530e0)
2008-06-25 15:23:32 -07:00
Günther Deschner
14d500c0e7 rename rpccli_samr_chgpasswd3 to rpccli_samr_chgpasswd_user3.
Guenther
(This used to be commit b1209a039b)
2008-06-25 23:58:50 +02:00
Günther Deschner
059293cbf4 rename rpccli_samr_chgpasswd_user to rpccli_samr_chgpasswd_user2.
Guenther
(This used to be commit 5b4650d56c)
2008-06-25 23:58:50 +02:00
Jeremy Allison
7687a22510 Final (hopefully :-) part of fix for bug #5551. Allow passdb backend to enumerate domain groups.
Jeremy
(This used to be commit 2181770e45)
2008-06-25 12:44:18 -07: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
Volker Lendecke
ee281b7479 Revert "Fix a memleak caused by a crappy get_sorted_dc_list() API"
This reverts commit 2ea03a1e95.
(This used to be commit 80c2e8295a)
2008-06-17 12:21:03 +02:00
Karolin Seeger
a7cf0bd32a idmap: Fix typos in comments.
Karolin
(This used to be commit 94a4d7fa32)
2008-06-17 10:30:19 +02:00
Karolin Seeger
98ed31a107 Fix typo.
arguements -> arguments

Karolin
(This used to be commit 16b5b772d2)
2008-06-17 09:46:17 +02:00
Karolin Seeger
13eab02679 winbind cache: Don't create SN cache entries during name-to-sid queries.
Clients can request name-to-sid queries for different combinations of
upper and lower case names. We don't want to create the reverse caching
entries for each combination used.

This avoids inconsistent answers on sid-to-name queries.

Please review!

Karolin
(This used to be commit b58e4f6b3d)
2008-06-16 15:21:28 +02:00
Jeremy Allison
1db2dc1931 Bugfix noticed by Herb. On using the again: tag as a
goto target we were not reinitializing the array counts.

From Herb:

This is in the file nsswitch/winbindd_cm.c (samba-3.0.30) line 1236

We have a label again: where we keep trying to find the name of the DC
from the list of IPs returned by get_dcs. If we fail to figure out the
name we do a goto again at the end of the function. The problem is we
don't reset the num_dcs, num_addrs, etc and free the memory in the
various arrays. This seems wrong to me. I have a winbindd core where
I have 9 IPs returned for the DCs but at the time of the crash num_dcs
is 87 and if I look through the array dcs it keeps repeating entries
from the same group of 9

Jerry, Volker and Guenther please check.

Jeremy.
(This used to be commit 15f464321a)
2008-06-08 14:19:44 -07:00
Volker Lendecke
bde7cbf4a7 Fix a memleak caused by a crappy get_sorted_dc_list() API
(This used to be commit 2ea03a1e95)
2008-06-05 10:56:18 +02:00
Gerald W. Carter
dd7cf3464d winbindd_cm: Replace the use of lp_realm() with our_domain->alt_name.
Reduce the use of config parameters with run time information after discussion
with Guenther.
(This used to be commit 57d596395d)
2008-06-03 11:21:02 -05:00
Jeremy Allison
11ef7d202a Fix by Bo Yang <boyang@novell.com> for bug with winbindd trusted domain child
not keeping primary domain online status up to date.
Jeremy.
(This used to be commit 0621c7c816)
2008-06-02 15:26:37 -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
4408fdaf29 Fix valgrind bug in debug statement. Don't reference uninitialized memory.
Jeremy.
(This used to be commit 25e76a19f2)
2008-05-30 17:53:16 -07:00
Jeremy Allison
908812e98d Fix bug #5504. winbindd children and parent were handing SIGTERM in the same way - deleting the socket!
Jeremy.
(This used to be commit 3ab5a3883e)
2008-05-30 17:52:54 -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
Michael Adam
c5a030a38a winbind: correctly omit check for trusted domain support in cm_prepare_connection
when checking for a trusted domain situation.
This is how it was meant to be:

Otherwise, with a dc-trusted-domain situation but trusted domains disabled,
we would attempt to do a session setup and fail (wouldn't even get a trust
password).

Michael
(This used to be commit a5a51ca8e5)
2008-05-26 16:42:25 +02:00
Volker Lendecke
1a1fc2f814 Fix two c++ warnings
(This used to be commit 3b1dae7c31)
2008-05-25 13:53:45 +02:00
Gerald W. Carter
4d2f71e53f Manually merge Steven Danneman's patch for SPNEGO auth to a trusted
Win2008 domain (merged from v3-0-test).

   commit 8dc4e97977
   Author: Steven Danneman <sdanneman@isilon.com>
   Date:   Wed May 7 13:34:26 2008 -0700

      spnego SPN fix when contacting trusted domains

      cli_session_setup_spnego() was not taking into consideration the situation
      where we're connecting to a trusted domain, specifically one (like W2K8)
      which doesn't return a SPN in the NegTokenInit.

      This caused two problems:

      1) When guessing the SPN using kerberos_get_default_realm_from_ccache() we
      were always using our default realm, not the realm of the domain we're
      connecting to.

      2) When falling back on NTLMSSP for authentication we were passing the name
      of the domain we're connecting to for use in our credentials when we should be
      passing our own workgroup name.

      The fix for both was to split the single "domain" parameter into
      "user_domain" and "dest_realm" parameters.  We use the "user_domain"
      parameter to pass into the NTLM call, and we used "dest_realm" to create an SPN
      if none was returned in the NegTokenInit2 packet.  If no "dest_realm" is
      provided we assume we're connecting to our own domain and use the credentials
      cache to build the SPN.

      Since we have a reasonable guess at the SPN, I removed the check that defaults
      us directly to NTLM when negHint is empty.
(This used to be commit b78b14c88e)
2008-05-23 16:01:45 -05:00
Gerald W. Carter
b72fc49f44 Manually port Steven Dannenman fix for using the correct machine domain when
looking up trust credentials in our tdb.

   commit fd0ae47046
   Author: Steven Danneman <sdanneman@isilon.com>
   Date:   Thu May 8 13:34:49 2008 -0700

      Use machine account and machine password from our domain when
      contacting trusted domains.
(This used to be commit 69b37ae607)
2008-05-23 15:19:58 -05:00
Jeremy Allison
cfde5c8d47 Get rid of "shadowed local var" warnings with gcc.
Jeremy.
(This used to be commit 0bc18967aa)
2008-05-22 14:19:14 -07:00
Steven Danneman
96653e1ff7 Make WINBINDD_LIST_GROUPS handler asynchronous.
Previously WINBINDD_LIST_GROUPS requests (ex: wbinfo -g) were handled by the
winbindd parent process in a sequential fashion.  This patch, delegates the work
to the winbindd children so that the request is handled much faster in large
domain topologies, and doesn't block the parent from receiving new requests.

The core group enumeration and conversion that was handled in
winbindd_list_groups() has been moved into winbindd_dual_list_groups() to be
done by the child.

The parent winbindd_list_groups() simply calls each of the children
asynchronously.

listgroups_recv() aggregates the final group list that will be returned to the
client and tracks how many of the children have returned their lists.

The domain name of the child is passed back through the callbacks to be used in
debugging messages.

There are also several fixes to typos in various comments.
(This used to be commit 037b9689d9)
2008-05-22 13:55:57 -05:00
Michael Adam
03dcad0b27 winbindd: freeze winbindd_proto.h
Michael
(This used to be commit 467b8f0f4d)
2008-05-18 23:09:34 +02:00
Jeremy Allison
5e70a25116 Fix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :
CatchChild();

*before* we fork the domain child. This call establishes a signal handler that
eats SIGCLD signals and doesn't call sys_select_signal() as the main daemon
SIGCLD handler should do. This causes the parent to ignore dead children and
time out, instead of calling winbind_child_died() on receipt of the signal. The
correct fix is to move the CatchChild call into the child code after the fork.

Jeremy.
(This used to be commit 8d701a142b)
2008-05-14 14:10:39 -07:00
Jim McDonough
a6b0ea8ee3 Enable winbind child processes to do something with signals,
in particular closing and reopening logs on SIGHUP.

Conflicts:

	source/winbindd/winbindd.c
(This used to be commit 0f7b11acce)
2008-05-13 16:57:01 -04:00
coffeedude
34933a5c23 libwbclient: Abstract the DS_XXX flags for DsGetDcName().
The wbcLookupDomainController() call supports a set of flags
defined in wbclient.h.  Add a mapping function between these
flags and the original DS_XXX flags in order to prevent having
to include the generated RPC headers in wbclient.h.
(This used to be commit 31614cd5e0)
2008-05-13 12:58:52 -05:00
Günther Deschner
67c644aa59 dsgetdcname: use existing messaging_context if possible.
Guenther
(This used to be commit 7889516a38)
2008-05-09 14:59:20 +02:00
Günther Deschner
f11acf3582 Use strip_hostname after dsgetdcname/getdcname calls.
Guenther
(This used to be commit 82cbb3269b)
2008-05-09 14:59:19 +02:00
Günther Deschner
9be17e2187 dsgetdcname: mailslot replies are identical to the cldap ones, use cldap everywhere.
Guenther
(This used to be commit fe904ee77a)
2008-05-09 14:59:19 +02:00
Günther Deschner
1f6065765c mailslot/cldap: use nt_version bits in queries.
Guenther
(This used to be commit b261f06312)
2008-05-06 09:41:41 +02:00
Gerald W. Carter
c413c97ff4 Winbind: Prevent cycle in children list when reaping dead child processes.
Thanks to Glenn Curtis and Kyle Stemen @ Likewise.  Their explanation is:

    In winbindd_dual.c, there is a list of children processes that
    is maintained using macros DTLIST_ADD and DTLIST_REMOVE. In the
    case when a scheduled_async_request fails, the particular child
    was located in the list, and its attributes were cleared out
    and it was reused for a subsequent async request. The bug was that
    the new request would queue the same node into the doubly-linked
    list and would result in list->next pointing to the same node as
    list itself. This would set up an infinite loop in the processing of
    the for loop when the list of children was referenced.

    Solution was to fully remove the child node from the list, such that
    it could be inserted without risk of being inserted twice.

Note that the child is re-added to the list in fork_domain_child() again.
(This used to be commit b379b5b5d8)
2008-04-30 10:09:43 -05:00
Günther Deschner
b77601a4b7 mailslot: allow to give back struct nbt_ntlogon_packet.
Guenther
(This used to be commit 2b178dcae6)
2008-04-24 22:01:52 +02:00
Günther Deschner
e66d452466 mailslot: allow to define nt_version in send_getdc_request().
Guenther
(This used to be commit ce3728191b)
2008-04-24 22:01:51 +02:00
Volker Lendecke
0c4093a234 Fix CLEAR_IF_FIRST handling of messages.tdb
We now open messages.tdb even before we do the become_daemon. become_daemon()
involves a fork and an immediate exit of the parent, thus the
parent_is_longlived argument must be set to false in this case. The parent is
not really long lived :-)
(This used to be commit 4f4781c6d1)
2008-04-23 22:18:26 +02:00
Gerald W. Carter
de154dcf92 Mark a domain offline in the wbcDomainInfo structure using the domain_flags.
Use the existing domain_flags fiueld in wbcDomainInfo to set a bit if the
domain is marked as offline by Winbind.
(This used to be commit 59cfba2c3d)
2008-04-23 08:47:50 -05:00
Michael Adam
65c0fd5920 winbindd_cache: simplify logic in new key length check for UA keys.
This reduces indentation by combining common code paths,
and wraps long lines.

Holger: sorry, I could not resist. I think it is much easier to
understand what is going on when we only have one check and
determine the max allowed key length in advance.

Michael
(This used to be commit e489f3d988)
2008-04-23 14:55:51 +02:00
Holger Hetterich
7a407d5927 winbindd_cache: recognize and allow longer UA keys
UA keys consist of a potientally large number of concatenated SID strings which
can grow much larger than 1024 bytes in complex environments. We catch those keys
and allow them exclusivly to be larger.
(This used to be commit fcd35232e1)
2008-04-23 13:57:14 +02:00
Volker Lendecke
9ffcc7966f Fix wbinfo --group-info if the winbind separator set to non \
In getgrsid_lookupsid_recv() we use parse_domain_user which itself looks at
lp_winbind_separator(). Thus when building up that group name we should better
use it as well.
(This used to be commit 5df75578ef)
2008-04-22 15:42:09 +02:00
Günther Deschner
bcbac69d1a cldap: avoid duplicate definitions so remove ads_cldap.h.
Guenther
(This used to be commit 538eefe22a)
2008-04-21 20:21:40 +02:00
Günther Deschner
1eca3f138c winbind: pass down existing talloc context.
Guenther
(This used to be commit 675bf42cff)
2008-04-21 20:21:39 +02:00
Andrew Bartlett
154f4837b3 Add in a nice big comment explaining why SamLogonEx matters.
Andrew Bartlett
(This used to be commit 87232351b5)
2008-04-21 17:48:31 +02:00
Günther Deschner
937091161b winbind: Use libnbt for NTLOGON SAMLOGON mailslot request and reply.
Guenther
(This used to be commit 2d6a1c5da6)
2008-04-21 11:03:32 +02:00
Volker Lendecke
e73e8297f5 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct
(This used to be commit 99fc3283c4)
2008-04-20 14:08:16 +02:00
Volker Lendecke
e1102b8f48 Introduce rpccli_set_timeout()
Reduce dependency on "cli" member of rpc_pipe_client struct
(This used to be commit 2e4c1ba389)
2008-04-20 00:14:26 +02:00
Volker Lendecke
2a2188591b Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
(This used to be commit 783afab9c8)
2008-04-20 00:13:09 +02:00
Stefan Metzmacher
913cd26b2b winbindd: create the messaging conntext earlier
metze
(This used to be commit 2e1b913063)
2008-04-18 15:00:20 +02:00
Stefan Metzmacher
94b603648f winbindd: call reinit_after_fork() in the child processes
metze
(This used to be commit 8e9fdef792)
2008-04-18 15:00:20 +02:00
Günther Deschner
bbded540b6 Move GETDC mailslot out of winbindd.
Guenther
(This used to be commit b003ba65e3)
2008-04-17 15:17:29 +02:00
Stefan Metzmacher
e21b283d67 dbwrap: wait for tdb2 change notifies in smbd, nmbd and winbindd
metze
(This used to be commit 64450cc1e4)
2008-04-12 09:14:10 +02:00
Michael Adam
b884db5c47 winbindd: only call winbindd_validate_cache when not in offline logon mode.
originally, the cache was cleared before calling validate, but
this way, we skipt the validation of the database when not in
offline logon mode.

This is put into a new wrapper function winbindd_cache_validate_and_initialize()
which is now called in winbindd.c instead calling validate and
initialize functions separately.

Michael
(This used to be commit 641b5e3fec)
2008-04-10 13:23:30 +02:00
Volker Lendecke
0f37cd0c8e Also accept 0x15 getdc replies
My NT4SP6 which my DC here trusts sends 0x15 instead of 0x13, from looking at
the sniff at least the DC name is at the same place.
(This used to be commit 79bc6796b8)
2008-04-10 11:53:43 +02:00
Volker Lendecke
9fa04934e0 Try anonymous session setup
... if there's no trust password

Attempt to fix bug 5350
(This used to be commit 99f6b63f3c)
2008-04-09 10:01:53 +02:00
Michael Adam
bc5f19cb28 winbindd: fix break out early condition in fill_grent_mem().
if (!&new_glist) would always be skipped, if (new_glist == NULL) is
what must have been meant...

Michael
(This used to be commit c1b60cdecf)
2008-04-07 16:38:14 +02:00
Bo Yang
66dad54c72 Only cache password policy results that worked, otherwise we
cannot login until the cache expires even if a connection
to a DC has been restored.
(This used to be commit 8671f9767d)
2008-04-07 09:51:42 -04: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
Simo Sorce
a123abdb91 Fix trusted users on a DC that uses the old idmap syntax. There was no default backend therefore on IDs were mapped by default.
(This used to be commit f6069126e5)
2008-04-03 00:26:35 +02:00
Günther Deschner
99d3590455 Fix NETLOGON credential chain with Windows 2008 all over the place.
In order to avoid receiving NT_STATUS_DOWNGRADE_DETECTED from a w2k8
netr_ServerAuthenticate2 reply, we need to start with the AD netlogon negotiate
flags everywhere (not only when running in security=ads). Only for NT4 we need
to do a downgrade to the returned negotiate flags.

Tested with w2k8, w2ksp4, w2k3r2 and nt4sp6.

Guenther
(This used to be commit 0970369ca0)
2008-04-02 11:12:47 +02:00
Gerald W. Carter
5414a21ba3 Fix enumeration of forest trusts from our root domain.
Do not overwrite the domain->domain_flags when setting infomation
in set_dc_type_and_flags_connect().
(This used to be commit 3414eac439)
2008-03-31 13:40:58 -05:00
Steven Danneman
2b70174e1b Augmented "wbinfo -m" to list additional information about the type, direction, and transitivty of trusts.
* added several helper functions to convert the trust_flags field in the
winbindd_tdc_domain to more useful administrator ideas of trust type, trust
direction, and trust transitivity.

* converted winbindd_list_trusted_domains() to enumerate the trusted domain
cache, instead of the domain list, and return additional trust information to
the calling process

* modified wbinfo to pretty print this additional trust information when a new
--verbose switch is given with -m.  Thus "wbinfo -m" and "wbinfo -all-domains"
output as before, but "wbinfo --verbose -m" prints extra trust info.

* updated some comments and fixed typos
(This used to be commit e7827bb6af)
2008-03-31 13:40:58 -05: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
Michael Adam
2487f0c88c winbindd_cache: add missing validation function for pwinfo cache entry
Michael
(This used to be commit 6d3fc63bfa)
2008-03-29 02:10:41 +01:00
Günther Deschner
4ce88f719e Don't let winbind getgroups crash when we have no gids in the token.
Guenther
(This used to be commit 6a576cfe9b)
2008-03-29 00:47:42 +01:00
Volker Lendecke
26fead2c6e Make some fns static
(This used to be commit e04fc36f22)
2008-03-28 13:44:30 +01:00
Günther Deschner
1b9c4763ee Fix typo.
Guenther
(This used to be commit fed6443729)
2008-03-27 18:05:02 +01:00
Gerald W. Carter
9c169e9e42 Don't fill password policy structure for any domain other than our own.
The samr connects will fail.  This is not independent of the CONTACT_TRUSTDOM
flag neede by krb5 logins.
(This used to be commit 4de4949e3b)
2008-03-27 11:56:29 -05:00
Volker Lendecke
2198058624 Fix wbinfo -a trusted\\user%password on a Samba DC with trusts
Winbind can't be allowed to connect to the local smbd.
(This used to be commit 0d617f639a)
2008-03-27 13:11:10 +01:00
Günther Deschner
cba8dcf759 Move LOGON_KRB5_FAIL_CLOCK_SKEW to winbindd_pam.
Guenther
(This used to be commit fa64c76ac8)
2008-03-27 13:06:43 +01:00
Günther Deschner
06772e7f65 Fix winbind NETLOGON cred chain on a samba dc for w2k8 trusts.
Guenther
(This used to be commit 2586dc34e0)
2008-03-26 21:11:53 +01:00
Volker Lendecke
689cd9e101 Fix a segfault
When we get a NT_STATUS_WRONG_PASSWORD for example, my_info3 is not initialized
at all. So first check that we have NT_STATUS_IS_OK(status) before we
dereference my_info3.
(This used to be commit 559cd9e5a7)
2008-03-25 23:36:06 +01:00
Volker Lendecke
04cd5c6bd8 Fix typo
(This used to be commit 38683a7301)
2008-03-25 21:35:41 +01:00
Volker Lendecke
ca63c6e079 Merge dd9e0bea31751 from 3-0-ctdb -- use NetSamLogonEx when possible
NetSamLogonEx has the advantage that it does not use the credential chain
(This used to be commit cfceb063f5)
2008-03-19 17:00:53 +01:00
Volker Lendecke
bf10e7f939 Fix some "nexted extern" warnins
(This used to be commit 32fc759d94)
2008-03-19 16:23:28 +01:00
Volker Lendecke
1ebfc66b2c Use a separate tdb for mutexes
Another preparation to convert secrets.c to dbwrap: The dbwrap API does not
provide a sane tdb_lock_with_timeout abstraction. In the clustered case the DC
mutex is needed per-node anyway, so it is perfectly fine to use a local mutex
only.
(This used to be commit f94a63cd8f)
2008-03-10 21:08:45 +01:00
Stefan Metzmacher
76de025c72 winbind: use a struct element for WBFLAG_PAM_UNIX_NAME
To not conflict with WBFLAG_PAM_INFO3_TEXT.

This should fix pam_winbind.

metze
(This used to be commit 1b8ed6c0ff)
2008-02-28 23:00:42 +01:00
Günther Deschner
0d8985f2da Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.
Guenther
(This used to be commit b1a4b21f8c)
2008-02-28 12:40:55 +01:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a87571)
2008-02-27 19:38:48 +01: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