metze/samba/wip.git
13 years agos3:configure: allow building without SCHEDULE_FOR_DELETION with --enable-old-ctdb samba-3.4.7-ctdb-10
Michael Adam [Thu, 31 Mar 2011 14:12:02 +0000 (16:12 +0200)]
s3:configure: allow building without SCHEDULE_FOR_DELETION with --enable-old-ctdb

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Mar 31 18:55:38 CEST 2011 on sn-devel-104
(cherry picked from commit 4d105c9c30fea6d5d2a9d2e7939c54bb2f31910d)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:configure: introduce "--enable-old-ctdb" to enable enforcing build against old...
Michael Adam [Thu, 31 Mar 2011 14:06:36 +0000 (16:06 +0200)]
s3:configure: introduce "--enable-old-ctdb" to enable enforcing build against old ctdb
(cherry picked from commit 6a598b2ec0330019e677129156d6e27dbb18a225)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:configure: add check for new CTDB_CONTROL_SCHEDULE_FOR_DELETION
Michael Adam [Thu, 31 Mar 2011 13:39:41 +0000 (15:39 +0200)]
s3:configure: add check for new CTDB_CONTROL_SCHEDULE_FOR_DELETION
(cherry picked from commit 6b28d242f0d3fc2027f609c762855afae69c1deb)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:configure: rework logic of ctdb/clustering checks
Michael Adam [Thu, 31 Mar 2011 13:23:28 +0000 (15:23 +0200)]
s3:configure: rework logic of ctdb/clustering checks
(cherry picked from commit da0334ac036eb535b6ff0f7f595f61c1f712ca45)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:configure: remove unused variable CTDB_CFLAGS
Michael Adam [Thu, 31 Mar 2011 12:17:44 +0000 (14:17 +0200)]
s3:configure: remove unused variable CTDB_CFLAGS
(cherry picked from commit f6bfa5814fb6e075db97b3bde981fa52a026df00)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:configure: fix a comment.
Michael Adam [Thu, 31 Mar 2011 11:45:21 +0000 (13:45 +0200)]
s3:configure: fix a comment.
(cherry picked from commit 1eb2e59fb79c4841a3e916e8a5d03a891ba32ea7)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:dbwrap_ctdb: in ctdb_delete, send a SCHEDULE_FOR_DELETION control to local ctdbd
Michael Adam [Wed, 22 Dec 2010 13:16:07 +0000 (14:16 +0100)]
s3:dbwrap_ctdb: in ctdb_delete, send a SCHEDULE_FOR_DELETION control to local ctdbd

This way, the record will be scheduled for fast vacuuming.

This is sent with the NOREPLY flag, so ctd should not sent
a reply packet and samba does not expect one. Hence, it
is not important for the success of the db_ctdb_delete command
whether or not the ctdbd we are running against supports the
SCHEDULE_FOR_DELETION control.
(cherry picked from commit 6a3b6c8f7c14274e98c5c8e14ebf54ea260b2ecf)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:ctdb: pass the ctdb control flags to the ctdb daemon when sending the control
Michael Adam [Tue, 8 Mar 2011 15:26:34 +0000 (16:26 +0100)]
s3:ctdb: pass the ctdb control flags to the ctdb daemon when sending the control

