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

186 Commits

Author SHA1 Message Date
Günther Deschner
8e589ea7f2 r21308: Fix some typos and ensure to null terminate the correct strings.
Guenther
(This used to be commit 16c90f30b93f32c4f8fed00a6cc154c596e4244d)
2007-10-10 12:17:54 -05:00
Gerald Carter
a94b044a5c r21070: * Add the new boolean 'winbind normalize names' option as discussed
on the samba-technical ml.  The replacement character is hardcoded
  as a '_' for now.
(This used to be commit bd8238417b8d692ed381a870901ff1ee4cfa80f6)
2007-10-10 12:17:32 -05:00
Günther Deschner
a6f30ced0a r21018: Removing the set_domain_online_request again in trustdom_recv().
Jeremy, we really can't do that. There are setups with hundred and more
trusted domains out there, I have one customer who tells me it takes
more then half an hour for him after winbind is up and running. That
request registers the check_domain_online_handler which in turn forks
off the child immediately. Also discussed with Volker.

Guenther
(This used to be commit ccd4812c0b436a12b809668d09c5681111125f3d)
2007-10-10 12:17:27 -05:00
Jeremy Allison
e5e0f51b83 r20530: Don't want this call to get inadvertently re-added :-).
Jeremy.
(This used to be commit 68c4fbcf3397d6c43a3e5809b20a23116b1f8a31)
2007-10-10 12:16:54 -05:00
Gerald Carter
b2317c0979 r20488: When joined to a child domain in a multi-domain/single domain tree,
the child domain cannot always resolve SIDs in sibling domains.
Windows tries to contact a DC in its own domain and then the root
domain in the forest.  This async changes makes winbindd's name2sid()
call do the same.
(This used to be commit 7b2bf0e5a6b8d4119657c7a34aa53c9a0c1d5723)
2007-10-10 12:16:52 -05:00
Gerald Carter
8b0fce0b0c r20287: Allow a NULL sid when setting up the list of trusted domains.
(This used to be commit ccea7155bc8c22816f2622e604e0ef76109487f1)
2007-10-10 12:16:39 -05:00
Jeremy Allison
5d3456b22e r20270: Even with the dual daemon mode the parent winbindd
still needs to contact the DC's for non async requests
like enumerate users/groups etc. Now that online
DC detection is tied to async events we must enable
the processing of events in the main loop of winbindd.
Finally got rid of the last hard coded domain->initialized = 1
code in init_child_recv() - now all domain->initialized = True
gets done only in the connection manager code when either
we're online and have spoken to the DC or are offline and
we know we can't talk to the DC.
Jeremy.
(This used to be commit b3c98057fbad182f6c05c5daec6cd258dd491064)
2007-10-10 12:16:38 -05:00
Simo Sorce
25fe484101 r20150: better memory handling for some functions, make sure we don't
leak memory by using the wrong(long lived)  mem context
(This used to be commit a28cdd6e742cb72a728bd337546ee95fd4160ed8)
2007-10-10 12:16:27 -05:00
Herb Lewis
791f48f167 r20124: clean up nested extern declaration warnings
(This used to be commit ac3eb7813e33b9a2e78c9158433f7ed62c3b62bb)
2007-10-10 12:16:26 -05:00
Simo Sorce
4225f9a4bd r20116: Start merging in the work done to create the new idmap subsystem.
Simo.
(This used to be commit 50cd8bffeeed2cac755f75fc3d76fe41c451976b)
2007-10-10 12:16:25 -05:00
Jeremy Allison
63609fbb04 r20090: Fix a class of bugs found by James Peach. Ensure
we never mix malloc and talloc'ed contexts in the
add_XX_to_array() and add_XX_to_array_unique()
calls. Ensure that these calls always return
False on out of memory, True otherwise and always
check them. Ensure that the relevent parts of
the conn struct and the nt_user_tokens are
TALLOC_DESTROYED not SAFE_FREE'd.
James - this should fix your crash bug in both
branches.
Jeremy.
(This used to be commit 0ffca7559e07500bd09a64b775e230d448ce5c24)
2007-10-10 12:16:24 -05:00
Jeremy Allison
155083547a r20057: Attempt to fix connect timeouts when connected on
a network but not one on which any home DC's can
be found (hotel network problem). Still testing
but this is getting close.
Jeremy.
(This used to be commit 369c9e4138b93f7cfb6680f0beb541f58554e856)
2007-10-10 12:16:23 -05:00
Volker Lendecke
782d33e1c8 r19686: Fix the build
(This used to be commit 28ac0235810c53eccb449201ac933d7eaf8eb38f)
2007-10-10 12:15:46 -05:00
Jeremy Allison
e070996cc3 r19413: Now we're calling init_dc_connection, this code
is completely useless (and in fact harmful :-) in
that it causes a winbindd error where there should
be none.
Jeremy.
(This used to be commit acf5419d62f4ac64449d4722c5ff3c9be35c0570)
2007-10-10 12:15:33 -05:00
Jeremy Allison
ed088e5ee0 r19212: Make sure domains marked internal don't do
network queries.
Jeremy.
(This used to be commit e4d5e1d90b40fee1edc5cf0134b276645eea63bf)
2007-10-10 12:15:22 -05:00
Jeremy Allison
9421a0a9cd r19207: Properly canonicalize incoming names to the
NSS protocols auth, chauthtok, logoff, ccache_ntlm_auth.
That way we ensure winbindd only deals with fully
qualified names internally. The NSS protocols
auth_crap and chng_pswd_auth_crap should be fixed
to do the same thing.
Jeremy.
(This used to be commit dbd2454d3337f64cddbdaf39e9efd6505e6b2590)
2007-10-10 12:15:21 -05:00
Jeremy Allison
10ada62bed r19148: Finish last nights patch - make offline
work again. Still under test.
Jeremy.
(This used to be commit 40a455db78f805daa6bfeb9e78fb78dcc12fd9a7)
2007-10-10 12:15:16 -05:00
Volker Lendecke
7bce558fec r19066: Fix a memleak
(This used to be commit c53e2e54750764c9a0eb57a86fd226b4f8711a66)
2007-10-10 12:15:07 -05:00
Günther Deschner
a3e1f7e44d r18703: Fix the annoying effect that happens when nscd is running:
We usually do not get the results from user/group script modifications
immediately. A lot of users do add nscd restart/refresh commands into
their scripts to workaround that while we could flush the nscd caches
directly using libnscd.

