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

404 Commits

Author SHA1 Message Date
Garming Sam
ad4048bb0a param: rename lp function and variable from "renameuser_script" to "rename_user_script"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:16 -08:00
Andreas Schneider
6366ebb79b s3-lib: Add grpname to talloc_sub_specified().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-21 15:00:44 -08:00
Christian Ambach
324b3cc00c s3:passdb/pdb_ldap remove an unnecessary check
as general passdb code already verifies for which
idmap domains the module is responsible, requests for
other domains should not come in here any more

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Christian Ambach <ambi@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2013-06-21 10:44:22 +02:00
Christian Ambach
01e094b53f s3:passdb/pdb_ldap make the module handle well-known
overwrite the passdb defaults and let this module handle well-knowns

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-06-21 10:44:21 +02:00
Andrew Bartlett
1165776d86 pdb_ldap: Do not skip accounts without a sambaAcctFlags value
We allow this to mean a sambaAcctFlags value of zero in other parts of the code
and by allowing these users to show up in a search, we can read and correct them
during the classicupgrade, rather than not know they exist at all.

Most parts of the code do not look for ACB_NORMAL, which is why
these users appear to work.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:02 +02:00
Andreas Schneider
1b582c4bf8 Rename pdb_ldap to pdb_ldapsam
This patch moves pdb_ldap to pdb_ldapsam unconditionally
and makes possible to load ldapsam.so dynamically

Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-06 11:51:11 +01:00
Michael Adam
5fbdc5f35a s3:passdb:pdb_ldap: treat "Unix User" and "Unix Group" in sid_to_id()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:31 +01:00
Michael Adam
a0f4129448 s3:passdb:pdb_ldap: pre-validate sid with sid_check_object_is_for_passdb()
instead of sid_check_sid_is_in_our_sam). This allows for builtin sids,
wellknown sids and "Unix User" and "Unix Group" domains.

This broadens up the check moved here in commit
02e25b2a43.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:30 +01:00
Christian Ambach
83ed9b52e7 s3:pdb_ldap remove unused function
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Sat Sep 22 04:28:37 CEST 2012 on sn-devel-104
2012-09-22 04:28:37 +02:00
Alexander Bokovoy
140bb288be s3-smbldap: use smbldap_ prefixed functions 2012-09-07 12:31:42 +02:00
Alexander Bokovoy
57ce825c8b s3-passdb: convert pdb_ldap to use secrets wrappers 2012-09-07 12:31:42 +02:00
Andrew Bartlett
02e25b2a43 s3-passdb: Allow pdb_sid_to_id to work on any SID
This is needed so that pdb_samba4 can map any SID during a provision.

At runtime, winbindd will be asked first, but this shortcut direct to the
ldb file makes it possible to set the permissions on the sysvol share at
provision time.

Andrew Bartlett
2012-08-21 15:25:49 +10:00
Jeremy Allison
b70f23c2b5 Correctly check for errors in strlower_m() returns. 2012-08-09 12:08:18 -07:00
Günther Deschner
867de2f3aa s3-pdb: remove unused variables.
Guenther

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jul 24 14:49:42 CEST 2012 on sn-devel-104
2012-07-24 14:49:41 +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
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Michael Adam
1ee95e4cb1 s3: rename sid_check_is_in_our_domain() to sid_check_is_in_our_sam()
This does not check whether the given sid is in our domain, but
but whether it belongs to the local sam, which is a different
thing on a domain member server.

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 12 18:36:02 CEST 2012 on sn-devel-104
2012-07-12 18:36:02 +02:00
Michael Adam
c43505b621 s3: rename sid_check_is_domain() to sid_check_is_our_sam()
This does not check whether the given sid is the domain sid,
but whether it is the sid of the local sam, which is different
for a domain member server.
2012-07-12 16:43:51 +02:00
Andreas Schneider
02c239c6d3 s3-passdb: Remove obsolte ldapsam_compat support. 2012-07-03 21:56:49 +02:00
Andrew Bartlett
c844f65779 s3-idmap: convert most idmap_cache callers to unixid API
This will eventually allow the struct unixid to be passed all the way up
and down the stack.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 13:18:03 +02:00
Andrew Bartlett
a6e29f23f0 s3-passdb: Change pdb_sid_to_id() to return struct unixid
This will make it easier to consistantly pass a struct unixid all the way up and
down the idmap stack, and allow ID_TYPE_BOTH to be handled correctly.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 12:45:29 +02:00
Michael Adam
c89affbd8d s3:passdb: do not use the in-memory idmap cache (it will be removed) 2012-04-20 23:17:36 +02:00
Volker Lendecke
5ca8422d02 s3: Remove an unused variable
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Apr 20 12:44:20 CEST 2012 on sn-devel-104
2012-04-20 12:44:20 +02:00
Andrew Bartlett
4471778d78 s3-passdb: Remove unused sampass->pass_must_change_time
There is no need to call pdb_set_pass_must_change_time() because
nothing ever consults that value.  It is always calculated from the
domain policy.

