1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-03 04:23:50 +03:00
Commit Graph

237 Commits

Author SHA1 Message Date
James Peach
95b231f028 r12878: Don't use non-static array initialisers. 2007-10-10 11:06:05 -05:00
Gerald Carter
e96000c16c r12196: patch from Krishna Ganugapati <krishnag@centeris.com>
Use the subtree delete ldap control when running 'net ads leave'
to ensure that the machine account is actually deleted.
2007-10-10 11:05:49 -05:00
Jeremy Allison
c65b752604 r12043: It's amazing the warnings you find when compiling on a 64-bit
box with gcc4 and -O6...
Fix a bunch of C99 dereferencing type-punned pointer will break
strict-aliasing rules errors. Also added prs_int32 (not uint32...)
as it's needed in one place. Find places where prs_uint32 was being
used to marshall/unmarshall a time_t (a big no no on 64-bits).
More warning fixes to come.
Thanks to Volker for nudging me to compile like this.
Jeremy.
2007-10-10 11:05:42 -05:00
Günther Deschner
95543fab0f r11875: Allow to use START_TLS (by manually setting "ldap ssl = start_tls") for
LDAP connections to ADS (Windows 2003).

Guenther
2007-10-10 11:05:33 -05:00
Gerald Carter
a33e78aced r11863: BUG 3196: patch from Alex Deiter <tiamat@komi.mts.ru> to compile against the Sun LDAP client libs. But not for AD support; just ldap support 2007-10-10 11:05:31 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Günther Deschner
7285edc4fe r8048: Replace "done" with "failed".
Guenther
2007-10-10 10:58:09 -05:00
Volker Lendecke
3846c0afa1 r8047: "oid" is defined in a heimdal header. With my gcc this generates a ton of
shadowed variable warnings. Fix that.

Volker
2007-10-10 10:58:09 -05:00
Günther Deschner
28b5969942 r7994: This adds support in Winbindd's "security = ads"-mode to retrieve the POSIX
homedirectory and the loginshell from Active Directory's "Services for Unix".

Enable it with:

        winbind sfu support = yes

User-Accounts without SFU-Unix-Attributes will be assigned template-based
Shells and Homedirs as before.

Note that it doesn't matter which version of Services for Unix you use (2.0,
2.2, 3.0 or 3.5). Samba should detect the correct attributes (msSFULoginShell,
msSFU30LoginShell, etc.) automatically.

If you also want to share the same uid/gid-space as SFU then also use PADL's
ad-idmap-Plugin:

        idmap backend = ad

When using the idmap-plugin only those accounts will appear in Name Service
Switch that have those UNIX-attributes which avoids potential uid/gid-space
clashes between SFU-ids and automatically assigned idmap-ids.

Guenther
2007-10-10 10:58:07 -05:00
Jeremy Allison
316df944a4 r6595: This is Volkers new-talloc patch. Just got the go-ahead from
Volker to commit. Woo Hoo !
Jeremy.
2007-10-10 10:56:46 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Gerald Carter
f3f315b14d r5956: more compile warngin fixes from the Mr. Mader 2007-10-10 10:56:11 -05:00
Gerald Carter
cc6c769c3c r5948: more compile cleanups from Jason Mader 2007-10-10 10:56:10 -05:00
Gerald Carter
75a223f118 r5336: BUG 2329: fix to re-enable winbindd to locate DC's when 'disable netbios = yes' 2007-10-10 10:55:38 -05:00
Gerald Carter
9019a84361 r5207: patches from Jay Fenlason @ RedHat (scooped from their Fedora packages) 2007-10-10 10:55:33 -05:00
Jeremy Allison
0f0281c234 r4665: Fix inspired by posting from Joe Meadows <jameadows@webopolis.com>.
Make all LDAP timeouts consistent.
Jeremy.
2007-10-10 10:53:50 -05:00
Jeremy Allison
5c22cb082c r4346: Fix cut-and-paste error - bugid #2189. Fixed by Buck Huppmann <buckh@pobox.com>
Jeremy.
2007-10-10 10:53:45 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Volker Lendecke
fc454c8ef6 r3841: Time out in ads search queries. Even AD servers can hang.
Volker
2007-10-10 10:53:20 -05:00
Jeremy Allison
b815247747 r3764: Ensure on failure that *res is always NULL.
Check for malloc fail. Fixes for bug #2036.
Jeremy.
2007-10-10 10:53:17 -05:00
Jeremy Allison
2ae717cd2c r3569: Fix for bug #1651, added extra servicePrincipalNames for kerberos interop.
Modified the redhat patch some...
Jeremy.
2007-10-10 10:53:10 -05:00
Jeremy Allison
0f3f7b035b r3273: Ensure we're consistent in the use of strchr_m for '@'.
Jeremy.
2007-10-10 10:53:03 -05:00
Günther Deschner
8836621694 r2832: Readd WKGUID-binding to match the correct default-locations of new
User-, Group- and Machine-Accounts in Active Directory (this got lost
during the last trunk-merge).

This way we match e.g. default containers moved by redircmp.exe and
redirusr.exe in Windows 2003 and don't blindly default to cn=Users or
cn=Computers.

Further wkguids can be examied via "net ads search wellknownobjects=*".
This should still keep a samba3-client joining a samba4 dc. Fixes
Bugzilla #1343.