Guenther
(This used to be commit 7db6ce295afbedfada7b207ad56566d2195a0d21)
2007-10-10 12:00:49 -05:00
Jeremy Allison
415c75f320 r18509: We must always canonicalise the usernames to be UPPERCASE DOMAIN,
lowercase username. We cache names as keys in this form, and we weren't
always returning this....
Jeremy.
(This used to be commit 205aa2b70d647460ca5a273caad7717312f53aab)
2007-10-10 11:51:45 -05:00
Gerald Carter
2b27c93a9a 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.
(This used to be commit 3da9f80c28b1e75ef6d46d38fbb81ade6b9fa951)
2007-10-10 11:51:18 -05:00
Volker Lendecke
0b56ff1ea3 r17605: Some C++ warnings
(This used to be commit 05268d7a731861b10ce8556fd32a004808383923)
2007-10-10 11:38:42 -05:00
Gerald Carter
2d91ea9a3b r17159: Bug 3920: Restore wnibind use default domain behavior for domain groups.
This break local users and 'winbind nested groups' on domain members.
Cannot be helped.

My plans is to move the default domain crud to the client code (pam and
nss libraries) in 3.0.24.
(This used to be commit 8ee22eeab5d06008b363f8bb250dc767ddfbb86a)
2007-10-10 11:38:17 -05:00
Jeremy Allison
fbdcf2663b 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.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10 11:19:14 -05:00
Günther Deschner
510b81b428 r16940: libnscd sets errno, use that to display error message.
Guenther
(This used to be commit df10448e2c6166d1c129c2d9a9a74c5b4a42555f)
2007-10-10 11:19:12 -05:00
Jeremy Allison
a167c2c09e r16422: winbindd_demote_client isn't used and generates
a Klocwork issue (#1844). Remove it
Jeremy.
(This used to be commit e83c3e0a65edeb423d964488e219e30d023b13e8)
2007-10-10 11:18:52 -05:00
Günther Deschner
690d117b25 r15976: Set our internal domains to "online" by default in winbindd.
Guenther
(This used to be commit 2678582c6cc7fb100cb3bfd867816878461ae7b4)
2007-10-10 11:17:16 -05:00
Gerald Carter
ee8079732d r15842: patch from volker to instruct winbindd to find a trusted DC on its own when runing on a Samba DC (since we don't implement the getdcname() call that well
(This used to be commit 39f7ff75a7a21b85b54cba954f1c5552e562be5c)
2007-10-10 11:17:10 -05:00
Günther Deschner
c60e96c392 r15698: An attempt to make the winbind lookup_usergroups() call in security=ads
more scalable:

The most efficient way is to use the "tokenGroups" attribute which gives
the nested group membership. As this attribute can not always be
retrieved when binding with the machine account (the only garanteed way
to get the tokenGroups I could find is when the machine account is a
member of the "Pre Win2k Access" builtin group).

Our current fallback when "tokenGroups" failed is looking for all groups
where the userdn was in the "member" attribute. This behaves not very
well in very large AD domains.

The patch first tries the "memberOf" attribute on the user's dn in that
case and directly retrieves the group's sids by using the LDAP Extended
DN control from the user's object.

The way to pass down the control to the ldap search call is rather
painfull and probably will be rearranged later on.

Successfully tested on win2k sp0, win2k sp4, wink3 sp1 and win2k3 r2.

Guenther
(This used to be commit 7d766b5505e4099ef7dd4e88bb000ebe38d71bd0)
2007-10-10 11:17:08 -05:00
Günther Deschner
df980b79fc r15306: Be consistent between rpc and ads winbind backend: let the ads backend
query the samlogon cache first as well.

Guenther
(This used to be commit aa52b11dd450ca3ec1f156e17822b1c4971ef915)
2007-10-10 11:16:33 -05:00
Gerald Carter
8c9eb7631e r15053: fix portabilities issues between 32-bit winbind clients and a 64-bit winbindd server
(This used to be commit a95d11345e76948b147bbc1f29a05c978d99a47a)
2007-10-10 11:16:00 -05:00
Gerald Carter
6c9eaa6880 r14855: Various fixes:
* depreacte 'acl group control' after discussion with Jeremy
  and implement functionality as part of 'dos filemode'
* fix winbindd on a non-member server to expand local groups
* prevent code previously only used by smbd from blindly
  turning _NO_WINBINDD back on
(This used to be commit 4ab372f4cab22225716b5c9a9a08f0c1dbc9928d)
2007-10-10 11:15:51 -05:00
Volker Lendecke
2b1641c994 r14480: Kill one boolean flag passed down :-)
(This used to be commit d9b85e3b287c24d2a3e2076da331fe06192b0eef)
2007-10-10 11:15:33 -05:00
Günther Deschner
962e42caa5 r14474: Also flush the nscd caches before entering the main winbindd loop.
Guenther
(This used to be commit c81eb71834dc827db63c8adb3f816bbbe916473c)
2007-10-10 11:15:33 -05:00
Günther Deschner
ef115ff314 r14468: Better fix to avoid winbind panic when we have an inproper configuration
and want to just shutdown and exit.

Guenther
(This used to be commit 0aa6328ed6ba6d0d24169ffdff0099405c9bfb00)
2007-10-10 11:15:33 -05:00
Günther Deschner
5856fd510c r14467: Reverting 13660. This needs to be fixed differently.
Guenther
(This used to be commit 4157bfe9cfe79ff78e7e527a50058cf9103cab61)
2007-10-10 11:15:31 -05:00
Gerald Carter
0ce53f8ba5 r14403: * modifies create_local_nt_token() to create a BUILTIN\Administrators
group IFF sid_to_gid(S-1-5-32-544) fails and 'winbind nested groups = yes'

* Add a SID domain to the group mapping enumeration passdb call
  to fix the checks for local and builtin groups.  The SID can be
  NULL if you want the old semantics for internal maintenance.
  I only updated the tdb group mapping code.

* remove any group mapping from the tdb that have a
  gid of -1 for better consistency with pdb_ldap.c.
  The fixes the problem with calling add_group_map() in
  the tdb code for unmapped groups which might have had
  a record present.

* Ensure that we distinguish between groups in the
  BUILTIN and local machine domains via getgrnam()
  Other wise BUILTIN\Administrators & SERVER\Administrators
  would resolve to the same gid.

* Doesn't strip the global_sam_name() from groups in the
  local machine's domain (this is required to work with
  'winbind default domain' code)

