1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

6022 Commits

Author SHA1 Message Date
Andrew Bartlett
e09f05731d s3-lib/sysacls: Do not include an embedded \0 between ACL entries in sys_acl_to_text()
This makes it possible to print the entire string again.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed May  9 06:07:06 CEST 2012 on sn-devel-104
2012-05-09 06:07:06 +02:00
Andrew Bartlett
fc4c06f284 s3-lib: Add const to sys_acl_to_text 2012-05-09 04:21:05 +02:00
Andrew Bartlett
ad11b90eb6 s3-lib: Fix indentation in sys_acl_to_text() 2012-05-09 04:21:05 +02:00
Stefan Metzmacher
3e9b760406 s3:idmap_cache: change DEBUG message to level 10
metze
2012-05-06 14:50:38 +02:00
Andrew Bartlett
bb1d541da1 s3-idmap: remove (now) unused function idmap_cache_set_sid2both()
Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 13:18:05 +02:00
Andrew Bartlett
583b104d4b s3-idmap: Rework idmap_cache to store ID_TYPE_BOTH values
This required that the lower level cache store a UID/GID and a type, and that
we operate on struct unixid rather than just uid/gid.

The ID_TYPE_BOTH is then handled as being a positive mapping for both
a UID and GID value.  Wrapper functions are provided so that callers are not
changed in this patch.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 13:18:02 +02:00
Christian Ambach
7a07ce2680 s3:util add sid_check_is_wellknown_builtin() 2012-05-01 09:32:11 +02:00
Andrew Bartlett
442a81e7b2 s3-lib Add a way to allocate the task_id value in server_id
This safely allocates the task_id so that when we have multiple event
contexts, they can each have their own messaging context, particularly
for the imessaging subsystem under source4.

Andrew Bartlett
2012-04-30 17:55:12 +10:00
Volker Lendecke
374ca0bd26 s3: Fix Coverity ID 2751: REVERSE_INULL 2012-04-24 13:28:50 +02:00
Andrew Bartlett
3969cc28e8 s3-dbwrap: A void function can not return a value
Only non-gcc compilers seem to notice this as an error.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 23 05:58:52 CEST 2012 on sn-devel-104
2012-04-23 05:58:52 +02:00
Volker Lendecke
13d667bbff s3: Implement db_id for dbwrap_cache
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Apr 21 13:46:00 CEST 2012 on sn-devel-104
2012-04-21 13:46:00 +02:00
Volker Lendecke
d26028316d s3: Initialize "stored_callback" in dbwrap_cache
This should fix one of the recent flaky tests
2012-04-21 12:10:49 +02:00
Michael Adam
499e7372be s3:id_cache: do not use the in-memory idmap cache (it is going to be removed)
This also removes the ID_CACHE_FLUSH message.
2012-04-20 23:17:36 +02:00
Stefan Metzmacher
3f00295f5e s3-dbwrap: dbwrap_watch_record_stored => NT_STATUS_NOT_FOUND is ok...
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Apr 20 17:05:52 CEST 2012 on sn-devel-104
2012-04-20 17:05:52 +02:00
Volker Lendecke
1be6d849ab s3-g_lock: Use dbwrap_record_watch_send/recv
This simplifies the g_lock implementation. The new implementation tries to
acquire a lock. If that fails due to a lock conflict, wait for the g_lock
record to change. Upon change, just try again. The old logic had to cope with
pending records and an ugly hack into ctdb itself. As a bonus, we now get a
really clean async g_lock_lock_send/recv that can asynchronously wait for a
global lock. This would have been almost impossible to do without the
dbwrap_record_watch infrastructure.
2012-04-19 22:24:19 +02:00
Volker Lendecke
99fa29ae09 s3-dbwrap: Add dbwrap_record_watch_send/recv
With this API you can asynchronously wait for a record to be modified
2012-04-19 22:24:18 +02:00
Volker Lendecke
61c97506e8 s3-dbwrap: Add dbwrap_set_stored_callback
This is a per-db function that is called whenever some record is modified
2012-04-20 13:42:40 +02:00
Volker Lendecke
8e5b11bc14 s3-dbwrap: Add "db_context" to "db_record" 2012-04-20 13:42:40 +02:00
Volker Lendecke
0f20ffbcbd s3-dbwrap: Add dbwrap_db_id
This returns a blob uniquely identifying the database
2012-04-20 13:42:40 +02:00
Volker Lendecke
e3de5e4fb6 s3: Fix msg_channel in the cluster case 2012-04-20 13:42:40 +02:00
Volker Lendecke
e58f03c91a s3: Fix the build on FreeBSD
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 19 19:13:45 CEST 2012 on sn-devel-104
2012-04-19 19:13:45 +02:00
Volker Lendecke
7011d7ef18 s3: Fix Coverity ID 2743: CHECKED_RETURN 2012-04-19 17:37:38 +02:00
Volker Lendecke
f1c90e12f5 s3: Fix Coverity ID 2744: CHECKED_RETURN 2012-04-19 17:37:38 +02:00
Volker Lendecke
85c1e895a5 s3: Fix Coverity ID 2745 and 2746: FORWARD_NULL
We can assume that the rbt dbs are around
2012-04-19 17:37:37 +02:00
Volker Lendecke
dc3b796260 s3: Attempt to fix Coverity ID 2748: INTEGER_OVERFLOW
Not sure this will actually please Coverity, but it fixes a severe bug
2012-04-19 17:37:37 +02:00
Andrew Bartlett
84ad848c86 s3-xattr_tdb: Remove dead code: talloc_stackframe() cannot fail
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 19 14:15:42 CEST 2012 on sn-devel-104
2012-04-19 14:15:41 +02:00
Andrew Bartlett
00d493b00c s3-dbwrap: Remove dead code: talloc_stackframe() cannot fail 2012-04-19 12:34:33 +02:00
Volker Lendecke
0021fc17e4 s3-dbwrap: Fix an unused var warning 2012-04-18 18:16:27 +02:00
Andrew Bartlett
44b6bf9130 s3-xattr_tdb: Use talloc_stackframe() more to allow calling from common code 2012-04-18 12:05:00 +10:00
Andrew Bartlett
492942a66a s3-xattr_tdb: Be nice to xattr_tdb_getxattr callers, return the full blob
In this case, the blob is already in memory, so it is easier to return the full
blob to the caller, and let the caller decide if some interface restriction
stops the full blob from being passed all the way up the stack.

