1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

4071 Commits

Author SHA1 Message Date
Jeremy Allison
9efccda1cc Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid <Douglas_E_Wegscheid@whirlpool.com>.
Jeremy.
(This used to be commit 1295bb9787)
2008-08-21 10:25:02 -07:00
Jeremy Allison
f23a6b7c93 Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address
reported by Ted Percival <ted@midg3t.net>.
Jeremy.
(This used to be commit ab06efccf3)
2008-08-19 17:30:30 -07:00
Herb Lewis
63ff9e0081 I think the problem with these functions is that lookup_usergroups
should never include the user SID.
The comment for the function in winbindd/winbindd_ads.c says
/* Lookup groups a user is a member of. */
The following patch makes the wbinfo calls return the correct data
before and after a login.
wbinfo --user-domgroups and --user-sids
(This used to be commit 7849938906)
2008-08-15 15:28:23 -07:00
Michael Adam
e5830726f4 popt: add support for setting MODULESDIR via popt_common_dynconfig.
Michael
(This used to be commit 81030e49ce)
2008-08-15 23:19:59 +02:00
Michael Adam
26c3453407 Use module_path() instead of lib_path() for loading shared modules.
Michael
(This used to be commit 22fb3ef1bb)
2008-08-15 23:19:58 +02:00
Michael Adam
25f31194e5 Add modules_path() to construct paths to files in MODULESDIR.
Michael
(This used to be commit 5ef9da6f4f)
2008-08-15 23:19:57 +02:00
Günther Deschner
06ad4dc625 netapi: add some remaining documentation fixes.
Guenther
(cherry picked from commit 4a4e90a387)
(This used to be commit c542307b74)
2008-08-14 12:22:37 +02:00
Günther Deschner
2b89fc16cc netapi: add doxygen documentation for NetUserModalsGet and NetUserModalsSet.
Guenther
(cherry picked from commit 93210f04c3)
(This used to be commit ab1b214ba0)
2008-08-14 12:22:28 +02:00
Günther Deschner
214e6e7d72 netapi: add doxygen documentation for NetLocalGroup{Add,Del,Set,Get}Members.
Guenther
(cherry picked from commit eee28804b7)
(This used to be commit b725852502)
2008-08-14 12:22:19 +02:00
Günther Deschner
fcd10d26a4 netapi: make libnetapi_open_ipc_connection static.
Guenther
(cherry picked from commit 0259914f8f)
(This used to be commit 7edc671cc1)
2008-08-14 12:22:11 +02:00
Günther Deschner
87b9c9ade2 netapi: make non-implemented local calls default to remote "localhost" calls.
Guenther
(cherry picked from commit aa70e58880)
(This used to be commit 9927ac6eec)
2008-08-14 12:22:02 +02:00
Günther Deschner
a810cc865d netapi: add NetLocalGroupGetMembers example code.
Guenther
(cherry picked from commit bded298e02)
(This used to be commit 93b0907aa4)
2008-08-14 12:21:53 +02:00
Günther Deschner
11db643962 netapi: let libnetapi_samr_lookup_and_open_alias return NTSTATUS.
Guenther
(cherry picked from commit dcf6d879a1)
(This used to be commit 8ac6a2739b)
2008-08-14 12:21:44 +02:00
Günther Deschner
93d2a982fc netapi: add c++ guard.
Guenther
(This used to be commit c9e38fef64)
2008-08-13 13:29:40 +02:00
Andrew Tridgell
b5f4373be5 fixed child exit handling and IP release handling
(This used to be commit 6fe27d296c)
2008-08-13 11:54:12 +02:00
Andrew Tridgell
2f09edb492 register the ctdbd reconfigure message
(This used to be commit 9d3217bb28)
2008-08-13 11:54:12 +02:00
Andrew Tridgell
11331eeae5 allow nested ctdb transactions in the same manner that they are
allowed for tdb. This is needed for the registry db backend.
(This used to be commit 4b04ec29c7)
2008-08-13 11:54:11 +02:00
Andrew Tridgell
65a78a6a52 drop retries to 5
(This used to be commit a2f70fc175)
2008-08-13 11:54:11 +02:00
Andrew Tridgell
ca64c340c7 use CTDB_CONTROL_TRANS2_COMMIT_RETRY to prevent the counter getting
out of sync
(This used to be commit 571ec7893c)
2008-08-13 11:54:11 +02:00
Andrew Tridgell
fe3dd9b3e6 fixed lots of places that paniced on a failed transaction_commit,
thinking it was a failure of a transaction cancel
(This used to be commit 22dbe158ed)
2008-08-13 11:54:10 +02:00
Andrew Tridgell
312a04528c don't leave a dangling transaction on retry error
(This used to be commit ddf3022595)
2008-08-13 11:54:10 +02:00
Andrew Tridgell
0f8a6859e6 cope with the control failing completely without returning a status
(This used to be commit fe6a03e7b1)
2008-08-13 11:54:10 +02:00
Andrew Tridgell
2592565bde handle two special cases
1) when all nodes write the same value to the record, or when writing
   a value that is already there, we can skip the write and save
   ourselves a network transactions