Still todo.

* Fix fallback Administrators membership for root and domain Admins
  if nested groups = no or winbindd is not running

* issues with "su - user -c 'groups'" command

* There are a few outstanding issues with BUILTIN\Users that
  Windows apparently tends to assume.  I worked around this
  presently with a manual group mapping but I do not think
  this is a good solution.  So I'll probably add some similar
  as I did for Administrators.
(This used to be commit 612979476aef62e8e8eef632fa6be7d30282bb83)
2007-10-10 11:15:28 -05:00
Günther Deschner
e18349b2bb r13660: Attempt to better handle the failure that we cannot find our sid upon
startup; don't panic, shutdown instead.

Guenther
(This used to be commit f209192e26c12fd48feb6195b724715fbada8b85)
2007-10-10 11:10:21 -05:00
Günther Deschner
f0ed0440c4 r13492: As noone objected on the mailing-list:
Fix parse_domain_user to fail when splitting a full name like "DOM\user"
when "winbind use default domain" and "winbind trusted domains only" are
not enabled.

This allows pam_winbind to behave correctly when more modules are
stacked in the "account" or "password" PAM facility. pam_winbindd calls
WINBINDD_GETPWNAM which can decide whether or not a user is a winbind
user and return correct PAM error codes.

Guenther
(This used to be commit e6d52c1e9d8cec7be6d552c2a67a392df21c3ec9)
2007-10-10 11:10:06 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10 11:06:23 -05:00
Günther Deschner
7b575d7cc5 r13024: Add is_null_sid.
GUenther
(This used to be commit 3a6e41a0cb2872a656ea79c8d4fc4b8bce436492)
2007-10-10 11:06:11 -05:00
Volker Lendecke
6a92f418ea r12133: Fix an uninitialized variable in new code in rpc_server/srv_samr_nt.c.
Fix winbind_lookup_name for the local domain, ie for aliases on a member
server.

