summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2008-08-19Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 ↵Jeremy Allison1-2/+5
address reported by Ted Percival <ted@midg3t.net>. Jeremy. (This used to be commit ab06efccf31fbc899536d2681a2076e6dfd65b9e)
2008-08-15I think the problem with these functions is that lookup_usergroupsHerb Lewis1-17/+17
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 7849938906a9c859805cbaeca66fae9d3c515aad)
2008-08-15popt: add support for setting MODULESDIR via popt_common_dynconfig.Michael Adam1-0/+10
Michael (This used to be commit 81030e49ce344260d279a3112b13a21ce3520748)
2008-08-15Use module_path() instead of lib_path() for loading shared modules.Michael Adam1-1/+1
Michael (This used to be commit 22fb3ef1bb4abb33b49d275f9a5d85a1924c22ea)
2008-08-15Add modules_path() to construct paths to files in MODULESDIR.Michael Adam1-0/+13
Michael (This used to be commit 5ef9da6f4f04b07804b389902862fae0fbbfed13)
2008-08-14netapi: add some remaining documentation fixes.Günther Deschner1-3/+3
Guenther (cherry picked from commit 4a4e90a3872d34791de43c3849c60e2f4e713d47) (This used to be commit c542307b7484df4adb9269f4bb99fa55d5dc48b8)
2008-08-14netapi: add doxygen documentation for NetUserModalsGet and NetUserModalsSet.Günther Deschner1-0/+30
Guenther (cherry picked from commit 93210f04c3b1e4fe977a395531ddc0387a65dab5) (This used to be commit ab1b214ba0bebfebf0685f9c05fdcf6eb141adb9)
2008-08-14netapi: add doxygen documentation for NetLocalGroup{Add,Del,Set,Get}Members.Günther Deschner1-0/+75
Guenther (cherry picked from commit eee28804b7efc3089ce3528f13de6c930cf00adb) (This used to be commit b725852502d45b568c80eb3c323861b89928983d)
2008-08-14netapi: make libnetapi_open_ipc_connection static.Günther Deschner8-196/+114
Guenther (cherry picked from commit 0259914f8ff04514a8395d8e1af61aadd50c5efb) (This used to be commit 7edc671cc1007ae216e7efdbcdb9cfa1e547dca5)
2008-08-14netapi: make non-implemented local calls default to remote "localhost" calls.Günther Deschner6-38/+35
Guenther (cherry picked from commit aa70e588803e3767796dc958b139f4ee464d8626) (This used to be commit 9927ac6eec9fe1fecfedb97b61c4f93379fc8722)
2008-08-14netapi: add NetLocalGroupGetMembers example code.Günther Deschner2-0/+171
Guenther (cherry picked from commit bded298e022028d6237e25e1c785509bc983be9d) (This used to be commit 93b0907aa43e55d2d4093567212b0c9731917351)
2008-08-14netapi: let libnetapi_samr_lookup_and_open_alias return NTSTATUS.Günther Deschner1-85/+77
Guenther (cherry picked from commit dcf6d879a14a70ce5795eb8dcfbfe2fc5a8ad859) (This used to be commit 8ac6a2739be870f286d19dc6bf8f0054a559b43b)
2008-08-13netapi: add c++ guard.Günther Deschner1-1/+8
Guenther (This used to be commit c9e38fef647520e4038f04bd163678bf4b30853d)
2008-08-13fixed child exit handling and IP release handlingAndrew Tridgell1-0/+2
(This used to be commit 6fe27d296c389473c24e8c627a61bd56b364ad9f)
2008-08-13register the ctdbd reconfigure messageAndrew Tridgell1-0/+8
(This used to be commit 9d3217bb28765e107c230fb90b578dcc6f5d4375)
2008-08-13allow nested ctdb transactions in the same manner that they areAndrew Tridgell1-2/+21
allowed for tdb. This is needed for the registry db backend. (This used to be commit 4b04ec29c76df837a7909725bbbf4c79d5abdb4d)
2008-08-13drop retries to 5Andrew Tridgell1-1/+1
(This used to be commit a2f70fc175b748ef160a998d0563c28381ea3466)
2008-08-13use CTDB_CONTROL_TRANS2_COMMIT_RETRY to prevent the counter gettingAndrew Tridgell1-2/+3
out of sync (This used to be commit 571ec7893c8b40959c005d510c039e3f231ffc67)
2008-08-13fixed lots of places that paniced on a failed transaction_commit,Andrew Tridgell3-10/+14
thinking it was a failure of a transaction cancel (This used to be commit 22dbe158ed62ae47bbcb41bba3db345294f75437)
2008-08-13don't leave a dangling transaction on retry errorAndrew Tridgell1-2/+4
(This used to be commit ddf3022595fe8ca378c5f52107f42e296f852685)
2008-08-13cope with the control failing completely without returning a statusAndrew Tridgell1-12/+18
(This used to be commit fe6a03e7b11cd859fddae5ba924ea5e071b8ccea)
2008-08-13handle two special casesAndrew Tridgell1-16/+42
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 2481bfce4307274806584b0d8e295cc7f638e184)
2008-08-13put a limit on the number of retries. I found a case where a recoveryAndrew Tridgell1-0/+12
could lead to it blocking forever (This used to be commit a633390d3a7cb04a7c4e14cba9c533621793287e)
2008-08-13we need to commit, not cancel, on record destructionAndrew Tridgell1-1/+4
(This used to be commit ba64a757f86fb60994e12e81416083ac0fa11c21)
2008-08-13removed more unused codeAndrew Tridgell1-72/+0
(This used to be commit 30a697c82db53f9d801e220a7c6277f873ebce67)
2008-08-13all persistent databases now do all stores via automatic transactionsAndrew Tridgell1-150/+46
(This used to be commit 76fbe56e827193d939676da23a580aa0f9394dd1)
2008-08-13fixed fetch of empty recordsAndrew Tridgell1-6/+11
(This used to be commit 037516f1362c8d64da1d47a0cdaf83198d3eaeaf)
2008-08-13samba3 can't handle NOREPLY yetAndrew Tridgell1-0/+3
(This used to be commit 21729256a550509c3c038efa5acdd6ac39027dce)
2008-08-13cleanup debugging and fix handling of empty transactionAndrew Tridgell1-13/+11
(This used to be commit 2e85cbe88b3d1674b915f62e02be7d005fddaa39)
2008-08-13first cut at adding full transactions for ctdb to samba3Andrew Tridgell7-1359/+635
(This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
2008-08-13dbwrap ctdb: fix a DEBUG message.Michael Adam1-1/+1
Michael (This used to be commit d776d8df262e1753fb428450140df94e63035af5)
2008-08-13dbwrap ctdb: don't retry when tdb_store failed in db_ctdb_persistent_store().Michael Adam1-0/+1
Only retry when ctdbd_persisten_update() failed. Michael (This used to be commit ff413a4614c8b272a34b2a9e56a329a8e8749a34)
2008-08-13dbwrap ctdb: add a partial mapping from tdb_error to NTSTATUS and use it for ↵Michael Adam1-3/+26
store. Michael (This used to be commit eaf76c751f9bde2843174b400c109304831df83e)
2008-08-13dbwrap ctdb: add db_ctdb_delete_persistent() and use it for persistent DBsMichael Adam1-1/+17
as delete_rec operation from fetch_locked() Michael (This used to be commit f4aab595a0219305fbedf8890e787b690660a55a)
2008-08-13dbwrap ctdb: call db_ctdb_store() in db_ctdb_delete().Michael Adam1-7/+2
to reduce code duplication. Michael (This used to be commit 09a197e756459877cab7b4d09f534c6a41cfdd71)
2008-08-13dbwrap ctdb: add a retry loop to the persistent store operation.Michael Adam1-51/+120
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 2bcc9e6ecef876030e552a607d92597f60203db2)
2008-08-13dbwrap ctdb: release the lock before calling ctdbd_persistent_store()Michael Adam1-0/+26
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 d004c9a7281d2577c3ba2012c8f790cc198ea700)
2008-08-13dbwrap ctdb: remove erroneously duplicated comment.Michael Adam1-1/+0
Michael (This used to be commit c939c55e5182258092faceefa58a7f328f18619e)
2008-08-13Use transaction start/cancel for persistent writes to avoid leaving the ↵Ronnie Sahlberg2-6/+46
database in an inconsistent state if we crash during the operation Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> (This used to be commit 09329f1f9114af44fc4e5e4f29a7315912313125)
2008-08-13Correctly return NULL from messaging_ctdbd_connection if messaging_init failedVolker Lendecke1-0/+1
(This used to be commit 549db133df6782bcca7d033e8573e47716877cbd)
2008-08-13Attempt to fix bug 5684Volker Lendecke1-1/+1
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 3f884c4ae36f3260e63626bdd4989d9258ae6497)
2008-08-12Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.Jeremy Allison4-16/+25
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 8c630efd25cf17aff59448ca05c1b44a41964b16)
2008-08-12I found lots of places where we assume error will be set when callingAndrew Tridgell1-2/+10
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 834684a524a24bb4eb46b4af583d39947dc87d95)
2008-08-12ensure we give an error code to any routines above that are lookingAndrew Tridgell1-0/+3
for one (This used to be commit 469ba9b87103aa0053c371e481acc5acf0f98ac1)
2008-08-11netapi: add NetLocalGroupSetMembers example code.Günther Deschner2-0/+147
Guenther (This used to be commit 4fea49ae83510225c51c580a2bea2c664851bb39)
2008-08-11netapi: add NetLocalGroupDelMembers example code.Günther Deschner2-0/+147
Guenther (This used to be commit b2a413148e470e059c877f4e54955ab61559edee)
2008-08-11netapi: add NetLocalGroupAddMembers example code.Günther Deschner2-0/+147
Guenther (This used to be commit 01c4640b1ca66c3285fd23d447d08db12cf83b42)
2008-08-11netapi: implement NetLocalGroupSetMembers_r().Günther Deschner1-7/+69
Guenther (This used to be commit bb52ba58e47364d7c7ed38862a007e8e3d9dc104)
2008-08-11netapi: implement NetLocalGroupDelMembers_r().Günther Deschner1-5/+36
Guenther (This used to be commit bd31d8f9ec9a24ca68e1d5441c0cafd98132060f)
2008-08-11netapi: implement NetLocalGroupAddMembers_r().Günther Deschner1-2/+260
Guenther (This used to be commit 53dc9a11810b93a1771304fbfbf4ae84f551612b)