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

876 Commits

Author SHA1 Message Date
Volker Lendecke
b824b1b7bf Add a parameter to disable the automatic creation of krb5.conf files
This is necessary because MIT 1.5 can't deal with certain types (Tree Root) of
transitive AD trusts. The workaround is to add a [capaths] directive to
/etc/krb5.conf, which we don't automatically put into the krb5.conf winbind
creates.

The alternative would have been something like a "krb5 conf include", but I
think if someone has to mess with /etc/krb5.conf at this level, it should be
easy to add the site-local KDCs as well.

Next alternative is to correctly figure out the [capaths] parameter for all
trusted domains, but for that I don't have the time right now. Sorry :-)
2009-08-26 15:28:06 +02:00
Volker Lendecke
3176ee2632 Do an early TALLOC_FREE 2009-08-25 17:38:31 +02:00
Jeremy Allison
2d0cd3e53a (Hopefully) fix the problem Kai reported with
net ads leave and IPv6. Ensure all DC lookups
prefer IPv4.
Jeremy.
2009-07-28 18:02:10 -07:00
Jeremy Allison
5d05d22999 Added prefer_ipv4 bool parameter to resolve_name().
W2K3 DC's can have IPv6 addresses but won't serve
krb5/ldap or cldap on those addresses. Make sure when
we're asking for DC's we prefer IPv4.
If you have an IPv6-only network this prioritizing code
will be a no-op. And if you have a mixed network then you
need to prioritize IPv4 due to W2K3 DC's.
Jeremy.
2009-07-28 11:51:58 -07:00
Volker Lendecke
3edcd55bf1 Remove gencache_init/shutdown
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've
been very lazy calling gencache_shutdown, so this seems not really required.
2009-07-15 10:55:20 +02:00
Volker Lendecke
c624a704be Make escape_ldap_string take a talloc context 2009-07-09 22:25:29 +02:00
Jeremy Allison
4b0658d448 Replace the "ipv4" specific strings in libcli/cldap/cldap.c with "ip". CLDAP can
run over IPv4/IPv6, even though some of the netlogon messages are IPv4 specific.
Fix the new ads_cldap_netlogon() to be IPv6/IPv4 agnostic. This compiles but
I don't have a good test env. for this (although as the previous code was
*completely* broken over IPv6 this will expose previously hidden bugs if it's broken :-).
Jeremy.
2009-06-08 15:21:48 -07:00
Volker Lendecke
14c1362034 Fix some nonempty blank lines 2009-05-31 12:16:34 +02:00
Volker Lendecke
29d25d5ebf Move ads flags mapping to lib/ 2009-05-30 10:21:38 +02:00
Volker Lendecke
0dbecbbee5 Make sid_binstring & friends take a talloc context 2009-05-28 11:33:21 +02:00
Volker Lendecke
3194ad2838 Add smbldap_pull_sid 2009-05-28 10:52:04 +02:00
Günther Deschner
8e4cd873e3 s3-cldap: check for zero ip address in ads_cldap_netlogon().
Guenther
2009-04-28 12:49:17 +02:00
Michael Adam
8185d31fb0 s3:registry: replace typedef REGISTRY_VALUE by struct regval_blob
Michael
2009-04-27 11:21:03 +02:00
Michael Adam
221151a2a2 s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.
This paves the way for hiding the typedef and the implementation
from the surface.

Michael
2009-04-27 11:21:02 +02:00
Jelmer Vernooij
b6981e79df samba3/ldb: Update the ldb_dn API to match that of the Samba 4 LDB:
* ldb_dn_new() now takes an initial DN string
 * ldb_dn_string_compose() -> ldb_dn_new_fmt()
 * dummy ldb_dn_validate(), since LDB DNs in the current implementation
   are always valid if they could be created.