2) when all remote nodes fail an update, and we then fail a replay, we
   don't need to trigger a recovery. This solves a corner case where
   we could get into a recovery loop
(This used to be commit 2481bfce43)
2008-08-13 11:54:10 +02:00
Andrew Tridgell
62bbcc6135 put a limit on the number of retries. I found a case where a recovery
could lead to it blocking forever
(This used to be commit a633390d3a)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
7e9229e17a we need to commit, not cancel, on record destruction
(This used to be commit ba64a757f8)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
5c306c67aa removed more unused code
(This used to be commit 30a697c82d)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
5031f2a6e2 all persistent databases now do all stores via automatic transactions
(This used to be commit 76fbe56e82)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
ee314d6930 fixed fetch of empty records
(This used to be commit 037516f136)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
9bf211db6d samba3 can't handle NOREPLY yet
(This used to be commit 21729256a5)
2008-08-13 11:54:08 +02:00
Andrew Tridgell
b3f4b7768f cleanup debugging and fix handling of empty transaction
(This used to be commit 2e85cbe88b)
2008-08-13 11:54:08 +02:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Michael Adam
286974e35a dbwrap ctdb: fix a DEBUG message.
Michael
(This used to be commit d776d8df26)
2008-08-13 11:54:08 +02:00
Michael Adam
ebaf208fc3 dbwrap ctdb: don't retry when tdb_store failed in db_ctdb_persistent_store().
Only retry when ctdbd_persisten_update() failed.

Michael
(This used to be commit ff413a4614)
2008-08-13 11:54:07 +02:00
Michael Adam
b45305b5d8 dbwrap ctdb: add a partial mapping from tdb_error to NTSTATUS and use it for store.
Michael
(This used to be commit eaf76c751f)
2008-08-13 11:54:07 +02:00
Michael Adam
873e74705f dbwrap ctdb: add db_ctdb_delete_persistent() and use it for persistent DBs
as delete_rec operation from fetch_locked()

Michael
(This used to be commit f4aab595a0)
2008-08-13 11:54:07 +02:00
Michael Adam
dd7ac4f38d dbwrap ctdb: call db_ctdb_store() in db_ctdb_delete().
to reduce code duplication.

Michael
(This used to be commit 09a197e756)
2008-08-13 11:54:07 +02:00
Michael Adam
5dcf20961e dbwrap ctdb: add a retry loop to the persistent store operation.
This is because ctdbd can fail in performing the persistent_store
due to race conditions, and this does not mean it can't succeed
the next time.

To not loop infinitely, this makes use of a new parametric option:
"dbwrap ctdb:max store retries" (integer) which defaults to 5
and sets the upper limit for the number or repeats of the
fetch/store cycle.

Michael
(This used to be commit 2bcc9e6ece)
2008-08-13 11:54:06 +02:00
Michael Adam
ed66929647 dbwrap ctdb: release the lock before calling ctdbd_persistent_store()
in the persistent db_ctdb_store operation.

This is to prevent deadlocks in db_ctdb_persistent_store().

