summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-11-03s3:dbwrap_ctdb: split combined check in two and add descriptive debugMichael Adam1-1/+14
in db_ctdb_transaction_fetch_start() for error conditions when re-fetching the transaction_lock record inside the transaction Michael
2009-11-03s3:dbwrap_ctdb: fix race condition with concurrent transactions on the same ↵Michael Adam1-0/+12
node. In ctdb_transaction_commit(), when the trans2_commit control fails, there is a race condition in the 1 second sleep between the local transaction_cancel and the call to ctdb_replay_transaction(): The database is not locked, and neither is the transaction_lock record. So another client can start and possibly complete a new transaction in this gap, but only on the same node: The locking of the transaction_lock record on a different node which involves migration of the record to the other node has been disabled by introduction of the transaction_active flag on the db which closes precisely this gap from the start of the commit until the call to TRANS2_FINISH or TRANS2_ERROR. But this mechanism does not cover the case where a process on the same node tries to start a transaction: There is no obstacle to locking the transaction_lock record because the record does not need to be migrated. This commit closes this race condition in ctdb_transaction_fetch_start() by using the new ctdb_ctrl_transaction_active() call to ask the local ctdb daemon whether it has a transaction running on the database. If so, the check is repeated until the running transaction is done. This does introduce an additional call to the local ctdbd when starting transactions, but it does close the (hopefully) last race condition. Michael
2009-11-03s3:dbwrap_ctdb: add new db_ctdb_transaction_active() that calls ↵Michael Adam1-0/+21
CTDB_CONTROL_TRANS2_COMMIT Michael
2009-11-03s3:dbwrap_ctdb: fix a race in starting concurrent transactions on a single nodeMichael Adam1-0/+25
There are two races in concurrent transactions on a single node. One in starting a transaction and one with replay during commit. This commit closes the first race by storing the client pid in the transaction-lock record and comparing the stored pid against its own pid after releasing the lock and refetching the record inside the transaction. Michael
2009-11-03s3:dbwrap_ctdb: use db_ctdb_ltdb_fetch() inside db_ctdb_transaction_fetch_startMichael Adam1-6/+4
Michael
2009-11-03s3:dbwrap_ctdb: use db_ctdb_ltdb_fetch() inside db_ctdb_transaction_fetch()Michael Adam1-16/+6
Michael
2009-11-03s3:dbwrap_ctdb: add a function db_ctdb_ltdb_fetch()Michael Adam1-0/+53
This fetches a record from the db and splits out the ctdb header. Michael
2009-11-03s3:dbrwap_ctdb: add a function db_ctdb_ltdb_store()Michael Adam1-27/+39
and use it in db_ctdb_store() and db_ctdb_transaction_store(). Michael
2009-11-03s3:dbwrap_ctdb: reformat a comment slightly to enhance clearness.Michael Adam1-3/+5
Michael
2009-11-02s3: Fix a 100% CPU loop when ctdbd dies during a traverseVolker Lendecke1-0/+1
2009-11-02s3-gencache: restore gencache_get behavior with NULL args (with torture test).Günther Deschner1-4/+8
Without this, we panic in wins_srv_is_dead() and fail to start nmbd with wins support. Volker, please check. Guenther
2009-10-29s3: Fix incorrect rc check of nscd_flush_cache.Jim McDonough1-1/+1
At least this only resulted in an incorrect debug message.
2009-10-26s3: Rename new parameter "ldap ref follow" to "ldap follow referral".Karolin Seeger1-2/+2
This parameter will be introduced with Samba 3.5.0. Karolin
2009-10-22s3: Remove a pointless #endif/#ifdef pairVolker Lendecke1-2/+0
2009-10-16s3-libnetapi: add nltest tool.Günther Deschner2-1/+258
Guenther
2009-10-16s3-libnetapi: add I_NetLogonControl{2} example code.Günther Deschner3-1/+303
Guenther
2009-10-16s3-libnetapi: add I_NetLogonControl{2} to public headers.Günther Deschner1-1/+91
Guenther
2009-10-16s3-libnetapi: fill in I_NetLogonControl{2}_r.Günther Deschner1-2/+181
Guenther
2009-10-16s3-libnetapi: add I_NetLogonControl{2} skeleton.Günther Deschner3-0/+172
Guenther
2009-10-15Fix valgrind memory leak in bug #6814 - Fixes for problems reported by valgrindJeremy Allison1-1/+7
Jeremy.
2009-10-12s3/smbldap: add option to disable following LDAP refsJan Engelhardt1-2/+10
Fix bug #6717.
2009-10-11Fix builds with external tdbSimo Sorce1-6/+0
Make sure we do not reference our internal tdb directly. Let configure define what tdb.h file to use so that builds that use an extrenal tdb do not include 2 different versions of the tdb header.
2009-10-06s3: Add access_mask to the flock VFS callAbhidnya P Chirmule1-1/+1
2009-10-01s3: remove unused rpcstr_pull and rpcstr_pull_talloc.Günther Deschner1-35/+0
Guenther
2009-09-30w32err: WERR_GROUP_NOT_FOUND renamed to WERR_GROUPNOTFOUNDKamen Mazdrashki1-4/+4
In Win 32 we have NERR_GroupNotFound which maps to WERR_GROUP_NOT_FOUND currently and we have ERROR_GROUP_NOT_FOUND which maps to nothing, so it is to be added Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2009-09-30s3-util: use pull_reg_multi_sz in reg_pull_multi_sz.Günther Deschner1-26/+10
Guenther
2009-09-30s3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.Günther Deschner1-0/+35
Guenther
2009-09-30s3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.Günther Deschner1-0/+30
Guenther
2009-09-28s3:gencache: Add my copyrightVolker Lendecke1-0/+1
2009-09-24Revert 918b5a7e057bd91289ec06b3ef8d95da43a50ede. This codeJeremy Allison1-6/+6
should *not* return const. Jeremy.
2009-09-24s3:util_str "str_list_make_v3" - introduce also here the "const" resultMatthias Dieter Wallnöfer1-9/+9
I did this to match with the default util strlist library.
2009-09-23s3:gencache: Make gencache_del() return success for expired entriesVolker Lendecke1-4/+13
This fixes nasty error messages from "net cache flush"
2009-09-23s3:gencache: Remove some over-paranoid lockingVolker Lendecke1-6/+0
2009-09-23s3:gencache: Add a "was_expired" argument to gencache_get_data_blobVolker Lendecke1-10/+19
This is set to true if the routine returns failure due to an existing but expired entry.
2009-09-21s3:lib/select: don't overwrite errno in the signal handlerStefan Metzmacher1-0/+4
metze
2009-09-18s3: Fix Coverity ID 581 -- NEGATIVE_RETURNSVolker Lendecke1-0/+4
2009-09-16s3-netapi: Fix Coverity #668: FORWARD_NULL.Günther Deschner1-1/+1
Guenther
2009-09-16s3-netapi: Fix Coverity #669 FORWARD_NULL.Günther Deschner1-1/+1
Guenthe
2009-09-16s3-netapi: Fix Coverity #670: FORWARD_NULL.Günther Deschner1-1/+1
Guenther
2009-09-15libcli:nbt make the lmhosts parsing code and dependicies commonAndrew Bartlett1-115/+0
This starts the process to have Samba4 use lmhosts. Andrew Bartlett
2009-09-15s3: BSD needs sys/sysctl.h included to build properlyBjörn Jacke1-0/+5
FreeBSD (and other BSDs, too) need sys/sysctl.h inclueded to use sysctlbyname(). Thanks to Timur Bakeyev for that.
2009-09-11s3:dbwrap_ctdb: set dmaster in ctdb_transaction_store() also when updating ↵Michael Adam1-1/+1
an existing record not only when creating a record. This matches commit e9194a130327d6b05a8ab90bd976475b0e93b06d from ctdb-master. Michael
2009-09-11s3-util: add get/set_cmdline_auth_info_domain to user_auth_info struct.Günther Deschner1-0/+18
Guenther
2009-09-10Fix bug 6707 - 3.4.1 segfault in parsing configs.Marc Aurele La France1-4/+4
Fixes an occasional segfault caused by an out-of-bounds reference in config file parsing.
2009-09-06Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".Jeremy Allison1-17/+25
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed from sys_read() to sys_recv(). read_socket_with_timeout() is called with non-fd's (with a pty in chgpasswd.c and with a disk file in lib/dbwrap_file.c via read_data()). recv works for the disk file, but not the pty. Change the name of read_socket_with_timeout() to read_fd_with_timeout() to make this clear (and add comments). Jeremy.
2009-09-05Save and report the correct errno value.Simo Sorce1-8/+12
2009-08-28s3-ldb: update dlinklist.h to match main copy (lib/util/dlinklist.h)Michael Adam1-6/+9
This also removes build warnings of redefined macros since it uses the embracing "#ifndef _DLINKLIST_H ... #endif". Michael
2009-08-27s3:error_map: make NTSTATUS -> errno -> NTSTATUS mapping consistent for ↵Stefan Metzmacher1-1/+1
NT_STATUS_INVALID_PARAMETER Why have we mapped EINVAL -> NT_STATUS_INVALID_HANDLE before? metze
2009-08-26s3/smbd: open the share_info.tdb on startup instead of tconxSteven Danneman1-1/+1
This is a small performance optimization. Instead of opening the tdb on every smb connection in the forked child process, we now open it in the parent and share the fd. This also reduces the total fd usage in the system.
2009-08-26s3: Allow full_audit to play nice with smbd if it's using syslogtprouty1-0/+6
Explictly pass the facility from both smbd and full_audit to syslog. Really the only major change is to not call openlog() in full_audit if WITH_SYSLOG is defined, which implies that smbd is already using syslog. This allows full audit to piggy-back on the same ident as smbd, while still differentiating the logging via the facility.