Also, this means we no longer store the value in LDAP.  The value
would only ever be set when migrating from tdbsam or smbpasswd, not on
password changes, so would become incorrect over time.

Andrew Bartlett
2012-04-19 12:34:33 +02:00
Volker Lendecke
0528cb5f3a s3: Fix bug 8567 -- segfault in dom_sid_compare
The underlying problem was that with ldapsam:trusted we require the
a group mapping for the primary group of every user, including root.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Feb 20 22:36:23 CET 2012 on sn-devel-104
2012-02-20 22:36:23 +01:00
Jeremy Allison
a9e03337c1 Finally remove all malloc()'s from the substitute code. Now totally
talloc() based.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan 27 03:43:21 CET 2012 on sn-devel-104
2012-01-27 03:43:21 +01:00
Günther Deschner
65e2944c67 s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
8312ee1367 s3-passdb: split out passdb/pdb_ldap_schema.c
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
28f8ccbe8b s3: move smbldap_util to pdb_ldap_util.
Guenther
2011-11-16 12:26:26 +01:00
Andrew Bartlett
1fb836d863 s3-passdb Initialise the correct level of pointer dereference
*pp_rmap may be NULL or un-initialised data.

This was introduced by 995d156726.

Andrew Bartlett
2011-11-09 23:38:25 +01:00
Günther Deschner
2330e52cac s3-passdb: use tevent_context in passdb.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104
2011-10-28 13:09:47 +02:00
Simo Sorce
605d7d965a pdb-interface: Do not use unid_t here
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
2011-10-18 20:57:16 +02:00
Simo Sorce
995d156726 s3-group-mapping: Remove fstrings from GROUP_MAP.
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12 19:28:12 +02:00
Günther Deschner
e5682847fa s3-passdb: split out passdb/pdb_ipa.h.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Oct 11 12:15:36 CEST 2011 on sn-devel-104
2011-10-11 12:15:36 +02:00
Günther Deschner
6cc2843dc6 s3-passdb: split out passdb/pdb_nds.h.
Guenther
2011-10-11 10:41:29 +02:00
Günther Deschner
a1f4fe7e08 s3-passdb: split out passdb/pdb_ldap.h.
Guenther
2011-10-11 10:41:29 +02:00
Björn Jacke
dcb5720ad0 s3/ldap: don't continue if we couldn't get the domain info on startup
while some things work without the domain info, some important things don't,
which is highly irritating. As even calls like EnumTrustDom fail and
thus clients' domain logins fail we are sufficiently broken to refuse to go on.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Aug 18 12:48:37 CEST 2011 on sn-devel-104
2011-08-18 12:48:37 +02:00
Andrew Bartlett
add8505fde s3-passdb Make pdb_element_is_changed available to all passdb modules
This will allow pdb_samba4 to use this

Andrew Bartlett
2011-08-13 12:30:49 +10: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
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Günther Deschner
2f36ef7225 s3-passdb: add passdb.h where needed.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
d85f140826 s3-winbind: remove global inclusion of libwbclient.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
96487959e9 lib/util/util_pw: share more code between lib/util/util_pw.c and source3/lib/username.c
Guenther
2011-03-30 01:13:06 +02:00
Volker Lendecke
08e4e7fef7 s3: Fix Coverity ID 513: UNINIT 2011-03-27 22:22:10 +02:00
Günther Deschner
ba510fae23 s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.
We were not taking into account the existing posix attributes and thus failed
while trying to add a 2nd uid attribute.

Found by Sumit.

Guenther
2011-03-24 23:08:22 +01:00
Volker Lendecke
f6f8ec8d8b s3: Move EXOP definitions to smbldap.h
This attempts to fix the build on Solaris

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 10:45:16 CET 2011 on sn-devel-104
2011-03-06 10:45:16 +01:00
Jelmer Vernooij
59a077d8f5 Fix some types
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Feb 28 23:30:06 CET 2011 on sn-devel-104
2011-02-28 23:30:06 +01:00