1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

1156 Commits

Author SHA1 Message Date
Günther Deschner
2b99951e75 r16222: Fix DEBUG statements.
Guenther
(This used to be commit 5ecfaf7d505e6acc23a06dd64d00f5e6fb8efe6f)
2007-10-10 11:17:26 -05:00
Günther Deschner
e8b4c92f32 r16221: No need for friednly error messages at log level 10.
Guenther
(This used to be commit 58a7c0900325065cc969eb4f2f4c85d41e27bc89)
2007-10-10 11:17:26 -05:00
Volker Lendecke
15e26314b6 r16196: A bit of defensive programming:
Klocwork ID 1773 complained about oldest being dereferenced in line 2275 where
it could be NULL. I think you can construct extreme racy conditions where this
actually could happen.

Volker
(This used to be commit b5602cc4f1d77ed48ddca0f7f42b28706160c923)
2007-10-10 11:17:24 -05:00
Günther Deschner
395aa679f0 r16192: Fix timeformats in the winbind response struct.
(pam_winbind users were forced to change a password inappropriately)

Guenther
(This used to be commit 65643d31725a4e3fe157d66e9ecad03a65a484e2)
2007-10-10 11:17:23 -05:00
Günther Deschner
2828356be3 r16187: Fix memleak.
Guenther
(This used to be commit e7d2b84aba2f2f5d844ba6a5fdcce35c3750d0b2)
2007-10-10 11:17:23 -05:00
Günther Deschner
ee1105754c r16154: Fix winbind function table typo.
Guenther
(This used to be commit aeff1f0c47992ce3941e27e63f9b1516c4918963)
2007-10-10 11:17:23 -05:00
Günther Deschner
33c918b11a r16114: Make winbindd's group enumeration (set|get|endgrent) work again (when
enabled).

Do not bail out when a group just has 0 members.

Jeremy, please check, this has been removed with r13915.