Volker
(This used to be commit 4ba50c823e8d61f87ab5627f15e826e73e45ffcc)
2007-10-10 11:05:46 -05:00
Günther Deschner
5d5d0b2f3b r10270: lowercase groupnames and groupmembers again.
Guenther
(This used to be commit 736dffb2a9907a6ca3fee51eb4a9f1da837303a0)
2007-10-10 11:03:40 -05:00
Volker Lendecke
3368280b94 r10267: Exit if winbind can't find or generate a SID -- there's no point in
continuing. Found during investigation of bug 3105.

Volker
(This used to be commit 72546f185696235c9d5cb6196448178d9e15e858)
2007-10-10 11:03:39 -05:00
Günther Deschner
9cc1892865 r10262: * Fix for getgrnam not returning builtin group (which is done by getent
group)
* Give a better debug message when returning builtin groups.

Guenther
(This used to be commit ec79971dc7606c1dfea3acf87cd19fa4153ae417)
2007-10-10 11:03:39 -05:00
James Peach
8c072021ef r9780: Clean up a bunch of compiler warnings.
(This used to be commit 623d2e69319ffead31a780a4d6156dae45f386d7)
2007-10-10 11:03:26 -05:00
Volker Lendecke
86dc60492a r9709: Fix two bugs found by Brian Moran: Any request sent to winbind while the child
in question is still initializing overwrites domain->dcname. Only overwrite if
the parent actually has sent a dcname and thus really knows it. Second,
ntlm_auth needs the error code, not just the fact it failed.

Jerry, the 3_0 part might qualify as a "recommended patch".

Thanks,

Volker
(This used to be commit d79b179b7f9d2efa4f8ee47bfe386e90d8b58322)
2007-10-10 11:03:24 -05:00
Jeremy Allison
19ca97a70f r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
(This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10 10:58:00 -05:00
Gerald Carter
fed660877c r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd4af31a0ebc423b4acbb2f043d865b8)
2007-10-10 10:57:08 -05:00
Gerald Carter
a8360c4f6b r6682: patch from Qiao Yang <qyang@stbernard.com> to use out own DC when getting the SID for a domain
(This used to be commit 2e0941ebc1d6a9a9498cc5a9f072d501293f8933)
2007-10-10 10:56:51 -05:00