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

310 Commits

Author SHA1 Message Date
Stefan Metzmacher
7cd8fbcca5 s4:libcli: make use of gensec_update_ev()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-27 00:36:31 +01:00
Howard Chu
b3bb304036 Prepare for SASL/EXTERNAL support
Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-09-18 19:47:55 +02:00
Stefan Metzmacher
71c63e85e7 auth/gensec: introduce gensec_internal.h
We should treat most gensec related structures private.

It's a long way, but this is a start.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:19:02 +02:00
Andrew Tridgell
0e6c5c036f s4-ldapclient: cope with logon failure retry in LDAP
similar to what was done for rpc and cifs, we now retry once on logon
failure for ldap, allowing for a new ticket to be fetched when a
server password changes while we have a valid ticket for the old
password

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01 15:40:41 +11:00
Matthias Dieter Wallnöfer
c8bfb8eb09 s4:dsdb - always fail if a search filter could not be parsed
A NULL string/expression returns the generic "(objectClass=*)" filter

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:55 +02:00
Matthieu Patou
f110f2d63f s4-ldap: handle VERIFY_NAME control encoding/decoding 2012-06-22 23:22:02 -07:00
Michael Adam
9e9887d323 s4:samdb:rootdse: implement the schemaUpgradeInProgress operation in ldap modify
This is preliminary in that it is implemented as a no-op for a start
just to be able to successfully answer the request, which seems to be
sufficient in order to e.g. survive the exchange schema extensions.

Signed-off-by: Matthieu Patou <mat@matws.net>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Apr 18 02:48:28 CEST 2012 on sn-devel-104
2012-04-18 02:48:28 +02:00
Andrew Bartlett
e7d5f0a357 gensec: move event context from gensec_*_init() to gensec_update()
This avoids keeping the event context around on a the gensec_security
context structure long term.

In the Samba3 server, the event context we either supply is a NULL
pointer as no server-side modules currently use the event context.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:33 +11:00
Andrew Tridgell
7244e254cc s4-ldap: added DSDB_CONTROL_NO_GLOBAL_CATALOG to ldap encoding list
also remove all the duplicated comments

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:58 +11:00
Andrew Bartlett
16b2118b43 gensec: split GENSEC into mechanism-dependent and runtime functions
The startup and runtime functions that have no dependencies are moved
into the top level.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:01 +10:00
Jelmer Vernooij
47a41c8daf cli_composite: Lowercase name. 2011-07-26 13:31:09 +02:00
Andrew Bartlett
907cdb5de7 s4-modules Remove lp_ctx from init functions that no longer need it
Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
5694ba507c libcli/ldap pull LIBCLI_LDAP_MESSAGE and LIBCLI_LDAP_NDR into a library
This reduces symbol duplication

Andrew Bartlett
2011-04-13 11:47:36 +10:00
Stefan Metzmacher
a762e9cab7 s4:ldap_controls: allow DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID over sockets.
The DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID control has to data attached to it.
So we can allow it to be send over LDAP.

We'll accept this control over the privileged ldapi socket only.

metze
2010-12-13 15:32:04 +01:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Nadezhda Ivanova
3003bd4037 s4-ldb: Changes the aclread module to use LDB_HANDLE_FLAG_UNTRUSTED to determine the source of the request
The aclread module used to use a control to make sure the request comes from the ldap server,
but now the rootdse filters out any unregistered controls comming from ldap, so the control is
lost. Using the LDB_HANDLE_FLAG_UNTRUSTED is a much more elegant solution.

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Oct 27 11:55:11 UTC 2010 on sn-devel-104
2010-10-27 11:55:11 +00:00
Jelmer Vernooij
a74e8be6d1 waf: Stop automaticaly changing dashes to underscores in library names. 2010-10-26 10:17:18 -07:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Jelmer Vernooij
d9cbcdd410 s4: Drop duplicate 'lib' prefix for private libraries. 2010-10-26 10:17:16 -07:00
Jelmer Vernooij
5224de3f74 s4: Rename LIBCLI_LDAP to libcli_ldap. 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
833480d3ad s4: Rename LIBSAMBA-* to libsamba-* 2010-10-24 00:20:04 +00:00
Matthias Dieter Wallnöfer
f9a6ff482c s4/ldb:introduce the LDB_CONTROL_PROVISION_OID control
This control is exactly thought for the actions which previously were performed
using the RELAX one.

We agreed that the RELAX control will only remain for interactions with OpenLDAP.
2010-10-23 16:37:29 +02:00
Matthias Dieter Wallnöfer
89c42a96fc ldb:rename LDB_CONTROL_BYPASSOPERATIONAL_OID into LDB_CONTROL_BYPASS_OPERATIONAL_OID
It's nicer to have this consistent with "BYPASS_PASSWORD_HASH".
2010-10-23 16:37:29 +02:00
Andrew Tridgell
aa88884d37 s4-libcli: make LIBCLI_LDAP a private library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:24 +11:00
Andrew Bartlett
dab426476f Revert "s4:dsdb - make the RELAX control private"
This must be available to the OpenLDAP backend, to set the GUID values
in some situations.  We need a proper ACL mechanism to control the use
or abuse of this control.

