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

99 Commits

Author SHA1 Message Date
Simo Sorce
893b213876 Avoid overriding default ccache for ads operations.
Avoid overriding default ccache for ads operations.

Nowadays various samba components may need to use GSSAPI and a default cred
cache to perform their tasks.
This code was completely overriding the whole process default ccache name, thus
altering the current credentials and sometimes hijacking them (or getting
preemptively hijaked).

By using gss_krb5_import_cred we can instead use a private ccache (necessary
sometimes to use a different set of credentials fromt he default
cifs/fqdn@realm one, for example when contacting foreign DCs using trust
credentials) that does not affect the rest of the process.

For the kerberos versions which don't have gss_krb5_import_cred
we fallback to temp override of KRB5CCNAME and gss_acquire_cred.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Wed Sep 12 21:18:09 CEST 2012 on sn-devel-104
2012-09-12 21:18:09 +02:00
Andrew Bartlett
f3562424b6 lib/param: Move all enum declarations to lib/param
This is in preperation for the parameter table being made common.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-24 11:01:17 +02:00
Andrew Bartlett
0da10c842e s3-libads: Use a reducing page size to try and cope with a slow LDAP server
If we cannot get 1000 users downloaded in 15seconds, try with 500, 250
and then 125 users at a time.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-26 02:03:08 +02:00
Volker Lendecke
f6fa51ddf7 s3: Fix some nonempty blank lines 2011-09-13 11:00:12 +02:00
Günther Deschner
1e208a7057 s3-includes: no need to globally include libads/ads_status.h.
Guenther
2011-05-06 16:37:22 +02:00
Günther Deschner
fad0112373 s3-build: stop including ldap and lber headers everywhere in the code.
Instead use new header smb_ldap.h where all LDAP API related things are handled,
while smbldap.h only deals with our smbldap_X() API.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Mar 16 10:54:51 CET 2011 on sn-devel-104
2011-03-16 10:54:50 +01:00
Björn Jacke
5b016dbab8 s3/libads: use monotonic clock for ldap connection timeouts 2010-09-07 20:37:53 +02:00
Günther Deschner
e7a6a3ec0d s3: avoid global include of ads.h.
Guenther
2010-08-05 00:32:02 +02:00
Günther Deschner
04641abb33 s3-libads: move ldap posix schema defines to their own header file.
Guenther
2010-07-01 23:20:40 +02:00
Günther Deschner
3f453f73a8 s3-libads: move spnego defines to their appropriate header file.
Guenther
2010-07-01 23:20:40 +02:00
Günther Deschner
dff7be8ccb s3-libads: only include libds flags where needed.
Guenther
2010-07-01 23:20:40 +02:00
Günther Deschner
6d810eff81 s3-libads: move keytab macros out of ads.h.
Guenther
2010-07-01 23:20:40 +02:00
Günther Deschner
e64df82146 s3-libads: move ads_status to a separate header file.
Guenther
2010-07-01 23:20:39 +02:00
Günther Deschner
2f9076ac29 s3-libads: use shared well known guids.
Guenther
2010-07-01 21:17:17 +02:00
Günther Deschner
b9e6962dd7 s3-libads: move KRB5_ENV_CCNAME to separate header krb5_env.h.
Guenther
2010-07-01 21:17:17 +02:00
Günther Deschner
04f8c229de s3-kerberos: only use krb5 headers where required.
This seems to be the only way to deal with mixed heimdal/MIT setups during
merged build.

Guenther
2009-11-27 16:36:00 +01:00
Andrew Tridgell
5d60a7e23e s3-ads: removed 3 unused defines
These are in nbt.idl and netlogon.idl as well, no need to have them
here under different names, especially when the comments are wrong
2009-10-02 12:01:59 +10:00
Günther Deschner
503d035814 spnego: share spnego_parse.
Guenther
2009-09-17 01:12:20 +02:00
Günther Deschner
8db45607f8 libds: share UF_ flags between samba3 and 4.
Guenther
2009-07-13 15:36:06 +02:00
Jelmer Vernooij
d2bd5895cf Move gpo_sec to top-level.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:16 +02:00
Günther Deschner
3accf9e80f s3: use pidl to pull a KRB5_EDATA_NTSTATUS.
Guenther
2009-02-06 10:32:49 +01:00
Stefan Metzmacher
588f5aae66 s3: correctly detect if the current dc is the closest one
ads->config.tried_closest_dc was never set.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit dfe5b00db3)
2008-12-13 11:42:22 +01: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
Günther Deschner
ea0686e64a kerberos: fix HAVE_KRB5 related build issue.
Guenther
(This used to be commit 7d7ba83977)
2008-08-29 11:38:02 +02:00
Günther Deschner
87ea8f3fae kerberos: add KRB5_KT_KEY abstraction macro.
Guenther
(This used to be commit be846d5383)
2008-08-29 11:01:34 +02:00
Günther Deschner
0380fe9d82 kerberos: move the KRB5_KEY* macros to header file.
Guenther
(This used to be commit c28fa17fff)
2008-08-29 10:59:28 +02: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
Günther Deschner
6b4b76c40e libads: add ADS_AUTH_USER_CREDS to avoid magic overwriting of usernames.
Guenther
(This used to be commit b5aaf5aa0f)
2008-06-24 23:37:40 +02:00
Günther Deschner
a29b042204 Remove DomainControllerAddressType which we now have in IDL.
Guenther
(This used to be commit 0a012c12d6)
2008-02-28 23:15:30 +01:00
Günther Deschner
0adf8621cd Move DS_DOMAIN_FUNCTION defines to ads.h.
Guenther
(This used to be commit 2605c6758e)
2008-01-29 15:15:28 +01:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Günther Deschner
647abf0a7b r24804: As a temporary workaround, also try to guess the server's principal in the
"not_defined_in_RFC4178@please_ignore" case to make at least LDAP SASL binds
succeed with windows server 2008.