2009-04-23 18:27:32 +02:00
Jelmer Vernooij
9b64073cf7 ldb/samba3: Support event context argument to ldb_init().
This argument is ignored (Samba3's LDB is synchronous) but having it
there is useful for API compatibility with the LDB used by Samba 4 and
available on some systems.
2009-04-23 18:27:31 +02:00
Jeremy Allison
96932593df Fix coverity #901 - uninitialized data.
Jeremy.
2009-04-23 02:51:55 -07:00
Jeremy Allison
e7466d0207 Add comment explaining the previous fix.
Jeremy.
2009-04-22 03:03:04 -07:00
Jeremy Allison
265ffe01f2 Fix bug #6279 - winbindd crash. Cope with LDAP libraries returning LDAP_SUCCESS but not returning a result.
Jeremy
2009-04-22 02:58:24 -07:00
Jelmer Vernooij
4c32978d97 Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
the system one is broken.
2009-04-20 23:58:26 +02:00
Wilco Baan Hofman
248554370a Make gpo_ldap.c compatible with samba 4. Add ads_get_ldap_server_name() function to samba 3. Move prototypes to root libgpo where appropriate.
gpo_ldap.c now compiles for both samba 3 and 4.

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:16 +02:00
Andrew Bartlett
3b3e21bd9b Convert Samba3 to use the common lib/util/charset API
This removes calls to push_*_allocate() and pull_*_allocate(), as well
as convert_string_allocate, as they are not in the common API

To allow transition to a common charcnv in future, provide Samba4-like
strupper functions in source3/lib/charcnv.c

(the actual implementation remains distinct, but the API is now shared)

Andrew Bartlett
2009-04-14 12:53:56 +10:00
Andrew Bartlett
574a6a8c35 s3:kerberos Rework smb_krb5_unparse_name() to take a talloc context
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 13:25:36 +02:00
Günther Deschner
d71dec9259 s3-libads: avoid NULL talloc context with ads_get_dn().
Guenther
2009-04-07 01:17:30 +02:00
Andrew Bartlett
2050187673 s3:libads Make ads_get_dn() take a talloc context
Also remove ads_memfree(), which was only ever a wrapper around
SAFE_FREE, used only to free the DN from ads_get_ds().

This actually makes libgpo more consistant, as it mixed a talloc and a
malloc based string on the same element.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 15:54:41 +02:00
Günther Deschner
97190ae184 s3-krb5: Fix Coverity #762 (REVERSE_INULL).
Guenther
2009-03-20 11:11:04 +01:00
Stefan Metzmacher
18b4925031 s3:libads: use libcli/cldap code
metze
2009-03-19 16:26:00 +01:00
Björn Jacke
011ad7245d fix build on old Heimdal based systems
Signed-off-by: Günther Deschner <gd@samba.org>
2009-03-19 14:47:48 +01:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Günther Deschner
cd7f62ab70 s3-spoolss: use rpccli_spoolss_enumprinterdataex in ldap_printer.c.
Guenther
2009-03-18 02:37:57 +01:00
Jelmer Vernooij
e6ec32f3ac Eliminate two duplicate SEC_ACE_TYPE constants already provided by
security.idl.
2009-03-01 04:59:07 +01:00
Günther Deschner
9d05e91ec0 s3-rpcclient: use rpccli_spoolss_openprinter_ex helper.
Guenther
2009-02-10 11:05:02 +01:00
Günther Deschner
25fc58afcd s3-spoolss: fix memleak in get_remote_printer_publishing_data().
Guenther
2009-02-10 10:54:15 +01:00
Günther Deschner
438af255c6 s3-rpcclient: use srv_name_slash instead of formating servername again and again.
Guenther
2009-02-09 19:07:34 +01:00
Günther Deschner
0bd5698dab s3-spoolss: use rpccli_spoolss_ClosePrinter.
Guenther
2009-02-06 18:58:34 +01:00
Günther Deschner
3accf9e80f s3: use pidl to pull a KRB5_EDATA_NTSTATUS.
Guenther
2009-02-06 10:32:49 +01:00
Karolin Seeger
3f9daf434a s3/libads: Change "ldap ssl:ads" parameter to "ldap ssl ads".
Karolin
2009-02-05 15:55:14 +01:00
Günther Deschner
b0ea179734 s3-kerberos: use KRB5_KT_KEY compat macro.
Guenther
2009-02-03 15:32:47 +01:00
Günther Deschner
3367812df6 s3-kerberos: fix ads_dedicated_keytab_verify_ticket with heimdal.
Guenther
2009-02-03 15:32:47 +01:00
Günther Deschner
1318fe8c60 Revert "fix for commit d96248a9b4 which broke Heimdal builds"
This does not build.

This reverts commit af736923a5.
2009-02-03 15:32:47 +01:00
Björn Jacke
af736923a5 fix for commit d96248a9b4 which broke Heimdal builds 2009-02-02 09:41:01 -08:00
Dan Sledz
d96248a9b4 Add two new parameters to control how we verify kerberos tickets. Removes lp_use_kerberos_keytab parameter.
The first is "kerberos method" and replaces the "use kerberos keytab"
with an enum.  Valid options are:
secrets only - use only the secrets for ticket verification (default)
system keytab - use only the system keytab for ticket verification
dedicated keytab - use a dedicated keytab for ticket verification.
secrets and keytab - use the secrets.tdb first, then the system keytab

For existing installs:
"use kerberos keytab = yes" corresponds to secrets and keytab
"use kerberos keytab = no" corresponds to secrets only

The major difference between "system keytab" and "dedicated keytab" is
that the latter method relies on kerberos to find the correct keytab
entry instead of filtering based on expected principals.

The second parameter is "dedicated keytab file", which is the keytab
to use when in "dedicated keytab" mode.  This keytab is only used in
ads_verify_ticket.
2009-02-01 20:23:31 -08:00
Michael Adam
27408de533 s3: fix bug #6073: prevent ads_connect() from using SSL unless explicitly requested
This fixes "net ads join".
It copes with the changed default "ldap ssl = start tls".
A new boolean option "ldap ssl : ads" is added to allow for
explicitly requesting ssl with  ads.

Michael
2009-01-29 13:23:06 +01:00
Gerald (Jerry) Carter
073e9f42f0 ads_connect: Return immediately on a failed GC connection.
ads_connect_gc() feeds an explicit server to ads_connect().  However, if the
resulting connection fails, the latter function was attempting to find a DC
on its own and continuing the connection.  This resulting in GC searches being
sent over a connection using port 389 which would fail when using the base
search suffix outside of the domain naming context.

The fix is to fail immediately in ads_connect() since the GC lookup ordering
is handled already in ads_connect_gc().
2009-01-16 12:15:33 -06:00
Michael Adam
0b87f210f1 s3:libads: use lock_path for creating paths to local krb5.conf files
instead of manually doing an asprintf with lp_lockdir()

Michael

squash
2009-01-16 01:02:22 +01:00
Michael Adam
37c77643f9 s3:libads: give create_local_private_krb5_conf_for_domain() a common exit point
Michael
2009-01-16 01:02:22 +01:00
Volker Lendecke
19b783cce9 Async wrapper for open_socket_out_send/recv 2009-01-04 16:42:40 +01:00
Volker Lendecke
fafb9ecc61 open_socket_out is always used with SOCK_STREAM, remove argument "type" 2009-01-03 19:22:06 +01:00
Volker Lendecke
d99aeed50f Replace a static variable and alarm() calls by using sys_select()
Günther, please check!
2008-12-31 19:33:26 +01:00
Volker Lendecke
608910d40b Fix some nonempty blank lines 2008-12-31 19:33:26 +01:00