This allows us to quickly write a python wrapper for this xattr storage
mechanism.

Andrew Bartlett
2012-04-18 12:05:00 +10:00
Andrew Bartlett
351c78fc67 s3-xattr_tdb: make xattr_tdb a private library, for use outside vfs_xattr_tdb 2012-04-18 12:05:00 +10:00
Andrew Bartlett
ce9676839b s3-lib: Add file_id_string() 2012-04-18 12:05:00 +10:00
Andrew Bartlett
ea5a9b21fb s3-build: move file_id.c into samba3-util and create a private header 2012-04-18 12:05:00 +10:00
Andrew Bartlett
cc86f8e985 lib/util: Move map_nt_error_from_tdb to the top level
This will help with making dbwrap available as a top level library.

Andrew Bartlett
2012-04-18 12:04:59 +10:00
Andrew Bartlett
338e5a1d35 s3-dbwrap: push lp_ctx up another layer in the stack
This will allow db_open_tdb() to be called from common code, which may
already have a loadparm context loaded.

It also slowly moves the lp_ctx up the stack, as required to remove
the library loop between smbconf and the registry.

Andrew Bartlett
2012-04-18 12:04:59 +10:00
Andrew Bartlett
235016bcf9 s3-dbwrap: Add talloc_stackframe() calls
This is in preperation for calling dbwrap from common code, where we may not
have a stackframe set up.

Andrew Bartlett
2012-04-18 12:04:59 +10:00
Volker Lendecke
0b501e823f s3: Make ctdbd_messaging_send_blob available in non-clustered mode
This will avoid the need for some #ifdefs
2012-04-17 10:21:02 +02:00
Volker Lendecke
a03a74c353 s3: Make messaging_ctdbd_connection available in non-clustered mode
This might make some #ifdef CLUSTER_SUPPORT unnecessary in the future
2012-04-17 10:21:02 +02:00
Volker Lendecke
b23b357557 s3: Implement tevent_barrier
This will help notify torture tests: A tevent barrier can be waited on with
tevent_barrier_wait_send/recv. The barrier is initialized with a number of
requests that it will accept waiting. When that number is reached, all those
requests will be released and their callback will be called. The barrier will
be free for re-use again.
2012-04-17 10:21:02 +02:00
Volker Lendecke
05ff425c17 s3: Introduce ctdb_messaging_send_blob
Send a raw blob without the messaging.idl wrap
2012-04-17 10:21:01 +02:00
Volker Lendecke
74baae782f s3: Add msg_channel
This is a tevent_based variant of messaging_register
2012-04-17 10:21:01 +02:00
Volker Lendecke
41712599e0 s3: Add messaging_tdb_event()
This is a void* that represents a signal handler attached to some
custom tevent_context. This is necessary to make the tdb based
messaging infrastructure trigger its business when we are sitting in
tevent_loop_once for an event context that is not the main one in the
messaging context.
2012-04-17 10:21:01 +02:00
Volker Lendecke
48a485b639 s3: Add a second ctdb connect library
The existing one is not async at all.
2012-04-17 10:21:01 +02:00
Volker Lendecke
94cf5cc284 s3: Add dbwrap_try_fetch_locked
This is designed to spread the load on individual ctdb records to allow upper
layers to do backoff mechanisms. In the ctdb case, do not get the record if a
local lock is already taken. If we are not dmaster, do at most one migrate
attempt.

For the tdb case, this is a nonblocking fetch_locked. If someone else has the
lock, give up.
2012-04-17 10:21:00 +02:00
Volker Lendecke
bd9178506e s3: Add dbwrap_cache
This is a caching layer for the notify database and potentially for the brlock
database. It caches the parse_record operation as long as the underlying seqnum
does not change.
2012-04-17 10:21:00 +02:00
Volker Lendecke
ba8f19c556 s3: Open up 3 levels of dbwrap_lock_order 2012-04-17 10:21:00 +02:00
Volker Lendecke
1e1b6f79b3 s3: Add infrastructure for background jobs 2012-04-17 10:21:00 +02:00
Volker Lendecke
a49ac23a10 s3: Return CTDB_PATH from lp_ctdbd_socket()
All callers had that fallback
2012-04-17 10:21:00 +02:00
Volker Lendecke
8a907c9c65 s3: Fix the pthreadpool build on OS/X
OS/X does not have clock_gettime, and without replace.h we do not
get the replacement macro
2012-04-09 18:05:02 +02:00
Volker Lendecke
5138b1f7fb s3: Compile fix for dbwrap_file.c
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Apr  7 14:10:35 CEST 2012 on sn-devel-104
2012-04-07 14:10:35 +02:00