Guenther
(This used to be commit 3a738a855d335e44e167351e6396bf3fe81a03af)
2007-10-10 11:17:21 -05:00
Günther Deschner
9467e6f41a r16080: Re-add accidentially excluded in-forest domain trusts (fixes bug #3823).
Guenther
(This used to be commit 8759a00fedfe5d8d789c8b707c924d8116da1102)
2007-10-10 11:17:20 -05:00
Günther Deschner
22a543f5bb r15985: Adding "own-domain" switch to wbinfo which is handy from time to time.
Guenther
(This used to be commit 3c9416c2bedeec7f075e94d45d08f37ae6dd41d1)
2007-10-10 11:17:16 -05:00
Günther Deschner
a6f5c79980 r15984: Correctly handle the case when there is no configuration file for
pam_winbind.

Guenther
(This used to be commit 29758ea1c4e1b9b57d27765d539306058299fcd1)
2007-10-10 11:17:16 -05:00
Günther Deschner
9f8adde941 r15983: Honour the krb5 principal name change (of the new ads join code) in the
kerberized winbind pam_auth.

Guenther
(This used to be commit 216125fe132fa6b886b99139e38988725beb88f0)
2007-10-10 11:17:16 -05:00
Günther Deschner
bb09655e84 r15982: Fix confusing order of DEBUG statements in winbindds pam_auth.
Guenther
(This used to be commit 3f5a2e49c108bfe8f8b875af9e69d5ad3b0567ee)
2007-10-10 11:17:16 -05:00
Günther Deschner
b283a205da r15977: Fillup the password_policy method in winbindd for winbindd_passdb. This
should make pam_winbind work again on a Samba PDC (and fix Bug #3800).

Guenther
(This used to be commit 4addabd054a2627133d3fff71234db18cf2c822c)
2007-10-10 11:17:16 -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
Volker Lendecke
0e1cd9eaef r15904: This does two things:
Fix more potential segfaults when something on our way to a DC connection
fails.

We can not continue if dcip_to_name() fails. With

192.168.234.100 nt4pdc
192.168.234.100 windows#1c
192.168.234.100 windows#1b

in the lmhosts file when nt4pdc is rebooted, we do find the DC's IP address,
we can connect to TCP 139 while it is booting but anything else fails. So we
fall back to put the IP address into domain->dcname. When the DC is fully up
later on we try to do the auth2 against \\192.168.234.100 which gives
INVALID_COMPUTER_NAME. And we never get out of this loop again.

Fix this.

Jerry, maybe you can take a look.

Thanks,

Volker
(This used to be commit b1244e79068af9e287252b2dfbb8d612e717674a)
2007-10-10 11:17:12 -05:00
Volker Lendecke
fc72e30c8d r15845: Ok. This was a tough one. If for some reason the tconX fails towards a domain
controller the next time we connect this child ran into a segfault because it
tried to reference a half-baked connection.

Volker
(This used to be commit c8a8204c744cf7aa1a1a6992a3433d99b6bb73a1)
2007-10-10 11:17:11 -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
Volker Lendecke
511f1cef23 r15705: Fix bug number 3788. Thanks to Jeff Wright.
Volker
(This used to be commit e4a2cb4b9143394a54ae1de91e59722c11a0b2e4)
2007-10-10 11:17:09 -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
39c45ce4f1 r15697: I take no comments as no objections :)
Expand the "winbind nss info" to also take "rfc2307" to support the
plain posix attributes LDAP schema from win2k3-r2.

This work is based on patches from Howard Wilkinson and Bob Gautier
(and closes bug #3345).

Guenther
(This used to be commit 52423e01dc209ba5abde808a446287714ed11567)
2007-10-10 11:17:08 -05:00
Jeremy Allison
a05d9e7261 r15675: Man pages say never look at the fd_set after a select
if it returned -1 (treat as undefined). Ensure we obey
this.
Jeremy.
(This used to be commit 256ae3a16bcafe70cc1a00496681c709380e4fc3)
2007-10-10 11:17:06 -05:00
Günther Deschner
ae0939ee66 r15634: Prevent passwords of winbindd's list of credential caches from beeing
swapped to disc using mlock(). (patch was reviewed by Jeremy).

Guenther
(This used to be commit 206cdbb8e9a4a0900060d56510e58b85a2b8aec5)
2007-10-10 11:17:04 -05:00
Günther Deschner
651797b41e r15632: Remove length limitation from the winbind cache cleanup traversal.
Guenther
(This used to be commit 181fa02497e353a36e311f94f5bec2e9cfd1b56e)
2007-10-10 11:17:04 -05:00
Volker Lendecke
c2e6ebe22c r15562: Attempt to fix Coverity bug # 283
(This used to be commit 3762effca5e1e2bbb2d1d9dd8504c502485eca7d)
2007-10-10 11:17:01 -05:00
Günther Deschner
f01b0cca2e r15546: When debugging is enabled be just a little more verbose in logging in
pam_winbind.

Guenther
(This used to be commit bf077fb2268b79faffd1fdda04847c37ffead32d)
2007-10-10 11:16:57 -05:00
Gerald Carter
2c029a8b96 r15543: New implementation of 'net ads join' to be more like Windows XP.
The motivating factor is to not require more privileges for
the user account than Windows does when joining a domain.

The points of interest are

* net_ads_join() uses same rpc mechanisms as net_rpc_join()
* Enable CLDAP queries for filling in the majority of the
  ADS_STRUCT->config information
* Remove ldap_initialized() from sam/idmap_ad.c and
  libads/ldap.c
* Remove some unnecessary fields from ADS_STRUCT
* Manually set the dNSHostName and servicePrincipalName attribute
  using the machine account after the join

Thanks to Guenther and Simo for the review.

Still to do:

* Fix the userAccountControl for DES only systems
* Set the userPrincipalName in order to support things like
  'kinit -k' (although we might be able to just use the sAMAccountName
  instead)
* Re-add support for pre-creating the machine account in
  a specific OU
(This used to be commit 4c4ea7b20f44cd200cef8c7b389d51b72eccc39b)
2007-10-10 11:16:57 -05:00
Günther Deschner
f9a4dcb4da r15541: Only ever store a user's password in a WINBINDD_CCACHE_ENTRY struct when
we have a reason to do so.

Guenther
(This used to be commit 4da79bd10c17277171aad26ee0278f8e5b64abdb)
2007-10-10 11:16:57 -05:00
Jeremy Allison
71465a6fbc r15539: Use portable wrapper functions instead of seteuid
directly in winbindd.
Jeremy.
(This used to be commit 2e65fcc9def5f1386a33ca4a76e494838e3a0632)
2007-10-10 11:16:56 -05:00
Günther Deschner
f65ff9d637 r15528: Make the existance of the /etc/security/pam_winbind.conf file
non-critical and fallback to only parse the argv options in that case.

Guenther
(This used to be commit 9dac3ab328e9c7ba374e0efc3fe16d940ecc9d3b)
2007-10-10 11:16:56 -05:00
Günther Deschner
7029a2ee70 r15526: Avoid double \n.
Guenther
(This used to be commit 3546187bb4a74b14071e2c23561e70e57ad13e86)
2007-10-10 11:16:56 -05:00
Günther Deschner
f777697508 r15523: Honour the time_offset also when verifying kerberos tickets. This
prevents a nasty failure condition in winbindd's pam_auth where a tgt
and a service ticket could have been succefully retrieved, but just not
validated.

Guenther
(This used to be commit a75dd80c6210d01aff104a86b0a9d39d65f2c348)
2007-10-10 11:16:55 -05:00
Volker Lendecke
64d729c84d r15479: Check in patch from bug # 3746 -- Thanks Timur
(This used to be commit ac79bba1a118635ed18d23cf84bdf15923b354c0)
2007-10-10 11:16:53 -05:00
Volker Lendecke
2e83035b83 r15478: Likewise for bug # 3763
(This used to be commit 7188ec6bd81715c4df17528bca2b2e658173043f)
2007-10-10 11:16:53 -05:00
Günther Deschner
c6fa16f330 r15460: Prefer to use the indexed objectCategory attribute (instead of
objectClass which is not indexed on AD) in LDAP queries.

Guenther
(This used to be commit 847882a98328b91a2157959c5dad0a2023223846)
2007-10-10 11:16:49 -05:00
Günther Deschner
a0ff50efa7 r15428: Add "smbcontrol winbind onlinestatus" for debugging purpose.
Guenther
(This used to be commit 9e15b1659c105b0be846e8f71c27b20eab961bd2)
2007-10-10 11:16:43 -05:00
James Peach
d2418fbf27 r15425: Use dynamic buffers in the IRIX nsswithch module to prevent truncation
of long group lists.
(This used to be commit d348d796c16679297e1f0304b8b2ba0f42010733)
2007-10-10 11:16:43 -05:00
Günther Deschner
3cdd91112e r15417: Don't use cached credentials when changing passwords.
Guenther
(This used to be commit 34b29c30b2f4b5a3c40a65ca8338c87a4c16f3ff)
2007-10-10 11:16:41 -05:00
Günther Deschner
627c4b381a r15411: Small debug fixes for the PAM module.
Guenther
(This used to be commit 1856dc0f52b2a2ba2e59f1a7a77ccd32c27928c0)
2007-10-10 11:16:41 -05:00
Günther Deschner
1ef64a46df r15399: Fix the build, sorry, Jerry :)
Guenther
(This used to be commit cc800ced60e5e6bbd923a3a0b7d58650c6e14121)
2007-10-10 11:16:40 -05:00
Günther Deschner
af3490061b r15398: Attempt to send the correct warning when a password change was attempted
too early.

Guenther
(This used to be commit 7f64a66d25f2a4aa48c2639da8e783c1759c5dd4)
2007-10-10 11:16:40 -05:00
Günther Deschner
5b7ab95fc6 r15396: Cleanup credential caches from winbind's linked list.
Guenther
(This used to be commit 7420b095077689fee4b5c9fb76cdb6533be1d465)
2007-10-10 11:16:39 -05:00
Günther Deschner
6afac6fd5b r15307: Ignore builtin groups we're a member of on the DC as those memberships
are not valid locally.

Guenther
(This used to be commit 177da7754b53348d8754d46098dbd11300234bb5)
2007-10-10 11:16:33 -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
Günther Deschner
34e810076d r15305: Let winbind search by sid directly (or in windows terms: "bind to a
sid"); works in all AD versions I tested. Also add "net ads sid" search
tool.

Guenther
(This used to be commit 5557ada6943b817d28a5471c613c7291febe2ad5)
2007-10-10 11:16:33 -05:00
Günther Deschner
41a7ea369b r15244: Fix debug typo.
Guenther
(This used to be commit 01787bd45b4186d3e997f750b08c50df9d3cbbe1)
2007-10-10 11:16:30 -05:00
Günther Deschner
351e749246 r15240: Correctly disallow unauthorized access when logging on with the
kerberized pam_winbind and workstation restrictions are in effect.

The krb5 AS-REQ needs to add the host netbios-name in the address-list.

We don't get the clear NT_STATUS_INVALID_WORKSTATION code back yet from
the edata of the KRB_ERROR but the login at least fails when the local
machine is not in the workstation list on the DC.

Guenther
(This used to be commit 8b2ba11508e2730aba074d7c095291fac2a62176)
2007-10-10 11:16:29 -05:00
Günther Deschner
66fd215dc7 r15229: Save useless roundtrips in pam_auth (fallback to samlogon) when we know
that the DC is not available.

Guenther
(This used to be commit 77407c021997db1b2a86ca26a5d125fa6b782949)
2007-10-10 11:16:29 -05:00
Günther Deschner
4e602207e1 r15228: Fix -n winbind option which has become meaningless with the persistent
cache.

Guenther
(This used to be commit e85558f4a457609f3661446dad8134e80f10bbe6)
2007-10-10 11:16:29 -05:00
Volker Lendecke
ba6f1b1f9e r15175: Try to get Stratus VOS back to build. Thanks, Paul.
Volker
(This used to be commit 74511aed221d7f9856fed7532f24c789c49c8175)
2007-10-10 11:16:28 -05:00
Volker Lendecke
817aa0bea3 r15174: Check in Ronan Waide's wbinfo -i. Thanks :-)
Volker
(This used to be commit c4cdb8086a3aa8a2e1f724e70616143adfea6e87)
2007-10-10 11:16:28 -05:00