1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
Commit Graph

66 Commits

Author SHA1 Message Date
Christof Schmitt
7f2d12c4c0 Rename module init functions from samba_init_module
Some modules use samba_init_module as the name for the init functions,
others use a name based on the module name.

Rename the init functions from samba_init_module, to be consistent
across all modules. This change also allows to build idmap_tdb2 and
perfcount_test statically.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  2 08:50:04 CEST 2014 on sn-devel-104
2014-04-02 08:50:03 +02:00
Günther Deschner
9d08ac424c s3-winbindd: remove unneded include of secrets.h from idmap_ad.c
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29 16:57:51 +02:00
Björn Jacke
f08205be70 winbind/idmap_ad: be verbose about the user that we fail to map
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-14 19:53:29 +02:00
Christof Schmitt
ad1fbe29fb s3-winbindd: Move connection to AD server from idmap_ad
Having this in a common place allows reuse by other idmap modules.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09 06:30:22 +01:00
Christof Schmitt
baf9b78d47 s3-winbindd: Use common helper function for connecting to ADS
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09 06:30:22 +01:00
Christof Schmitt
0c4e467c1c s3-winbindd: Move code for verifying ADS connection to common helper function
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09 06:30:22 +01:00
Christof Schmitt
86d09ce779 s3-winbindd: Move common code for LDAP id mapping to idmap_utils
idmap_ad and idmap_ldap use the same helper functions and the same
maximum query size. Move the code to idmap_utils so that it can be
shared by every module issuing LDAP queries.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09 06:30:22 +01:00
Christof Schmitt
523d5a86de s3-winbind: Remove unused bool "local"
"local" is always False, so simply remove it and the if statement
checking its value.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Feb  6 23:27:48 CET 2012 on sn-devel-104
2012-02-06 23:27:48 +01:00
Jelmer Vernooij
05bc4de083 Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104
2011-12-03 08:36:30 +01:00
Günther Deschner
e80e218152 s3-modules: remove the last "init_module" traces.
Guenther
2011-11-14 18:44:41 +01:00
Andrew Bartlett
b256799eaf lib/util Rename samba_init_module -> samba_module_init
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Christian Ambach
a4d245b3e8 s3:winbindd/idmap make idmap modules loadable again
commit 355b5e3a83 changed the module system to
expect 'samba_init_module' as fixed initializer function
2011-10-21 16:30:56 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Michael Adam
82853a613b s3:idmap: remove the params argument from the init function 2011-03-22 22:49:56 +01:00
Volker Lendecke
233c8bca3b s3: Remove close_fn from idmap_methods
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 13:37:13 CET 2011 on sn-devel-104
2011-03-06 13:37:13 +01:00
Volker Lendecke
4daf01f38b s3: Replace idmap_ad_close by a destructor 2011-03-06 12:51:02 +01:00
Volker Lendecke
41c85650c9 s3-idmap-ad: Make ad_schema properly talloced 2011-03-06 12:51:02 +01:00
Volker Lendecke
d76b3fd0a8 s3: Remove some unused code 2011-03-06 12:51:01 +01:00
Volker Lendecke
99d98e31bc s3: Remove unused args from get_nss_info 2011-03-06 12:51:01 +01:00
Volker Lendecke
eeeae97389 s3: Fix a typo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 27 20:14:20 CET 2011 on sn-devel-104
2011-02-27 20:14:20 +01:00
Volker Lendecke
32731db56f s3: Fix some nonempty blank lines 2011-02-27 19:27:44 +01:00
Volker Lendecke
0decc29b3a s3: Fix a debug message
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 27 16:59:19 CET 2011 on sn-devel-104
2011-02-27 16:59:19 +01:00
Michael Adam
3e52b99a31 s3:winbindd/idmap_ad.c: update my C
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jan  3 09:19:07 CET 2011 on sn-devel-104
2011-01-03 09:19:07 +01:00
Volker Lendecke
d6337bb1be s3: Fix bug 7832
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Nov 30 14:39:34 CET 2010 on sn-devel-104
2010-11-30 14:39:34 +01:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Andrew Bartlett
d7bc452a89 s3: Replace sid_binstring and sid_guidstring with PIDL-based alternatives
This reduces the manual marshalling of these structures by removing
the duplication here.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-20 16:15:03 -07:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Günther Deschner
2b41f421fd s3-idmap: only include idmap headers where needed.
Guenther
2010-08-26 00:20:29 +02:00
Michael Adam
9897647584 s3:idmap_ad: untangle two assignments from checks 2010-08-14 02:10:56 +02:00
Michael Adam
264910b06f s3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
The filter range from the idmap_domain is used now.
2010-08-14 02:10:56 +02:00
Michael Adam
d515d7fe49 s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids() 2010-08-14 02:10:56 +02:00
Michael Adam
96607d9543 s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids() 2010-08-14 02:10:55 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +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
d1538add73 s3-nss_info: only include nss_info.h where needed.
Guenther
2010-07-01 23:20:40 +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
dff7be8ccb s3-libads: only include libds flags where needed.
Guenther
2010-07-01 23:20:40 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Volker Lendecke
7180ae0b8e Add some const to winbind_userinfo 2009-08-03 22:48:45 +02:00
Volker Lendecke
0dbecbbee5 Make sid_binstring & friends take a talloc context 2009-05-28 11:33:21 +02:00
Bo Yang
deb73e87b2 More fix to initialize idmap statuses 2009-03-02 15:51:55 -08:00
Tim Prouty
1bcd91366d s3: Fix 'ctx' might be used unitialized warnings 2008-12-01 21:59:00 -08:00
Michael Adam
82ee6d2f7d s3:winbindd/idmap_ad: add entry debug message to nss_ad_get_info()
Michael
2008-12-01 04:37:22 +01:00
Michael Adam
484fa90aef s3:winbindd/idmap_ad: add support for trusted domains to idmap_ad (bug #3661)
This initial fix does at least work for explicitly configured domains.

The patch has a few disadvantages:

1. It does work only for explicitly configured domains, not with
   the default backend (idmap backend = ad), since it relies on the
   domain name being passed in via the idmap_domain. One workaround
   for this would be to create clones of the default idmap_domain
   for domains not explicitly configured.

2. It calls find_domain_from_name_noinit() from idmap_ad_cached_connection.
   The problem here is that only the NetBIOS domain name (workgroup
   name) is passed in via the idmap_domain struct, and the module
   has to establish a connection to the domain based on that information.
   find_domain_from_name_noinit() has the disadvantage that it uses the state
   of the domain list at fork time (unless used from the main winbindd).
   But this should be ok as long as the primary domain was reachable at
   start time.

For nss_info, the situation is similar - This will only work for domains
explicitly configured in smb.conf as follows:
"winbind nss info = rfc2307:dom1 sfu:dom2 rfc2307:dom3 template:dom4"
Setting the default nss info to one of the ad backends (rfc2307, sfu, sfu20)
will fail since the domain name is not passed in with the nss_domain_entry.

Michael
2008-12-01 04:37:22 +01:00
Michael Adam
be233ae32a s3:winbindd/idmap_ad: refactor core of nss_{sfu|sfu20|rfc2307}_init to common function.
Michael
2008-12-01 04:37:22 +01:00
Michael Adam
73fddcd656 s3:winbindd/idmap_ad: rename ctx to mem_ctx in nss_ad_get_info()
in preparation to using the idmap_ad_context there

Michael
2008-12-01 04:37:22 +01:00
Michael Adam
757a1f5132 s3:winbindd/nss_info: change nss_map_{to|from}_alias to take nss_domain_entry
instead of just the domain name

Michael
2008-12-01 04:37:20 +01:00
Michael Adam
03304c5152 Revert "UNFINISHED - s3:idmap_ad: multi-domain"
This reverts commit 6a4957d35d.

Sorry - this got accidentially pushed.

Michael
2008-11-25 15:24:43 +01:00
Michael Adam
6a4957d35d UNFINISHED - s3:idmap_ad: multi-domain
Michael
2008-11-25 11:29:42 +01:00
Volker Lendecke
bc9bbda8b3 Fix a valgrind error in idmap_ad_sids_to_unixids()
We need to initialize all mappings in case we don't find anything.

Simo, please check!

Volker
2008-10-20 21:08:20 +02:00