The only flag that is currently used is the NOREPLY flag to indicate that
the client expects no reply packet. This needs to get passed down to the
ctdb daemon so that it really does not send a reply.
(cherry picked from commit 3c9ae69f34ba444bfcdc93923b2eee9ecde419de)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:ctdb: correctly handle cstatus if CTDB_CTRL_FLAG_NOREPLY is set.
Michael Adam [Thu, 23 Dec 2010 15:43:55 +0000 (16:43 +0100)]
s3:ctdb: correctly handle cstatus if CTDB_CTRL_FLAG_NOREPLY is set.
(cherry picked from commit c1f3d00263a7476564c5e758d80aca0b3fe8b8a5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3:ctdb: samba can now handle the NOREPLY flag
Michael Adam [Thu, 23 Dec 2010 15:46:24 +0000 (16:46 +0100)]
s3:ctdb: samba can now handle the NOREPLY flag

Revert "samba3 can't handle NOREPLY yet"

This reverts commit 9bf211db6d7d6ef6e59508de69d6d8dfe5bae059.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos3: Fix the talloc hierarchy in notify_remove_onelevel
Volker Lendecke [Thu, 5 Nov 2009 13:29:05 +0000 (14:29 +0100)]
s3: Fix the talloc hierarchy in notify_remove_onelevel

We want to free the record early, not when talloc_tos() is free'ed.
(cherry picked from commit cb5145e18aac219e27010637632f060c59852b7f)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agoRevert "s3: Fix a deadlock between notify_onelevel.tdb and notify.tdb"
Stefan Metzmacher [Mon, 18 Apr 2011 16:06:27 +0000 (18:06 +0200)]
Revert "s3: Fix a deadlock between notify_onelevel.tdb and notify.tdb"

This reverts commit b34035ebcbe4724f5530a15761c8f9aed237287e.

13 years agoRevert "DEBUG it"
Stefan Metzmacher [Thu, 9 Sep 2010 15:04:32 +0000 (17:04 +0200)]
Revert "DEBUG it"

This reverts commit dcd3a088ad63b901147fae1716d6d07126c235ed.

13 years agoDEBUG it
Stefan Metzmacher [Wed, 8 Sep 2010 10:51:15 +0000 (12:51 +0200)]
DEBUG it

13 years agoTODO test it s3:smbd: optimize unix_convert() for the wildcard case
Stefan Metzmacher [Thu, 9 Sep 2010 11:55:26 +0000 (13:55 +0200)]
TODO test it s3:smbd: optimize unix_convert() for the wildcard case

metze

13 years agos3:smbd: let unix_convert() skip stat() calls for wildcard names
Stefan Metzmacher [Wed, 8 Sep 2010 10:06:03 +0000 (12:06 +0200)]
s3:smbd: let unix_convert() skip stat() calls for wildcard names

metze

13 years agos3:smbd: let unix_convert() only do the optimistic stat() if no wildcards are
Stefan Metzmacher [Tue, 7 Sep 2010 15:31:45 +0000 (17:31 +0200)]
s3:smbd: let unix_convert() only do the optimistic stat() if no wildcards are
used

Inspired by:

commit c96d487ae3c65c17b377bb316adac4b5775448f3
Author: Jeremy Allison <jra@samba.org>
Date:   Wed Nov 25 13:17:56 2009 -0800

    Make us pass RAW-CHKPATH with a case sensitive share.

metze

13 years agos3:smbd: check for allow_wcard_last_component early in unix_convert()
Stefan Metzmacher [Tue, 7 Sep 2010 15:29:02 +0000 (17:29 +0200)]
s3:smbd: check for allow_wcard_last_component early in unix_convert()

Inspired by:

commit c96d487ae3c65c17b377bb316adac4b5775448f3
Author: Jeremy Allison <jra@samba.org>
Date:   Wed Nov 25 13:17:56 2009 -0800

    Make us pass RAW-CHKPATH with a case sensitive share.

metze

13 years agoTODO lib/tdb: use jenkins_hash for non persistent tdbs
Stefan Metzmacher [Fri, 10 Sep 2010 04:40:03 +0000 (06:40 +0200)]
TODO lib/tdb: use jenkins_hash for non persistent tdbs

metze

13 years agoTODO lib/tdb: add code for the jenkins hash to the build
Stefan Metzmacher [Fri, 10 Sep 2010 03:27:26 +0000 (05:27 +0200)]
TODO lib/tdb: add code for the jenkins hash to the build

metze

13 years agolib/tdb: maintain reference hashes with the hash function that's used at create time
Stefan Metzmacher [Thu, 9 Sep 2010 13:45:51 +0000 (15:45 +0200)]
lib/tdb: maintain reference hashes with the hash function that's used at create time

If the hashes are available and the current hash function can't verify
them, we reject the open.

metze

13 years agosamba-3.4.7-ctdb-10: bump the vendor patch level to 6
Michael Adam [Tue, 12 Oct 2010 12:59:55 +0000 (14:59 +0200)]
samba-3.4.7-ctdb-10: bump the vendor patch level to 6

13 years agos3: Fix the async echo responder for netbios keepalives
Volker Lendecke [Wed, 6 Oct 2010 16:24:13 +0000 (18:24 +0200)]
s3: Fix the async echo responder for netbios keepalives

This fixes a crash in the echo responder when the client started to send the
NetBIOS-Level 0x85-style keepalive packets. We did not correctly check the
packet length, so the code writing the signing seqnum overwrote memory after
the malloc'ed area for the 4 byte keepalive packet.

13 years agosamba-3.4.7-ctdb-10: bump the vendor patch level to 5
Michael Adam [Tue, 5 Oct 2010 13:26:35 +0000 (15:26 +0200)]
samba-3.4.7-ctdb-10: bump the vendor patch level to 5

13 years agos3: Add "smbcontrol winbindd ip-dropped <local-ip>"
Volker Lendecke [Wed, 29 Sep 2010 10:17:05 +0000 (12:17 +0200)]
s3: Add "smbcontrol winbindd ip-dropped <local-ip>"

This is supposed to improve the winbind reconnect time after an ip address
has been moved away from a box. Any kind of HA scenario will benefit from
this, because winbindd does not have to wait for the TCP timeout to kick in
when a local IP address has been dropped and DC replies are not received
anymore.

Signed-off-by: Michael Adam <obnox@samba.org>
13 years agoRevert "v3-4-ctdb: Do not do any logrotation"
Volker Lendecke [Thu, 17 Jun 2010 08:53:56 +0000 (10:53 +0200)]
Revert "v3-4-ctdb: Do not do any logrotation"

This reverts commit 0ce0f33c9bfdb9d0a5364e3902926fcc3a6d8ae1.

13 years agoReally enable core dumps in Linux
Rusty Russell [Mon, 20 Sep 2010 04:19:19 +0000 (13:49 +0930)]
Really enable core dumps in Linux

commit e1f1ce68e1f685400a8c68bcec14018e3d1fc29d
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Mon Sep 20 13:33:30 2010 +0930

    source3: dump core on Linux, even after seteuid/etc.

    The "dumpable" flag is reset on every call to set*uid, so we need to
    reset it to 1 in the signal handler itself.

    This code dates back to commit ac01fda2b97b 6 years ago :(

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
13 years agosamba-3.4.7-ctdb-10: bump the vendor patch level to 4
Christian Ambach [Wed, 22 Sep 2010 12:53:12 +0000 (14:53 +0200)]
samba-3.4.7-ctdb-10: bump the vendor patch level to 4

13 years agos3: Fix a deadlock between notify_onelevel.tdb and notify.tdb
Volker Lendecke [Wed, 22 Sep 2010 12:23:43 +0000 (05:23 -0700)]
s3: Fix a deadlock between notify_onelevel.tdb and notify.tdb

notify_add() locks notify_onlevel.tdb while having notify.tdb locked.
file_free() calls notify_remove_onelevel(), and due to this talloc hierarchy
problem the tdb record is not unlocked again timely. Thus notify.tdb will be
locked while notify_onelevel still has a lock.

Sorry, Ronnie, for causing you some grey hair and thanks for the stacktraces.

Volker

13 years agosamba-3.4.7-ctdb-10: bump the vendor patch level to 3
Michael Adam [Wed, 15 Sep 2010 21:20:43 +0000 (23:20 +0200)]
samba-3.4.7-ctdb-10: bump the vendor patch level to 3

13 years agoFix bug #7669.
Jeremy Allison [Thu, 9 Sep 2010 13:48:23 +0000 (15:48 +0200)]
Fix bug #7669.

Fix bug #7669 (buffer overflow in sid_parse() in Samba3 and dom_sid_parse in
Samba4).

CVE-2010-3069:

===========
Description
===========

All current released versions of Samba are vulnerable to
a buffer overrun vulnerability. The sid_parse() function
(and related dom_sid_parse() function in the source4 code)
do not correctly check their input lengths when reading a
binary representation of a Windows SID (Security ID). This
allows a malicious client to send a sid that can overflow
the stack variable that is being used to store the SID in the
Samba smbd server.

A connection to a file share is needed to exploit this
vulnerability, either authenticated or unauthenticated
(guest connection).
(cherry picked from commit df20a300758bc12286820e31fcf573bdfc2147bc)

13 years agosamba-3.4.7-ctdb-10: bump the vendor patch level to 2
Michael Adam [Wed, 15 Sep 2010 10:23:38 +0000 (12:23 +0200)]
samba-3.4.7-ctdb-10: bump the vendor patch level to 2

so we are now at samba version 3.4.7-ctdb-10-2

13 years agopackaging(RHEL-CTDB): add a comment, why we need precompiled manpages as fallback
Michael Adam [Mon, 13 Sep 2010 09:52:53 +0000 (11:52 +0200)]
packaging(RHEL-CTDB): add a comment, why we need precompiled manpages as fallback

Particularly the version of the docbook XSL style sheets shipped with
RHEL5 have are missing some definitions needed for building the manpages.

13 years agopackaging/RHEL-CTDB: do not use an external docs tarball
Michael Adam [Thu, 9 Sep 2010 15:56:03 +0000 (17:56 +0200)]
packaging/RHEL-CTDB: do not use an external docs tarball

try to build the manpages instead and use a checked in manpage-only tarball
if it does not work

13 years agopackaging/RHEL-CTDB: add a manpages tarball for use if manpage build does not work
Michael Adam [Thu, 9 Sep 2010 15:55:32 +0000 (17:55 +0200)]
packaging/RHEL-CTDB: add a manpages tarball for use if manpage build does not work

13 years agopackaging/RHEL-CTDB: untangle the various %doc entries to single lines
Michael Adam [Thu, 9 Sep 2010 15:14:20 +0000 (17:14 +0200)]
packaging/RHEL-CTDB: untangle the various %doc entries to single lines

13 years agono need any more to manually create catalog file in build-manpages-nogit
Michael Adam [Mon, 13 Sep 2010 15:27:16 +0000 (17:27 +0200)]
no need any more to manually create catalog file in build-manpages-nogit

13 years agono need any more to create catalog file manually in build-manpages-git
Michael Adam [Mon, 13 Sep 2010 15:26:20 +0000 (17:26 +0200)]
no need any more to create catalog file manually in build-manpages-git

13 years agodocs: use abs_top_builddir instead of BUILDDIR to let configure create correct catalo...
Michael Adam [Mon, 13 Sep 2010 15:18:18 +0000 (17:18 +0200)]
docs: use abs_top_builddir instead of BUILDDIR to let configure create correct catalog file

The use of the catalog file is still controlled by exporting the
XML_CATALOG_FILES variable as described in build/README

13 years agoadd script to build only the manpages (not the complete docs) - no-git version
Michael Adam [Thu, 9 Sep 2010 15:25:22 +0000 (17:25 +0200)]
add script to build only the manpages (not the complete docs) - no-git version

this version uses make clean to clean the source tree before building

13 years agoadd script to build only the manual pages (not all the docs) - git version
Michael Adam [Thu, 9 Sep 2010 15:24:30 +0000 (17:24 +0200)]
add script to build only the manual pages (not all the docs) - git version

the git version uses git clean to clean the docs source tree.

13 years agodocs:vfs_gpfs: improve the CAVEAT section on run and build time dependencies
Michael Adam [Mon, 30 Aug 2010 12:49:16 +0000 (14:49 +0200)]
docs:vfs_gpfs: improve the CAVEAT section on run and build time dependencies

13 years agodocs-xml/vfs_gpfs: document 'gpfs:refuse_dacl_protected'
Stefan Metzmacher [Mon, 30 Aug 2010 08:45:52 +0000 (10:45 +0200)]
docs-xml/vfs_gpfs: document 'gpfs:refuse_dacl_protected'

metze
(cherry picked from commit fc79f358eb6a1dd7ed2e5f5b1e31fb664a182595)

13 years agodocs-xml/vfs_gpfs: document 'gpfs:merge_writeappend'
Stefan Metzmacher [Mon, 30 Aug 2010 08:31:38 +0000 (10:31 +0200)]
docs-xml/vfs_gpfs: document 'gpfs:merge_writeappend'

metze
(cherry picked from commit 4d76c18f78742ba92b4772037ac306b567351ca1)

13 years agodocs-xml/vfs_gpfs: document 'gpfs:winattr'
Stefan Metzmacher [Mon, 30 Aug 2010 08:24:52 +0000 (10:24 +0200)]
docs-xml/vfs_gpfs: document 'gpfs:winattr'

metze
(cherry picked from commit 6cf66a04ad690e78311411e2195b3a1710953262)

13 years agodocs-xml/vfs_gpfs: document 'gpfs:getrealfilename'
Stefan Metzmacher [Mon, 30 Aug 2010 08:12:41 +0000 (10:12 +0200)]
docs-xml/vfs_gpfs: document 'gpfs:getrealfilename'

metze
(cherry picked from commit a8a704001e5da10fae5df5fc2856d06250739248)

13 years agodocs-xml/vfs_gpfs: document 'gpfs:leases'
Stefan Metzmacher [Mon, 30 Aug 2010 07:29:46 +0000 (09:29 +0200)]
docs-xml/vfs_gpfs: document 'gpfs:leases'

metze
(cherry picked from commit 196699a6a1412687f7d5fe24c506577002dd769e)

13 years agodocs-xml/vfs_gpfs: document 'gpfs:sharemodes'
Stefan Metzmacher [Mon, 30 Aug 2010 07:01:21 +0000 (09:01 +0200)]
docs-xml/vfs_gpfs: document 'gpfs:sharemodes'

metze
(cherry picked from commit d35d846db14a4bb28a97a7bab6dbfdbe7a62b593)

13 years agoREADME.samba-3.4.7-ctdb-10: fix typo
Michael Adam [Thu, 26 Aug 2010 15:09:57 +0000 (17:09 +0200)]
README.samba-3.4.7-ctdb-10: fix typo

13 years agoAdd a readme for the samba-3.4.7-ctdb-10 branch.
Michael Adam [Thu, 26 Aug 2010 15:06:55 +0000 (17:06 +0200)]
Add a readme for the samba-3.4.7-ctdb-10 branch.

13 years agoRemove the file README.v3-4-ctdb from the 3.4.7-ctdb-10 branch
Michael Adam [Thu, 26 Aug 2010 15:01:06 +0000 (17:01 +0200)]
Remove the file README.v3-4-ctdb from the 3.4.7-ctdb-10 branch

13 years agosamba-3.4.7-ctdb-10: bump version to 3.4.7-ctdb-10-1
Michael Adam [Mon, 9 Aug 2010 15:32:57 +0000 (17:32 +0200)]
samba-3.4.7-ctdb-10: bump version to 3.4.7-ctdb-10-1

This changes the vendor suffix from "ctdb" to "ctdb-10"
and resets the vendor patch level from 10 to 1.
I.e. this is the start of stabilizing the 3.4.7-ctdb-10 release.
It is currently not possible to specify a vendor patch level
that is not simply an integer (like 10.1), due to the mode
with with the subversion information is assebled in smbd/trans2.c .
Hence the change in the vendor-suffix.

13 years agov3-4-ctdb: fail db_open_ctdb if ctdb is not around
Volker Lendecke [Fri, 6 Aug 2010 10:32:30 +0000 (12:32 +0200)]
v3-4-ctdb: fail db_open_ctdb if ctdb is not around

13 years agoFurther refine the time_audit warning message
Volker Lendecke [Wed, 28 Jul 2010 15:02:43 +0000 (17:02 +0200)]
Further refine the time_audit warning message

13 years agos3: Modify the warning time_audit warning message
Volker Lendecke [Wed, 28 Jul 2010 09:21:50 +0000 (11:21 +0200)]
s3: Modify the warning time_audit warning message

Now we have

System call "disk_free" took unexpectedly long (0.01 seconds) -- check your file system and disks!

13 years agos3: Log the correct core path on Linux if core_pattern is set
Volker Lendecke [Fri, 23 Jul 2010 10:22:23 +0000 (12:22 +0200)]
s3: Log the correct core path on Linux if core_pattern is set

Contributions from Bill Hymas, IBM

13 years agov3-4-ctdb: Bump up the vendor patch level to 10
Volker Lendecke [Mon, 5 Jul 2010 11:00:40 +0000 (13:00 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 10

13 years agov3-4-ctdb: Re-arrange winbindd_ads.c:query_user
Volker Lendecke [Thu, 1 Jul 2010 14:31:30 +0000 (16:31 +0200)]
v3-4-ctdb: Re-arrange winbindd_ads.c:query_user

We can't access the LDAP message after nss_get_info_cached has potentially
destroyed the ads_struct

13 years agos3: Fix a winbind crash
Volker Lendecke [Fri, 25 Jun 2010 09:47:30 +0000 (11:47 +0200)]
s3: Fix a winbind crash

nss_get_info_cached might deep inside sequence_number() invalidate the
ads_struct without telling its callers.

13 years agos3: Fix a winbind crash
Volker Lendecke [Tue, 22 Jun 2010 13:59:44 +0000 (15:59 +0200)]
s3: Fix a winbind crash

nss_get_info_cached might have invalidated "ads" deep inside.

13 years ago v3-4-ctdb: Bump up the vendor patch level to 9
Michael Adam [Wed, 23 Jun 2010 11:07:23 +0000 (13:07 +0200)]
 v3-4-ctdb: Bump up the vendor patch level to 9

13 years agos3:net rpc registry: make getsd succeed when key sd only gives access to SD not key...
Michael Adam [Mon, 21 Jun 2010 10:32:14 +0000 (12:32 +0200)]
s3:net rpc registry: make getsd succeed when key sd only gives access to SD not key contents

You don't need the REG_KEY_READ permissions to access the SD of a key.
And for instance, the key HKLM\security ususally has no specific bits
set for builtin\administrators, but the READ_CONTROL_ACCESS.
I.e. builtin\administrators can get the sd but not enumerate the key.

13 years agos3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping
Michael Adam [Wed, 23 Jun 2010 10:02:31 +0000 (12:02 +0200)]
s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping

13 years agos3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()
Michael Adam [Wed, 23 Jun 2010 10:18:35 +0000 (12:18 +0200)]
s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()

13 years agos3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping
Michael Adam [Wed, 23 Jun 2010 10:02:31 +0000 (12:02 +0200)]
s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping

13 years agos3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db
Michael Adam [Wed, 23 Jun 2010 10:12:37 +0000 (12:12 +0200)]
s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db

13 years agos3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping
Michael Adam [Wed, 23 Jun 2010 10:02:31 +0000 (12:02 +0200)]
s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping

13 years agos3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init
Michael Adam [Wed, 23 Jun 2010 10:01:47 +0000 (12:01 +0200)]
s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init

13 years agos3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends
Michael Adam [Mon, 31 May 2010 15:12:32 +0000 (17:12 +0200)]
s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends

13 years agos3:winbindd: make sure we only call static_init_idmap once
Stefan Metzmacher [Mon, 31 May 2010 08:57:52 +0000 (10:57 +0200)]
s3:winbindd: make sure we only call static_init_idmap once

metze

Signed-off-by: Michael Adam <obnox@samba.org>
13 years agos3:winbind Ensure we always init idmap_passdb before we use it
Andrew Bartlett [Mon, 24 May 2010 04:55:17 +0000 (14:55 +1000)]
s3:winbind Ensure we always init idmap_passdb before we use it

It seems that it is possible for idmap_init_passdb_domain() to be run
before idmap_init_domain(), so ensure we run the static init functions
in both.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
13 years agos3:idmap_ad: untangle two assignments from checks
Michael Adam [Tue, 22 Jun 2010 12:13:55 +0000 (14:13 +0200)]
s3:idmap_ad: untangle two assignments from checks

13 years agos3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
Michael Adam [Tue, 22 Jun 2010 12:12:14 +0000 (14:12 +0200)]
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.

13 years agos3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()
Michael Adam [Tue, 22 Jun 2010 12:09:57 +0000 (14:09 +0200)]
s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()

13 years agos3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()
Michael Adam [Tue, 22 Jun 2010 11:13:57 +0000 (13:13 +0200)]
s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()

13 years agos3:idmap_rid: remove a comment that does not apply in that place.
Michael Adam [Tue, 22 Jun 2010 10:47:41 +0000 (12:47 +0200)]
s3:idmap_rid: remove a comment that does not apply in that place.

Probably got copied from a different location.

13 years agos3:idmap_rid: remove unused domain_name from the idmap_rid_context.
Michael Adam [Tue, 22 Jun 2010 10:44:22 +0000 (12:44 +0200)]
s3:idmap_rid: remove unused domain_name from the idmap_rid_context.

13 years agos3:idmap_rid: remove range from idmap_rid_context()
Michael Adam [Tue, 22 Jun 2010 10:42:52 +0000 (12:42 +0200)]
s3:idmap_rid: remove range from idmap_rid_context()

Now, the idmap_domain range that is centrally parsed is used.

13 years agos3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()
Michael Adam [Tue, 22 Jun 2010 10:42:06 +0000 (12:42 +0200)]
s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()

13 years agos3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()
Michael Adam [Tue, 22 Jun 2010 10:38:19 +0000 (12:38 +0200)]
s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()

13 years agos3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()
Michael Adam [Tue, 22 Jun 2010 10:32:35 +0000 (12:32 +0200)]
s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()

13 years agos3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()
Michael Adam [Tue, 22 Jun 2010 10:31:41 +0000 (12:31 +0200)]
s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()

13 years agos3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()
Michael Adam [Tue, 22 Jun 2010 10:30:58 +0000 (12:30 +0200)]
s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()

13 years agos3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()
Michael Adam [Tue, 22 Jun 2010 10:29:57 +0000 (12:29 +0200)]
s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()

13 years agos3:idmap_rid: untangle assignment from check in idmap_rid_initialize()
Michael Adam [Mon, 21 Jun 2010 15:28:37 +0000 (17:28 +0200)]
s3:idmap_rid: untangle assignment from check in idmap_rid_initialize()

13 years agos3:idmap_ldap: add my (C)
Michael Adam [Wed, 23 Jun 2010 10:39:59 +0000 (12:39 +0200)]
s3:idmap_ldap: add my (C)

13 years agos3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()
Michael Adam [Thu, 17 Jun 2010 19:55:02 +0000 (21:55 +0200)]
s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()

13 years agos3:idmap_ldap: remove unreached code (and explicit error return code)
Michael Adam [Thu, 17 Jun 2010 18:48:53 +0000 (20:48 +0200)]
s3:idmap_ldap: remove unreached code (and explicit error return code)

13 years agos3:idmap_ldap: add a idmap_ldap_new_mapping().
Michael Adam [Thu, 17 Jun 2010 18:19:46 +0000 (20:19 +0200)]
s3:idmap_ldap: add a idmap_ldap_new_mapping().

High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend.

13 years agos3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
Michael Adam [Thu, 17 Jun 2010 18:18:27 +0000 (20:18 +0200)]
s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain

Currently this only works with the default domain, calling out
to idmap_ldap_allocate_id(). In the future this will be extended
to also work for non-default domains.

13 years agos3:idmap_ldap: move idmap_ldap_set_mapping() further up.
Michael Adam [Thu, 17 Jun 2010 18:15:25 +0000 (20:15 +0200)]
s3:idmap_ldap: move idmap_ldap_set_mapping() further up.

13 years agos3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context
Michael Adam [Thu, 17 Jun 2010 17:45:39 +0000 (19:45 +0200)]
s3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context

this hides this beneath the idmap structure and removes a global variable

13 years agos3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
Michael Adam [Thu, 17 Jun 2010 17:17:48 +0000 (19:17 +0200)]
s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.

The alloc subsystem is now subordinate to the idmap system.

13 years agos3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context
Michael Adam [Thu, 17 Jun 2010 17:03:46 +0000 (19:03 +0200)]
s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context

13 years agos3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
Michael Adam [Thu, 17 Jun 2010 17:03:12 +0000 (19:03 +0200)]
s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()

Second step in removing the idmap range from the idmap_ldap_alloc_context.

13 years agos3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool
Michael Adam [Thu, 17 Jun 2010 16:59:28 +0000 (18:59 +0200)]
s3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool

First step in removing idmap ranges from the idmap_ldap_alloc_context.
The range from the domain is to be used now.

13 years agos3:idmap_ldap: remove unused filter range from struct idmap_ldap_context
Michael Adam [Thu, 17 Jun 2010 08:16:54 +0000 (10:16 +0200)]
s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context

13 years agos3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain
Michael Adam [Thu, 17 Jun 2010 08:16:20 +0000 (10:16 +0200)]
s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain

13 years agos3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context
Michael Adam [Thu, 17 Jun 2010 08:00:49 +0000 (10:00 +0200)]
s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context

13 years agos3:idmap_ldap: re-implement allocate_id in idmap methods.
Michael Adam [Tue, 22 Jun 2010 12:49:00 +0000 (14:49 +0200)]
s3:idmap_ldap: re-implement allocate_id in idmap methods.