There is a tradeoff: Usually, the record is still locked
after db->store operation. This lock is usually released
via the talloc destructor with the TALLOC_FREE to
the record. So we have two choices:

- Either re-lock the record after the call to persistent_store
  or cancel_persistent update and this way not changing any
  assumptions callers may have about the state, but possibly
  introducing new race conditions.

- Or don't lock the record again but just remove the
  talloc_destructor. This is less racy but assumes that
  the lock is always released via TALLOC_FREE of the record.

I choose the first variant for now since it seems less racy.
We can't guarantee that we succeed in getting the lock
anyways. The only real danger here is that a caller
performs multiple store operations after a fetch_locked()
which is currently not the case.

Michael
(This used to be commit d004c9a728)
2008-08-13 11:54:06 +02:00
Michael Adam
fd070dc9af dbwrap ctdb: remove erroneously duplicated comment.
Michael
(This used to be commit c939c55e51)
2008-08-13 11:54:06 +02:00
Ronnie Sahlberg
fb97047a84 Use transaction start/cancel for persistent writes to avoid leaving the database in an inconsistent state if we crash during the operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
(This used to be commit 09329f1f91)
2008-08-13 11:54:06 +02:00
Volker Lendecke
45c1e95c72 Correctly return NULL from messaging_ctdbd_connection if messaging_init failed
(This used to be commit 549db133df)
2008-08-13 11:54:04 +02:00
Volker Lendecke
9b987e3923 Attempt to fix bug 5684
With the ctdb checkin dde9f3f006 tdb optimized out write lock checks for
write-enabled transaction. Sadly, this also removed the possibility to ever
remove dead records left over from tdb_delete calls within a transaction.

Tridge, please check this! Did dde9f3f006 have any reason beyond performance
optimizations?

Thanks,

Volker
(This used to be commit 3f884c4ae3)
2008-08-13 10:53:17 +02:00
Jeremy Allison
03991ab073 Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.
Here is a patch to allow many subsystems to be re-initialized. The only
functional change I made was to remove the null context tracking, as the memory
allocated here is designed to be left for the complete lifetime of the program.
Freeing this early (when all smb contexts are destroyed) could crash other
users of talloc.
Jeremy.
(This used to be commit 8c630efd25)
2008-08-12 13:35:15 -07:00
Andrew Tridgell
8b25ce06ce I found lots of places where we assume error will be set when calling
one of our virtualised functions, such as db_open(), but error is only
set when a system call fails, and it is not uncommon for us to fail a
function internally without ever making a system call. That led to us
passing back success when a function had in fact failed.

I found two places where we relied on map_nt_error_from_unix()
returning success when errno==0, but lots and lots of places where we
relied on the reverse, so I fixed those two places.

map_nt_error_from_unix() will now always return an error, returning
NT_STATUS_UNSUCCESSFUL if errno is 0
(cherry picked from commit 69d40ca4c1af925d4b0e59ddc69ef8c26e6501d1)
(This used to be commit 834684a524)
2008-08-12 21:37:16 +02:00
Andrew Tridgell
89dc729443 ensure we give an error code to any routines above that are looking
for one
(This used to be commit 469ba9b871)
2008-08-12 21:37:01 +02:00
Günther Deschner
051cb1a4de netapi: add NetLocalGroupSetMembers example code.
Guenther
(This used to be commit 4fea49ae83)
2008-08-11 19:48:28 +02:00
Günther Deschner
ed7501fd31 netapi: add NetLocalGroupDelMembers example code.
Guenther
(This used to be commit b2a413148e)
2008-08-11 19:48:19 +02:00
Günther Deschner
6f28bc691a netapi: add NetLocalGroupAddMembers example code.
Guenther
(This used to be commit 01c4640b1c)
2008-08-11 19:48:10 +02:00
Günther Deschner
f947d416ff netapi: implement NetLocalGroupSetMembers_r().
Guenther
(This used to be commit bb52ba58e4)
2008-08-11 19:48:02 +02:00
Günther Deschner
b65fcbc1f5 netapi: implement NetLocalGroupDelMembers_r().
Guenther
(This used to be commit bd31d8f9ec)
2008-08-11 19:47:53 +02:00