Guenther
(This used to be commit f5b3de4d30)
2007-10-10 12:30:23 -05:00
Stefan Metzmacher
cc8d700364 r24131: - make it more clear what the different min and max fields mean
- with the "GSSAPI" sasl mech the plain, sign or seal negotiation
  is independed from the req_flags and ret_flags
- verify the server supports the wrapping type we want
- better handling on negotiated buffer sizes

metze
(This used to be commit d0ec732387)
2007-10-10 12:29:09 -05:00
Stefan Metzmacher
09a16eba87 r24039: remove unused global variable...
metze
(This used to be commit 05fce8815f)
2007-10-10 12:28:58 -05:00
Stefan Metzmacher
ea3c3b9272 r23946: add support for NTLMSSP sign and seal
NOTE: windows servers are broken with sign only...

metze
(This used to be commit 408bb2e6e2)
2007-10-10 12:28:48 -05:00
Stefan Metzmacher
07c034f7c4 r23945: add infrastructure to select plain, sign or seal LDAP connection
metze
(This used to be commit 2075c05b3d)
2007-10-10 12:28:48 -05:00
Stefan Metzmacher
307e51ed14 r23926: implement output buffer handling for the SASL write wrapper
metze
(This used to be commit 65ce6fa21a)
2007-10-10 12:28:45 -05:00
Stefan Metzmacher
7bef162aeb r23922: implement input buffer handling for the SASL read wrapper
metze
(This used to be commit 7d8518ebd9)
2007-10-10 12:28:42 -05:00
Stefan Metzmacher
77619f37a0 r23898: rename HAVE_ADS_SASL_WRAPPING -> HAVE_LDAP_SASL_WRAPPING
metze
(This used to be commit 873eaff8fe)
2007-10-10 12:28:39 -05:00
Stefan Metzmacher
fc3f3c655b r23896: hopefully fix the build on most systems
metze
(This used to be commit d5512da62a)
2007-10-10 12:28:39 -05:00
Stefan Metzmacher
57dd25cccb r23893: add dummy callbacks for LDAP SASL wrapping,
they're not used yet...

metze
(This used to be commit a3b97cdce7)
2007-10-10 12:28:39 -05:00
Stefan Metzmacher
809c9d4d31 r23888: move elements belonging to the current ldap connection to a
substructure.

metze
(This used to be commit 00909194a6)
2007-10-10 12:28:38 -05:00
Günther Deschner
b62ade20d0 r23838: Allow to store schema and config path in ADS_STRUCT config.
Guenther
(This used to be commit 1d5b08326f)
2007-10-10 12:28:33 -05:00
Günther Deschner
1c957f9559 r23826: Fix gpo security filtering by matching the security descriptor ace's for the
extended apply group policy right.

Guenther
(This used to be commit d832014a6f)
2007-10-10 12:28:31 -05:00
Günther Deschner
a83b84cbd5 r23766: Add GTYPE_SECURITY_UNIVERSAL_GROUP define.
Guenther
(This used to be commit 964acb2716)
2007-10-10 12:23:54 -05:00
Günther Deschner
47bd42ab1c r23607: Add legacy support for Services for Unix (SFU) 2.0.
Guenther
(This used to be commit 11b390309b)
2007-10-10 12:23:35 -05:00
Günther Deschner
cab1200b43 r23128: Fix typo.
Guenther
(This used to be commit 52fdbbda53)
2007-10-10 12:22:48 -05:00
Lars Müller
ddf25a79f6 r22841: Add comment to endif statement.
(This used to be commit 1351207626)
2007-10-10 12:22:01 -05:00
Günther Deschner
9c170fce26 r22797: We are only interested in the DACL of the security descriptor, so search with
the SD_FLAGS control.

Guenther
(This used to be commit 648df57e53)
2007-10-10 12:21:57 -05:00
Günther Deschner
116c1532e7 r22664: When we have krb5_get_init_creds_opt_get_error() then try to get the NTSTATUS
codes directly out of the krb5_error edata.

Guenther
(This used to be commit dcd902f24a)
2007-10-10 12:19:53 -05:00