Guenther
2007-10-10 10:52:54 -05:00
Gerald Carter
2bf08aaa37 r2091: only use sAMAccountName and not userPrincipalName since the breaks winbindd (lookup_name() only works with the sAMAccountName) -- *please* test this change. My tests all pass but there is probably something I missed 2007-10-10 10:52:31 -05:00
Gerald Carter
959da6e176 r1381: fixing behavior found by gd@sernet.de; we must use the userPrincipalName value (host/hostname@REALM) and not the servicePrincipalName (host/fqdn@REALM) in the SASL binds 2007-10-10 10:52:09 -05:00
Volker Lendecke
b7267121af r1330: Fix the build for systems without ldap headers 2007-10-10 10:52:07 -05:00
Jeremy Allison
e5b3094c4c r1317: Patch from Joe Meadows "Joe Meadows" <jameadows@webopolis.com> to
add a timeout to the ldap open calls. New parameter, ldap timeout
added.
Jeremy.
2007-10-10 10:52:06 -05:00
Jeremy Allison
ad440213aa r1222: Valgrind memory leak fixes. Still tracking down a strange one...
Can't fix the krb5 memory leaks inside that library :-(.
Jeremy.
2007-10-10 10:52:00 -05:00
Jeremy Allison
f0f2e28958 r1215: Intermediate checkin of the new keytab code. I need to make sure I
haven't broken krb5 ticket verification in the mainline code path,
also need to check with valgrind. Everything now compiles (MIT, need
to also check Heimdal) and the "net keytab" utility code will follow.
Jeremy.
2007-10-10 10:52:00 -05:00
Jeremy Allison
9647394e7c r764: More memleak fixes in error code path from kawasa_r@itg.hitachi.co.jp.
Jeremy.
2007-10-10 10:51:37 -05:00
Jeremy Allison
ac501348f4 r562: Memory leak fix in error code path from kawasa_r@itg.hitachi.co.jp.
Jeremy.
2007-10-10 10:51:29 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Andrew Bartlett
8621899112 Bug found by gd - the new range-reterival code did still had 'member'
hardcoded into it.

This didn't matter, as we only use it for 'member' so far...

Andrew Bartlett
-
Andrew Bartlett
3a4c56e4c6 Try to keep vl happy - shorten some of these lines. -
Andrew Bartlett
131bb928f1 Fix for bug 707, getent group for huge ads groups (>1500 members)
This introduces range retrieval of ADS attributes.

VL rewrote most of Gnther's patch, partly to remove code duplication and
partly to get the retrieval of members in one rush, not interrupted by the
lookups for the DN.

I rewrote that patch, to ensure that we can keep an eye on the USN
(sequence number) of the entry - this allows us to ensure the read was
atomic.

In particular, the range retrieval is now generic, for strings.  It
could easily be made generic for any attribute type, if need be.

Andrew Bartlett
-
Volker Lendecke
0c8ee04c78 After talking with abartlet remove the fix for bug 707 again.
Volker
-
Volker Lendecke
9d8235bf41 Fix for bug 707, getent group for huge ads groups (>1500 members)
This introduces range retrieval of ADS attributes.

I've rewritten most of Gnther's patch, partly to remove code duplication and
partly to get the retrieval of members in one rush, not interrupted by the
lookups for the DN.

Andrew, you told me that you would like to see a check whether the AD sequence
number is the same before and after the retrieval to achieve atomicity. This
would be trivial to add, but I'm not sure that we want this, as this adds two
roundtrips to every membership query. We can not know before the first query
whether we get additional range values, and at that point it's too late to ask
for the USN.

Tested with a group of 4000 members along with lots of small groups.

Volker
-
Andrew Bartlett
494781f628 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
-
Jeremy Allison
6d46e66ac2 Fix from ndb@theghet.to to allow an existing LDAP machine account to be
re-used, rather than created from scratch.
Jeremy.
-
Volker Lendecke
94860687c5 Get rid of a const warning
Volker
-
Jeremy Allison
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
-
Gerald Carter
1cfbd92404 don't call ads_destroy() twice; fixes segfault in winbindd when DC goes down; bug 437 -
Jeremy Allison
910d21d316 Fix a nasty mess, and also bug #296. passdb/pdb_ldap.c was not converting
to/from utf8 for some calls. The libads code gets this right. Wonder why
the passdb code doesn't use it ?
Jeremy.
-
Gerald Carter
89f6adf830 revert retry loops in winbindd_ads as abartket points out, we
already have ads_search_retry() for this.  However, neither
domain_sid() nor sequence_nunber() used this function.  So modify
them to us ads_do_search_retry() so we can specify the base search
DN and scope.
-
Gerald Carter
ae452e51b0 metze's autogenerate patch for version.h -
Jim McDonough
c9b209be2b Update my copyrights according to my agreement with IBM -
Gerald Carter
0ab00ccaed working on transtive trusts issue:
* use DsEnumerateDomainTrusts() instead of LDAP search.
    wbinfo -m now lists all trusted downlevel domains and
    all domains in the forest.

Thnigs to do:

  o Look at Krb5 connection trusted domains
  o make sure to initial the trusted domain cache as soon
    as possible
-
Gerald Carter
6edc7e0a74 fix case where no realm or workgroup means to use our own -
Gerald Carter
83376671c5 connect to the right realm or domain for trusted AD domains -
Tim Potter
42fdcef324 Call the synchronous version of the ldap delete function otherwise we end up
treating the returned message id as an error code.
-