This reverts commit 10adee8936.
2010-10-18 00:16:17 +00:00
Matthias Dieter Wallnöfer
10adee8936 s4:dsdb - make the RELAX control private
This makes our LDAP much more secure and less error-prone.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 19:43:36 UTC 2010 on sn-devel-104
2010-10-16 19:43:36 +00:00
Matthias Dieter Wallnöfer
02d9d8eeaf s4:libcli/ldap/ldap_controls.c - fix up the controls list
- add missing private controls and comments
- use control defines rather than hardcoded values -> easier to comprehend
- reorder controls
2010-10-16 20:48:01 +02:00
Andrew Tridgell
6676142347 s4-ildap: two more places that need talloc_reparent()
these contexts can have references

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Sep 28 00:04:03 UTC 2010 on sn-devel-104
2010-09-28 00:04:03 +00:00
Andrew Tridgell
7fbe700753 s4-ildap: fixed a talloc_steal with references error
We need talloc_reparent() instead

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 27 20:38:00 UTC 2010 on sn-devel-104
2010-09-27 20:38:00 +00:00
Stefan Metzmacher
b65a164f3e s4:libcli/ldap: fix sending oneway requests
metze
2010-09-27 08:24:36 +02:00
Nadezhda Ivanova
3d0e36bc87 s4-ldap: Added a control to apply the access checks on read via LDAP 2010-09-26 15:36:09 -07:00
Björn Jacke
d320aa1212 s4/ldap: use time_mono for reconnect timeout 2010-09-10 23:10:26 +02:00
Andrew Tridgell
191d632e23 s4-dsdb: added support for LDB_CONTROL_RODC_DCPROMO_OID
this control adds a unique msDS-SecondaryKrbTgtNumber attribute to a
user object.

There is some 'interesting' interaction with the rangeLower and
rangeUpper attributes and this add. We don't implementat
rangeLower/rangeUpper yet, but when we do we'll need an override for
this control (or be careful about module ordering).

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:49 +10:00
Andrew Tridgell
dcd9fcc7b3 s4-ldap: use common functions for ldap flag controls encode/decode
many controls are simple present/not-present flags, and don't need
their own parsers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:49 +10:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Endi S. Dewata
5bee3efaca s4/libcli: Register LDB_CONTROL_REVEAL_INTERNALS and DSDB_CONTROL_PASSWORD_CHANGE_STATUS_OID controls.
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-06-28 19:33:46 +02:00
Matthias Dieter Wallnöfer
ad5e19f29e ldb:controls - add the "TREE_DELETE" control for allowing subtree deletes 2010-06-20 18:52:29 +02:00
Matthias Dieter Wallnöfer
4cc49d365f s4:ldap_controls.c - remove encoding functions for private recalculate SD control 2010-06-20 18:52:26 +02:00
Matthieu Patou
315aeef0f9 s4: Remove an uselessly exposed control 2010-06-07 11:43:32 +02:00
Andrew Bartlett
50b472a772 s4:libcli/ldap Update headermap.txt (autotools build) and wscript_build for libcli_ldap.h
It took a little while to find where to update this...

Andrew Bartlett
2010-05-21 20:09:07 +10:00
Andrew Bartlett
c8a23147fe s4:libcli/ldap Rename ldap.h to libcli_ldap.h
It is a problem if a samba header is called ldap.h if we also want
to use OpenLDAP's ldap.h

Andrew Bartlett
2010-05-21 17:39:15 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
aa5e08eb83 s4-waf: install the rest of the headers 2010-04-06 20:27:09 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Endi S. Dewata
07669b0704 s4-libcli: Added NULL handlers for DSDB_CONTROL_DN_STORAGE_FORMAT_OID and LDB_CONTROL_AS_SYSTEM_OID
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-03-02 14:06:52 +11:00
Kamen Mazdrashki
8078614814 s4/ldap: Refactor the fix for ldap nested searches
Current implementation synchronizes processing for
all types of LDAP request, not only LDAP_Search ones.

Synchronization for ldap replies processing is done
locally in ldb_ildap module as this concerns only
ildb_callback() function.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-02-17 18:03:31 +02:00
Kamen Mazdrashki
a4d0ed5a10 s4/ldap: Fix nested searches SEGFAULT bug
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-29 14:09:53 +01:00
Matthieu Patou
db41a0afc6 s4: fix SD update and password change in upgrade script
- reserve a new Samba OID for recalculate SD control
- fix the update SD function
- fix handling of kvno in the update_machine_account_password function
- fix handling of handles in RPC winreg server

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-28 09:56:06 +11:00
Endi S. Dewata
3a8393c8aa s4:ldbcli - Added encoder/decoder for relax control. 2009-11-19 13:04:47 +11:00
Andrew Bartlett
68639bfd64 s4:libcli/ldap Add 'relax' OID to known network representations
This patch, inspired by a patche by Endi S. Dewata
<edewata@redhat.com>, allows this control to be passed to the LDAP
backend.

Andrew Bartlett
2009-11-12 22:23:22 +11:00