Volker Lendecke
ed43a5a94f
s3: Fix a valgrind error
...
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 29 15:50:13 CEST 2012 on sn-devel-104
2012-03-29 15:50:13 +02:00
Jelmer Vernooij
c9fb33697d
use usleep rather than sys_usleep in various places, in anticipation of usleep moving to libreplace.
2012-03-24 22:41:05 +01:00
Jelmer Vernooij
c0288e0612
lib/util: Remove obsolete sys_getpid() and sys_fork().
...
The performance of these is minimal (these days) and they can return
invalid results when used as part of applications that do not use
sys_fork().
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-24 21:55:40 +01:00
Jelmer Vernooij
85aa07761a
adt_tree: Fix return types.
2012-03-24 17:11:11 +01:00
Jelmer Vernooij
6f1b735cc2
adt_tree: Avoid WERROR.
2012-03-24 16:41:35 +01:00
Jelmer Vernooij
76bb68fd2b
util_malloc: Remove unused constant.
2012-03-24 15:44:33 +01:00
Jelmer Vernooij
2a82c45f02
lib/util: Remove dummy wrapper for getgrnam().
2012-03-24 15:25:48 +01:00
Jelmer Vernooij
818e0722e1
lib/util: Remove dummy wrapper for getpwnam().
2012-03-24 15:24:15 +01:00
Jelmer Vernooij
3be6258912
lib/util: Remove dummy wrappers for setpwent/getpwent/endpwent.
2012-03-24 15:23:02 +01:00
Jelmer Vernooij
14fdc1c5cd
lib/util: Move calloc_array and memalign_array to top-level libutil.
2012-03-24 15:19:09 +01:00
Jelmer Vernooij
e7cd5291db
sock_exec: Avoid sys_connect.
2012-03-24 14:57:33 +01:00
Jelmer Vernooij
a9c22de3f4
util_sock: Avoid sys_connect.
2012-03-24 14:51:23 +01:00
Jelmer Vernooij
eb3617c426
ctdb_conn: Avoid sys_connect.
2012-03-24 14:48:56 +01:00
Jelmer Vernooij
d4c4cb06c5
replace: Move memalign() from lib/util/system.c to libreplace.
2012-03-24 14:43:21 +01:00
Jelmer Vernooij
f92b05b955
libndr: Rename policy_handle_equal to ndr_policy_handle_equal.
...
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Volker Lendecke
1909af434e
s3-dbwrap: Move "lock_order" initialization to db_open_xx
2012-03-16 11:20:10 +01:00
Jeremy Allison
6589e02807
Make reinit_after_fork_pipe_handler code with reads being interrupted by a signal.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 15 23:29:47 CET 2012 on sn-devel-104
2012-03-15 23:29:47 +01:00
Michael Adam
c80f70390c
s3:smbd: let smbd/nmbd/winbindd child processes terminate if the parent process died.
...
This applies to all child processes making use of reinit_after_fork().
It is implemented by establishing a pipe between parent and child.
The child watches for EOF on the read end of the pipe, indidcating
an exited parent.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-15 18:41:37 +01:00
Ira Cooper
e64b1188bc
s3: Update waf build to include missed dependancy on Lion.
...
Autobuild-User: Ira Cooper <ira@samba.org>
Autobuild-Date: Thu Mar 15 07:34:43 CET 2012 on sn-devel-104
2012-03-15 07:34:43 +01:00
Jelmer Vernooij
ce4531ee31
tdb_wrap: Move to specific directory.
...
It's a bit confusing to mix low-level and high-level libraries. We had
multiple libraries in one directory, and there were have circular
dependencies with other libraries outside that directory (in this case,
samba-hostconfig).
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
2012-03-10 23:13:01 +01:00
Amitay Isaacs
5c5111ca03
s3-ctdb: Enable CTDB readonly support only if CTDB supports it
...
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Mar 5 02:47:36 CET 2012 on sn-devel-104
2012-03-05 02:47:36 +01:00
Rusty Russell
5bda068773
dbwrap_ctdb: only fetch a read-only copy if we had a record already.
...
Because revoking read-only copies of records is expensive, we only
want ctdbd to do it for high-turnover records. A basic heuristic is
that if we don't find a local copy of the record, don't ask for a
read-only copy.
The fetch itself will cause ctdbd to migrate the record, so eventually
we will have a local copy. Next time it gets migrated away, we'll
call ctdbd_fetch() with local_copy = true.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Rusty Russell
67bb5abe81
ctdbd_conn: fetch read-only copies of records.
...
This means we try to get a read-only copy of a record, which we can
then place in the local tdb.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Rusty Russell
a3e6f55065
dbwrap_ctdb: handle read-only records.
...
The new read-only record flags make determining if we can use a record
a bit more complex, so extract it into its own function.
The OLD logic was:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it.
The new logic is:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it IF we only
want read-only access, OR there are no read-only delegations.
3) If we are not dmaster, we can only use it if we want read-only
access and it is marked as a read-only copy.
This logic is unused until the next patches which begin to ask
for read-only copies of records.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Andrew Tridgell
8a0e420d4c
dbwrap: changed log level for information about lock order
...
we were filling our logs with lock ordering debug lines
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 27 12:50:29 CET 2012 on sn-devel-104
2012-02-27 12:50:29 +01:00
Jeremy Allison
21528da9cd
Fix a bunch of "unused variable" warnings.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
2012-02-18 06:22:40 +01:00
Andrew Bartlett
476d503d24
lib/util: Remove unused sys_sendto()
...
Found by callcatcher.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 17 13:48:05 CET 2012 on sn-devel-104
2012-02-17 13:48:05 +01:00
Andrew Bartlett
245d47f233
lib/util: Remove unused sys_recv()
...
Found by callcatcher.
Andrew Bartlett
2012-02-17 12:19:30 +01:00
Andrew Bartlett
b190e3cd79
s3-lib: Remove unused standard_sub_conn()
2012-02-17 12:19:29 +01:00
Andrew Bartlett
846a697e20
s3-lib Remove unused sys_fcntl_long()
2012-02-17 12:19:29 +01:00
Andrew Bartlett
59d1faa1a3
s3-lib Remove unused sys_fseek()
2012-02-17 12:19:29 +01:00
Andrew Bartlett
367c567c5f
lib/util: Remove sys_poll as it is no longer needed
...
sys_poll() is only needed if the signal pipe is set up and used, but as
no signal handler ever writes to the pipe, this can all be removed.
signal based events are now handled via tevent.
Andrew Bartlett
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-02-16 15:49:21 -08:00
Christopher R. Hertel (crh)
b5b204184a
Rename obscure defined constants.
...
Replaced the undescriptive SMB_PORT1 and SMB_PORT2 defined constants
with the slightly more descriptive names NBT_SMB_PORT and TCP_SMB_PORT.
Also replaced several hard-coded references to the well-known port
numbers (139 and 445, respectively) as appropriate.
Small changes to clarify some comments regarding the two transport
types.
Signed-off-by: Simo Sorce <idra@samba.org>
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Feb 16 08:29:41 CET 2012 on sn-devel-104
2012-02-16 08:29:41 +01:00
Volker Lendecke
dd5868d41e
s3: Add SERVERID_UNIQUE_ID_NOT_TO_VERIFY, bug 8760
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb 15 21:10:22 CET 2012 on sn-devel-104
2012-02-15 21:10:22 +01:00
Andrew Bartlett
474fbfb7b7
s3-lib: Remove unused is_myworkgroup()
...
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html
Andrew Bartlett
2012-02-10 16:45:14 +11:00
Andrew Bartlett
45123530e5
s3-charcnv: Remove unused rpcstr_push()
...
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html
Andrew Bartlett
2012-02-10 16:45:14 +11:00
Andrew Bartlett
40bf23d862
s3-lib: Remove unused pid_path()
...
piddir.c calls lp_piddir() directly.
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html
Andrew Bartlett
2012-02-10 16:45:12 +11:00
Andrew Bartlett
3b88c1e605
s3-charcnv: Remove unused pull_string_fn
...
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html
Andrew Bartlett
2012-02-10 16:45:12 +11:00
Andrew Bartlett
b93326b968
s3-build: remove EXEEXT from Makefiles
...
As far as I am aware, we do not actually build on any platforms that
require this. The last Stratos VOS release on
ftp://ftp.stratus.com/vos/samba/samba.html was 3.0.5
Andrew Bartlett
2012-02-09 00:27:08 +01:00
Jeremy Allison
502186fe0c
Remove unused get_file_size() function.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Feb 7 20:56:28 CET 2012 on sn-devel-104
2012-02-07 20:56:28 +01:00
Volker Lendecke
27f6421fa6
s3: Increase debug level of basic ctdb packet handling
...
This clutters the debug level 10 output significantly without much
value
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Feb 7 18:19:08 CET 2012 on sn-devel-104
2012-02-07 18:19:08 +01:00
Volker Lendecke
5fb578ee09
s3: FreeBSD does not define sin6_addr.s_addr32
...
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Feb 6 20:03:58 CET 2012 on sn-devel-104
2012-02-06 20:03:58 +01:00
Matthieu Patou
9b43ad4fca
s3-pid: Catch with pid filename's change when config file is not smb.conf
...
This is what is done in pidfile_create
2012-02-03 00:33:00 -08:00
Volker Lendecke
bbde298241
s3: Use ARRAY_SIZE in bsd_attr_list
2012-02-02 20:35:27 +01:00
Andreas Schneider
8080dbad78
s3-lib: Fix util_cmdline which doesn't use popt.
...
This creates its own header file for util_cmdline so it doesn't need to
link against popt.
This should fix linking on FreeBSD.
2012-02-01 21:54:21 +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
Jeremy Allison
17a77ea9b4
Fix a really slow memory leak (in master at least). Found by Ira Cooper <ira@wakeful.net>.
...
Bug #8724 - Memory leak in parent smbd on connection.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan 27 01:26:28 CET 2012 on sn-devel-104
2012-01-27 01:26:28 +01:00
Volker Lendecke
c19753bb1f
s3: Add debug when a message is registered
...
We've always had the corresponding deregister message
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan 24 15:27:51 CET 2012 on sn-devel-104
2012-01-24 15:27:51 +01:00
Volker Lendecke
957ec28139
s3: Fix a typo
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan 19 13:43:07 CET 2012 on sn-devel-104
2012-01-19 13:43:07 +01:00
Volker Lendecke
d2bf6af165
s3: Use lock_order for setting the db priority
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 18 16:21:52 CET 2012 on sn-devel-104
2012-01-18 16:21:52 +01:00
Volker Lendecke
d2068d33a4
s3: Pass down lock_order to db_open_ctdb
2012-01-18 14:48:04 +01:00
Volker Lendecke
333c92384b
s3: Enforce a lock order in dbwrap
...
This makes sure we do not deadlock from doing two dbwrap_fetch_locked in two
processes in different orders. At open time, we assign a strict order to all
databases. lock_order 1 will be locked first, lock_order 2 second. No two
records of the same lock order may be locked at the same time.
2012-01-18 14:48:04 +01:00
Volker Lendecke
45e61fcf61
s3: Add a "lock_order" argument to db_open
...
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
2012-01-18 14:48:04 +01:00
Stefan Metzmacher
7d83d379ad
s3:lib/messages: remove unused messaging_event_context()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 17 09:45:30 CET 2012 on sn-devel-104
2012-01-17 09:45:29 +01:00
Jeremy Allison
d6950d4ec9
Comment out sys_get_number_of_cores() as we're no longer using this.
2012-01-06 14:55:30 -08:00
Jeremy Allison
e8a7d9c822
Add a sys_get_number_of_cores() function that calls sysconf or sysctl
...
and tunes the aio threads.
2012-01-06 02:42:25 +01:00
Volker Lendecke
69b51e9053
s3: Fix some nonempty blank lines
2012-01-05 13:09:35 +01:00
Jeremy Allison
5e6263960a
Third part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.
...
Fix default_sys_recvfile() to correctly cope with
short writes. Return the amount written. Return
-1 and set errno if no data could be written.
2011-12-30 20:45:10 -08:00
Jeremy Allison
a5715420e3
Second part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.
...
Split out the functionality of drain_socket() into a separate
function from default_sys_recvfile().
2011-12-30 20:23:00 -08:00
Jeremy Allison
eb617374a6
Fix bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write
...
Bug found and fix suggested by Andrew Bartlett.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sun Dec 25 07:46:38 CET 2011 on sn-devel-104
2011-12-25 07:46:38 +01:00
Stefan Metzmacher
4a1895eb99
s3:lib/ctdbd_conn: try ctdbd_init_connection() as root
...
ctdbd_traverse is only called if the main db_context is already
open. So if we could get to information via dbwrap_fetch,
we should also be able to traverse.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 23 18:19:14 CET 2011 on sn-devel-104
2011-12-23 18:19:13 +01:00
Jeremy Allison
711c18c230
Change the signature of pthreadpool_finished_job() to return 0
...
on success, errno on fail and return the jobid in a separate variable.
I need this fix for my vfs_aio_pthread.c module.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 22 12:12:33 CET 2011 on sn-devel-104
2011-12-22 12:12:33 +01:00
Volker Lendecke
75d3b9ce08
s3: Fix some False/NULL hickups
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
2011-12-20 13:13:17 +01:00
Christian Ambach
411d498b8a
s3:dbwrap fix return value of db_tdb_parse
...
use the TDB ecode to determine the NTSTATUS return value
and not the return code that is just -1
2011-12-16 18:43:08 +01:00
Stefan Metzmacher
cbb67e9e2e
s3:smbd: remove unused sconn_server_id()
...
metze
2011-12-16 13:19:33 +01:00
Stefan Metzmacher
f166f91988
s3:lib/conn_tdb: avoid using sconn_server_id()
...
metze
2011-12-16 13:19:32 +01:00
Volker Lendecke
8eeb3ff753
s3-dbwrap: All relevant backends provide parse_record(). Remove the fallback.
...
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Dec 15 17:41:53 CET 2011 on sn-devel-104
2011-12-15 17:41:53 +01:00
Volker Lendecke
f6d8f7440c
s3-dbwrap: Remove the "fetch" db_context callback
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:47 +01:00
Volker Lendecke
b5d056ca23
s3-dbwrap: Rewrite dbwrap_fetch in terms of dbwrap_parse_record
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
77dca70350
s3-dbwrap: Rewrite dbwrap_fallback_parse_record based on dbwrap_fetch_locked
...
This is in preparation to remove the db_context->fetch function pointer
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
daa365493e
s3-dbwrap: For nostalgic reasons, make dbwrap_file.c compile at least
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
29f62bbed7
s3-dbwrap: Fix some blank line endings
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
098048a89c
s3-dbwrap: Implement db_ctdb_parse_record in terms of db_ctdb_fetch
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:45 +01:00
Volker Lendecke
26fc72921f
s3-dbwrap: Make dbwrap_parse_record return NTSTATUS
...
Also, the parser now returns void. The parser is called if and only if
dbwrap_parse_record returns NT_STATUS_OK.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:45 +01:00
Volker Lendecke
5efd7e16c2
s3: Move can_delete_directory to smbd/, remove shim
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 13 19:00:37 CET 2011 on sn-devel-104
2011-12-13 19:00:37 +01:00
Volker Lendecke
3239c722aa
s3-dbwrap: Simplify db_tdb_fetchlock_parse a bit
...
Introduce a local variable for the result, replace "state->result" by "result"
2011-12-13 17:27:26 +01:00
Stefan Metzmacher
611ab8aaa7
s3:lib/dummyparam: remove unused conn_snum_used() dummy
...
metze
2011-12-13 15:45:36 +01:00
Volker Lendecke
0f9d14820e
s3: Remove a bunch of calls to procid_self()
...
All callers to messaging_[re]init only used procid_self()
2011-12-12 21:50:25 +01:00
Günther Deschner
cf57fd44d7
s3-ctdb: fix the build w/o HAVE_CTDB_CONTROL_CHECK_SRVIDS_DECL
...
Volker, please check.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec 12 17:42:29 CET 2011 on sn-devel-104
2011-12-12 17:42:29 +01:00
Volker Lendecke
ad5d315322
s3-dbwrap: Fix a typo
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 9 13:37:51 CET 2011 on sn-devel-104
2011-12-09 13:37:51 +01:00
Volker Lendecke
664eb70e74
s3-dbwrap: & is not required when taking a function pointer
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Dec 8 16:39:29 CET 2011 on sn-devel-104
2011-12-08 16:39:28 +01:00
Volker Lendecke
4856033410
s3-dbwrap: Make dbwrap_fallback_wipe private
2011-12-08 15:03:43 +01:00
Volker Lendecke
d9e5368fcc
s3-dbwrap: Avoid an "else" by an early return
2011-12-08 15:03:43 +01:00
Volker Lendecke
5cda77d599
s3-dbwrap: Make dbwrap_fallback_parse_record private
...
We have the private fallback in dbwrap_parse_record anyway
2011-12-08 15:03:43 +01:00
Volker Lendecke
527dc2ed52
s3-dbwrap: Make dbwrap_fallback_fetch private
2011-12-08 15:03:43 +01:00
Volker Lendecke
b6d5dfc16d
s3-dbwrap: use wrappers where appropriate
2011-12-08 15:03:43 +01:00
Volker Lendecke
883419a50b
s3-dbwrap: Use simpler code for logging keys
2011-12-08 15:03:42 +01:00
Volker Lendecke
4552c28d6d
s3: Fix some blank line endings
2011-12-08 15:03:42 +01:00
Volker Lendecke
a47780af22
s3: Fix some nonblank line endings
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 2 20:39:33 CET 2011 on sn-devel-104
2011-12-02 20:39:33 +01:00
Volker Lendecke
259cb94c11
s3: Remove unused dbwrap_record_get_private_data
...
db_record->private_data is for backends which can include dbwrap_private.h
anyway.
2011-12-02 19:03:13 +01:00
Volker Lendecke
99f2177e8f
s3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDS
...
This should be a lot quicker than PROCESS_EXISTS followed by looking at
serverid.tdb
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 30 12:47:27 CET 2011 on sn-devel-104
2011-11-30 12:47:27 +01:00
Michael Adam
0ee447fef5
s3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in db_tdb_fetch()
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov 30 01:46:31 CET 2011 on sn-devel-104
2011-11-30 01:46:31 +01:00
Michael Adam
efb993b686
s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.
...
This implement more correct NTSTATUS handling inside the backends.
This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
2011-11-29 18:20:06 +01:00
Michael Adam
819ca3b697
s3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()
2011-11-29 18:20:06 +01:00
Gregor Beck
a719ce7c11
s3:dbwrap: do not burden the user of db_open_ctdb with ifdef voodoo
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-25 13:24:34 +01:00
Gregor Beck
90eb2eb178
s3:lib fix output of hex escapes > 0x7F with cbuf_print_quoted
...
(cherry picked from commit a1fcb7e37a23dcc035686486d4afe32a67082ae1)
2011-11-25 13:24:34 +01:00
Christian Ambach
53ad886f75
security: add local authority well-known SIDs
...
add the S-1-2 well-known SID family
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Nov 24 19:01:08 CET 2011 on sn-devel-104
2011-11-24 19:01:08 +01:00
Günther Deschner
e81d5505f4
s3-smbldap: remove dependency to secrets subsystem.
...
Guenther
2011-11-16 12:26:26 +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
Volker Lendecke
145f53e824
s3: server_id.pid has turned 64 (bits, that is)
...
Fix ctdb_processes_exist protocol. The socket expects pid_t which is 32 bits on
32 bit machines.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Nov 10 18:57:01 CET 2011 on sn-devel-104
2011-11-10 18:57:01 +01:00
Stefan Metzmacher
b3f126b44c
s3:lib: make use of SMB_SIGNING_* constants
...
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
784cf12fb1
s3:lib: s/Undefined/SMB_SIGNING_DEFAULT/
...
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
19eaaa8030
s3:lib/netapi: s/Undefined/SMB_SIGNING_DEFAULT/
...
metze
2011-11-03 16:55:12 +01:00
Volker Lendecke
d5fe21c003
s3: Fix some nonempty blank lines
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Oct 31 14:25:14 CET 2011 on sn-devel-104
2011-10-31 14:25:14 +01:00
Volker Lendecke
625ad07f4f
s3: Fix a comment
2011-10-31 12:48:06 +01:00
Günther Deschner
0b6ced6209
s3-smbldap: use tevent_context in smbldap.
...
Guenther
2011-10-28 11:35:28 +02:00
Volker Lendecke
a29f7e632f
s3-ctdb: Fix ctdb_read_req
...
If a complete request has come in already before we consumed it, the
ctdb_packet_fd_read_sync will block indefinitely. So always try packet_handler
first and only if that fails due to insufficient data, read from the socket.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 27 22:12:05 CEST 2011 on sn-devel-104
2011-10-27 22:12:05 +02:00
Volker Lendecke
195ae03950
s3-ctdb: Add debug to ctdb_processes_exist
2011-10-27 20:28:31 +02:00
Volker Lendecke
37d7d52358
s3: Add serverids_exist
2011-10-27 20:28:31 +02:00
Volker Lendecke
ba0171f724
s3: Add processes_exist
2011-10-27 20:28:31 +02:00
Volker Lendecke
c5cfc83a3e
s3-ctdb: Make ctdbd_process_exists use ctdbd_processes_exist
...
Not strictly necessary, but more code exercise is good
2011-10-27 20:28:31 +02:00
Volker Lendecke
1c4fe39033
s3-ctdb: Add ctdb_processes_exist
...
This sends out a number of process_exists controls in parallel and collects the
replies as they come in.
2011-10-27 20:28:31 +02:00
Volker Lendecke
c2edecf6bd
s3-ctdb: Allow ctdb_read_req to read any reqid
2011-10-27 20:28:31 +02:00
Volker Lendecke
2cf1347211
s3-ctdb: Don't hand out 0 as reqid
...
0 will be used as a wildcard reqid in ctdb_read_req
2011-10-27 20:28:31 +02:00
Volker Lendecke
4b9cc8f8f9
s3: Fix some type-punned warnings
2011-10-27 20:28:31 +02:00
Andreas Schneider
7b5fb7d9e8
replace: Add don't include unistd.h directly and add uid_wrapper.
2011-10-27 13:32:02 +02:00
Andreas Schneider
7cb08171ce
Include uid_wrapper correctly.
2011-10-27 13:32:02 +02:00
Stefan Metzmacher
7682f61e10
s3:include: implement trans_oob() as wrapper to smb_buffer_oob()
...
metze
2011-10-26 15:33:30 +02:00
Günther Deschner
d66d7c2b00
s3-netapi: remove pointless use_memory_krb5_ccache.
...
This breaks the ABI.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 26 13:23:58 CEST 2011 on sn-devel-104
2011-10-26 13:23:58 +02:00
Stefan Metzmacher
44689b1ee7
s3:lib: make_unix_date3() is the same as pull_dos_date3()
...
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
2011-10-26 09:42:04 +02:00
Stefan Metzmacher
0e95c8aa5c
s3:lib: make_unix_date2() is the same as pull_dos_date2()
...
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
2011-10-26 09:42:04 +02:00
Stefan Metzmacher
a1796465e8
s3:lib: make_unix_date() is the same as pull_dos_date()
...
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
2011-10-26 09:42:03 +02:00
Stefan Metzmacher
fd261fea74
s3:lib/errmap_unix: map EPIPE to NT_STATUS_CONNECTION_DISCONNECTED
...
This lets map_nt_error_from_unix() return the same value as
map_nt_error_from_unix_common().
There are no callers relying on NT_STATUS_PIPE_BROKEN.
metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
dd9d40a0e6
s3:lib/addrchange.h: include libreplace headers before others
...
Also we typically don't use an explicit "lib/replace/" prefix.
metze
2011-10-25 17:58:33 +02:00
Andrew Bartlett
254601df4d
build: always include tevent with <tevent.h>
...
This ensures we do the right thing if we are built against the system
tevent.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Andrew Bartlett
2d05cb9096
build: always include talloc with <talloc.h>
...
This ensures we do the right thing if we are built against the system
talloc.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Günther Deschner
bba114af6e
s3-waf: only compile common.c in netapi examples code once.
...
Guenther
2011-10-21 11:31:57 +02:00
Günther Deschner
81435bf26b
s3-netapi: use NetApiBufferAllocate() for returned buffer in getdc calls.
...
Guenther
2011-10-21 11:07:25 +02:00
Günther Deschner
23fea38deb
s3-netapi: fix missing include in examples code.
...
Guenther
2011-10-21 11:07:24 +02:00
Stefan Metzmacher
6d2aaef787
s3:include: make smb_setlen() a macro
...
metze
2011-10-21 08:43:00 +02:00
Andrew Bartlett
1af128bd2b
build: compile (but do not install) netapi examples
...
The only example not yet built is the GTK domain join gui.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Oct 21 01:31:55 CEST 2011 on sn-devel-104
2011-10-21 01:31:55 +02:00
Andrew Bartlett
06d138a7d9
s3-netapi Compile (but do not install) netapi tests
2011-10-20 12:17:07 +02:00
Stefan Metzmacher
d825a2add6
s3:libsmb/smb_seal: move smb_set_enclen() to smb_seal.c and make it static there
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 19 19:06:35 CEST 2011 on sn-devel-104
2011-10-19 19:06:35 +02:00
Frank Lahm
c3bdcab516
First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104
2011-10-17 21:39:32 +02:00
Stefan Metzmacher
15b8efeae3
s3:dbwrap_ctdb: return the number of records in db_ctdb_traverse() for persistent dbs
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct 14 20:59:37 CEST 2011 on sn-devel-104
2011-10-14 20:59:37 +02:00
Brad Smith
d810ada39c
Fix sys_fseek wrapper
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-10-14 17:52:36 +02:00
Michael Adam
71f5f41860
s3:dbwrap_ctdb: fix the build after changing signature of tdb_wrap_open()
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Oct 13 18:50:47 CEST 2011 on sn-devel-104
2011-10-13 18:50:47 +02:00
Andrew Bartlett
01c934c81e
lib/util: Add back control of mmap and hash size in tdb for top level build
...
This passes down a struct loadparm_context to allow these
parameters to be checked. This may be s3 or s4 context, allowing the
#if _SAMBA_BUILD_ macro to go away safely.
Andrew Bartlett
2011-10-13 14:06:07 +02:00
Gregor Beck
6648d90652
s3:smbcontrol: let smbd pass the idmap msg to its children for convenience
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
3ff8733792
s3: fix id_cache_kill to delete the the id-mappig from caches
...
The intendet and documented behavior of smbcontrol smbd idmap kill is to
delete the mapping from caches and additionally kill the smbd if an affected id
is in use.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:52 +02:00
Michael Adam
54649993b2
s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse
...
It did not compare the last charcter (usually '\0')
2011-10-12 22:45:52 +02:00
Michael Adam
8a3aa56202
s3:dbwrap_ctdb: fix check for skipping the __db_sequence_number__ in traverse
...
Brown paperbag. This omitted the "== 0" hand hence skipped all keys of the
same length as __db_sequence_number__ but different from it...
2011-10-12 22:45:52 +02:00
Günther Deschner
fc320551d8
s3-dbwrap_ctdb: fix the build.
...
Michael, please check.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 15:25:56 CEST 2011 on sn-devel-104
2011-10-12 15:25:56 +02:00
Gregor Beck
7fff4e7f84
s3:dbwrap: remove m_all marshall buffer from ctdb transaction.
...
it was only used by ctdb_replay_transaction and was a actually write only
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 12 05:20:36 CEST 2011 on sn-devel-104
2011-10-12 05:20:36 +02:00
Gregor Beck
a6cd71da85
s3:dbwrap: traverse records created within this transaction.
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Michael Adam
6760011761
s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
...
for consistency and better error propagation
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11 15:51:00 +02:00
Michael Adam
c9bc1e4924
s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
...
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f
s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
...
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb
s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
...
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
8750e3f22c
s3:dbwrap: move definitions of db_record and db_contect structs to dbwrap_private.h
...
The API and callers now only need the forward declarations.
2011-10-11 14:17:58 +02:00
Michael Adam
e2328ac33c
s3:messages: convert to use only dbwrap wrapper functions
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
608ac61729
s3:conn_tdb: convert connections tdb to only use dbwrap wrapper functions
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
79a4911d75
s3:privileges: convert privileges.c to use dbwrap wrapper functions.
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
736af26062
s3:g_lock: convert to use only dbwrap wrapper functions.
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
ff7918770d
s3:talloc_dict: change to only use dbwrap wrapper functions
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
248cb2310c
s3:sharesec: convert sharesec.c to use dbwrap wrapper functions
...
Avoid direct use of the db_record and db_context structs
2011-10-11 14:17:56 +02:00
Michael Adam
bbe7811019
s3:sessionid: convert to using dbwrap wrapper functions only
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:56 +02:00
Michael Adam
bdee9458f6
s3:sessionid: use dbwrap_travers_read() in sessionid_travers_read()
...
This also changes the return code of sessionid_traverse_read() to NTSTATUS.
It also uses traverse_read instead of traverse.
2011-10-11 14:17:56 +02:00
Michael Adam
6656de1346
s3:sessionid: use dbwrap_travers() in sessionid_traverse()
...
This also changes sessionid_traverse to NTSTATUS return type.
2011-10-11 14:17:56 +02:00
Michael Adam
85ae3c3fd4
s3:serverid: convert to using dbwrap wrapper functions only
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:56 +02:00
Michael Adam
91e77f3640
s3:serverid: use dbwrap_traverse_read() in serverid_traverse_read()
...
This also fixes the return value: originally the int return value
of traverse_read which is a count of the records traversed or negative
upon failure, was simply casted into a bool return value.
2011-10-11 14:17:56 +02:00
Michael Adam
81258c01b8
s3:serverid: use dbwrap_traverse() in serverid_traverse()
...
This also fixes the return value: Originally, the int returned
by the traverse method, which is the count of the traverse was
casted into a bool return value.
2011-10-11 14:17:56 +02:00
Michael Adam
f21a66f70b
s3:dbwrap: convert dbwrap_util.c to use dbwrap wrapper functions
2011-10-11 14:17:56 +02:00
Michael Adam
e39cd86381
s3:dbwrap: use dbwrap_fetch_bystring() in dbwrap_fetch_[u]int32()
2011-10-11 14:17:56 +02:00
Michael Adam
0e28448a78
s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS
2011-10-11 14:17:56 +02:00
Michael Adam
25a9978c2c
s3:dbwrap: add dbwrap_fetch_locked(), a wrapper for db->fetch_locked
2011-10-11 14:17:56 +02:00
Michael Adam
46370441b7
s3:dbwrap: add dbwrap_record_delete(), a wrapper for record->delete_rec
2011-10-11 14:17:56 +02:00
Michael Adam
b257e83d89
s3:dbwrap: add dbwrap_record_store(), a wrapper for record->store
2011-10-11 14:17:56 +02:00
Michael Adam
bfed62c169
s3:dbwrap: add get-functions for db_record key, value and private_data
2011-10-11 14:17:56 +02:00
Michael Adam
3ed2fb4a87
s3:dbwrap: add wrapper function dbwrap_get_seqnum()
2011-10-11 14:17:56 +02:00
Michael Adam
373b0606a3
s3:dbwrap: add wrappers for transactions start/cancel/commit
2011-10-11 14:17:56 +02:00
Michael Adam
d8ce5bc656
s3:dbwrap: add wrapper dbwrap_get_flags()
2011-10-11 14:17:56 +02:00
Gregor Beck
7b9bf28514
s3:dbwrap: fix db_rbt_traverse() to return the record count on success
...
this makes it consistent with documented behaviour of tdb_traverse()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:56 +02:00
Gregor Beck
ebcb921182
s3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_rbt
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:56 +02:00
Gregor Beck
97fef0c2fd
s3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_tdb
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Michael Adam
3dc607c0c6
s3:dbwrap: add a comment
2011-10-11 14:17:55 +02:00
Gregor Beck
dc4a5f5323
s3:dbwrap: add function dbwrap_wipe()
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
63c5c0eccf
s3:dbwrap: add specific dbwrap_parse_record() implementation to dbwrap_rbt
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
c5d03cbff8
s3:dbwrap: implement dbwrap_fallback_exists() with dbwrap_parse_record()
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
99fa6fa4a3
s3:dbwrap: allow NULL parser for dbwrap_parse_record()
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
f5b7d87c25
s3:dbwrap: dbwrap_parse_record() should always return -1 on "not found"
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
893805b99c
s3:dbwrap: add function dbwrap_parse_record()
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
fff09d066f
s3:dbwrap: add specific dbwrap_exists() implementation to dbwrap_rbt
2011-10-11 14:17:55 +02:00
Gregor Beck
28e4c41d5b
s3:dbwrap: factor out db_rpt_search_internal()
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
5953839b18
s3:dbwrap: add specific dbwrap_exists() implementation to dbwrap_tdb
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
87b68cea5b
s3:dbwrap: add function dbwrap_exists()
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Michael Adam
87f51bfa99
s3:dbwrap: add a wrapper dbwrap_traverse_read()
2011-10-11 14:17:55 +02:00
Michael Adam
8f098a635f
s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an additional parameter
2011-10-11 14:17:55 +02:00
Michael Adam
6608ba850b
s3:dbwrap: reorganize dbwrap.h some
2011-10-11 14:17:55 +02:00
Michael Adam
2d52f6f8f5
s3:dbwrap: move dbwrap_traverse() to dbwrap.c, the core of the dbrwap subsystem
2011-10-11 14:17:55 +02:00
Michael Adam
663c661b11
s3:dbwrap: move dbwrap_store() back to dbwrap.c, the core of the dbwrap subsystem
2011-10-11 14:17:55 +02:00
Michael Adam
2aa5601c0a
s3:dbwrap: move dbwrap_delete() back to dbwrap.c, the core of the dbwrap subsystem
2011-10-11 14:17:55 +02:00
Michael Adam
c3868b7488
s3:dbwrap: move dbwrap_fetch() back to dbwrap.c, the core of the dbwrap subsystem
2011-10-11 14:17:55 +02:00
Michael Adam
7a72c84ee7
s3:dbwrap: move the db_open_rbt() prototype to a new header dbwrap_rbt.h
2011-10-11 14:17:55 +02:00
Michael Adam
c768121661
s3:dbwrap: move the db_open_file() prototype to a new header dbwrap_file.h
2011-10-11 14:17:55 +02:00
Michael Adam
38f7f8e44d
s3:dbwrap: move the db_open_tdb() prototype to a new header dbwrap_tdb.h
2011-10-11 14:17:55 +02:00
Michael Adam
82bc3fa81c
s3:dbwrap: move the db_open_ctdb() prototype to a new header dbwrap_ctdb.h
2011-10-11 14:17:54 +02:00
Stefan Metzmacher
4ebd510abe
s3:lib/netapi: avoid '//' comments
...
The compiler on openindiana doesn't like them.
metze
2011-10-08 07:24:13 +02:00