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

5779 Commits

Author SHA1 Message Date
Andrew Tridgell
505dce2d3a pyldb: added methods to get/set extended components on DNs
this will be used by the dbcheck code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 14:47:08 +10:00
Andrew Tridgell
341884c835 ldb: added extended_str() method to pyldb
this gives access to ldb_dn_get_extended_linearized() from python

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 14:47:08 +10:00
Andrew Tridgell
dd5350b0a8 ldb: expose syntax oids to python
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-22 14:47:07 +10:00
Andrew Bartlett
179a3530d7 s4-cmdline: Rename popt tables to avoid symbol conflicts
These same names are use in the source3 popt code, which is called from
in libsmbclient and libnet.  These are then included in the smbtorture
binary for testing

Andrew Bartlett
2011-06-21 09:36:23 +10:00
Volker Lendecke
f0ff6f390a Use tevent_req_oom
This fixes a few Coverity errors
2011-06-20 12:33:24 +02:00
Rusty Russell
985e83ef52 tdb2: tie it into build process if --enable-tdb2-breaks-compat
This is simplistic.  We need to support making TDB2 a standalone library,
but for now, we simply built it in-tree.

Once we have tdb1 compatibility in tdb2, we can rename this option to
--enable-tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:36 +02:00
Rusty Russell
ca1936fbb2 tdb_compat: use tdb_open_compat.
This is a helper for the common case of opening a tdb with a logging
function, but it doesn't do all the work, since TDB1 and TDB2's log
functions are different types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
4823262439 tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.
These don't exist in tdb2.  The former is used in one weird place in
tdb1, and the latter not at all.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
a4993f647c ldb: replace 'struct TDB_DATA' with 'TDB_DATA'
The typedef is TDB2 compatible, the struct isn't.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
2c71e8596b tdb_unlockall/tdb_unlockall_read: ignore return value.
TDB2 returns void here.  tdb_unlockall will *always* return with the
database unlocked, but it will complain via the log function if it wasn't
locked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
5a7874e119 tdb_traverse/tdb_traverse_read: check returns for negative, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for < 0 instead of == -1.

Also, there's no tdb_traverse_read in TDB2: we don't try to make
traverse reliable any more, so there are no write locks anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
d6251996fa tdb_transaction_cancel: ignore return value.
TDB2 returns void here.  tdb_transaction_cancel will *always* return
with the transaction cancelled, but it will complain via the log
function if a transaction wasn't in progress.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
6bc59d77b6 tdb_store: check returns for 0, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
058c4f8492 tdb_fetch_compat: use instead of tdb_fetch.
This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
0e4c358e27 tdb_compat.h: divert every tdb build and includes to tdb_compat
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00
Matthieu Patou
29e043a208 pyldb: add unit test for get(myattribute, defVal)
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104
2011-06-20 09:23:15 +02:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Andrew Bartlett
018f4a5889 libcli/util Bring samba4 unix -> nt_status code in common.
Due to library link orders, this is already the function that is being
used.  However we still need to sort out the duplicate symbol issues,
probably by renaming things.

Andrew Bartlett
2011-06-20 14:36:06 +10:00
Matthieu Patou
02970f41a2 py-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal) 2011-06-19 23:21:07 +02:00
Andrew Tridgell
2320221105 pyldb: make ldb operations more consistent
This changes the controls option on ldb operations to be a keyword
argument, which is more consistent with general python
conventions. This also fixes the pydoc output to include the controls
option.
2011-06-14 09:39:24 +02:00
Andrew Tridgell
8741f03995 pyldb: added validate option to ldb.modify()
This allows validation of ldb messages in a ldb modify operation to be
bypassed, by setting validate=False. This is useful in the dbcheck
tool to allow for removing invalid empty attributes from the database
2011-06-14 09:39:24 +02:00
Andrew Bartlett
16b1c77644 lib/util Bring procid_str() into lib/util as server_id_string()
This is needed for OpenChange, which prints Samba struct server_id
values in debug messages.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
d057116cc2 server_id.idl: Bring server_id.idl in common
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09 12:40:08 +02:00
Andrew Bartlett
8d803d5a0a s4-cluster Use task_id instead of id2 to clarify server_id structure
This seems a clearer and more acceptable name.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09 12:40:08 +02:00
Matthias Dieter Wallnöfer
ba5cec5804 ldb:ldb_msg.c - move away from "errno"
Reviewed-by: Tridge
2011-06-09 09:34:55 +02:00
Andrew Tridgell
79ef434b90 s4-interface: raise the debug level for interface discovery 2011-06-08 04:56:04 +02:00
Andrew Tridgell
3ccb72d749 s4-ipv6: fixed iface_list_same_net() for IPv6 2011-06-07 12:55:37 +10:00
Andrew Tridgell
6a6d4d8884 s4-ipv6: fix iface_list_best_ip() for IPv6
return an interface with the same address family as the target
2011-06-07 12:55:37 +10:00
Andrew Bartlett
907cdb5de7 s4-modules Remove lp_ctx from init functions that no longer need it
Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
de46ad9084 lib/util use modules_path(), data_path() and shlib_ext() from source3
This brings these helpful utility functions in common, as they are not
based on either loadparm system.

(The 'modules dir' parameter from Samba4 will shortly be removed, so
there is no loss in functionality)

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Tridgell
d168a5e703 s4-ipv6: fill in family when initialising from sockaddr
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jun  6 05:35:36 CEST 2011 on sn-devel-104
2011-06-06 05:35:36 +02:00
Andrew Tridgell
25ac58dcce s4-ipv6: fix the address family for IPv6 string addresses 2011-06-06 12:26:11 +10:00
Andrew Tridgell
3736f29696 s4-ipv6: use the server address family
don't force v4 in connect_multi
2011-06-06 12:26:11 +10:00
Andrew Tridgell
dc1e6109c8 s4-ipv6: enable IPv6 by default
it now passes all tests
2011-06-06 12:26:10 +10:00
Andrew Tridgell
40dc94a53f s4-ipv6: update callers to load_interface_list() 2011-06-06 12:26:10 +10:00
Andrew Tridgell
44d47e8515 s4-ipv6: allow ipv6 to be enabled/disabled in smb.conf
this adds the parametric option ipv6:enable=true/false

It defaults to false for now, until the remaining issues with testing
of ipv6 are resolved
2011-06-06 12:26:10 +10:00
Andrew Tridgell
df632483f1 s4-ipv6: fixed ipv6_listen() to use IPV6_V6ONLY
this changes ipv6_listen() to use IPV6_V6ONLY, and to setup the right
scope id for link local IPv6 addresses
2011-06-06 12:26:09 +10:00
Andrew Tridgell
244137b10d s4-ipv6: added socket_address_from_sockaddr_storage()
this converts a struct sockaddr_storage to a struct socket_address
2011-06-06 12:26:09 +10:00
Andrew Tridgell
d8d63b53b7 s4-ipv6: added ipv4 functions to interface code
this adds iface_list_first_v4() and iface_list_n_is_v4(). The NBT
server will use these to allow it to listen only for IPv4 addresses.
2011-06-06 12:26:09 +10:00
Andrew Tridgell
a527b96c96 s4-ipv6: fixed a warning 2011-06-06 12:26:09 +10:00
Andrew Tridgell
62af4a3798 s4-ipv6: allow IPv6 addresses in our interfaces list 2011-06-06 12:26:09 +10:00
Andrew Tridgell
2fc11518b7 s4-ipv6: added iface_list_wildcard()
this returns a list of wildcard address to listen on, when we don't
have 'bind interfaces only' set. It is a list, not a single address,
we need to listen separately for the IPv6 "::" address from the IPv4
0.0.0.0 address.

This also takes account of the loadparm "socket address" option
2011-06-06 12:26:09 +10:00
Rusty Russell
0204ae6229 lib/util/time.c: timeval_current_ofs_usec
Several places want "microseconds from current time", and several were
simply handing "usecs" values which could be over a million.

Using a helper to do this is safer and more readable.

I didn't replace any obviously correct callers (ie. constants).

I also renamed wait_nsec in source3/lib/util_sock.c; it's actually
microseconds not nanoseconds (introduced with this code in Volker's
19b783cc Async wrapper for open_socket_out_send/recv).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Matthias Dieter Wallnöfer
d34205add3 s4:ldb-samba/ldb_wrap.*-dsdb/samdb/samdb.c - handle LDB connection flags as unsigned
The LDB API ("ldb_connect") prescribes that they should be "unsigned".

Signed-off-by: Metze
2011-05-21 16:21:14 +02:00
Matthias Dieter Wallnöfer
4618a7f3a1 ldb:pyldb.c - all flags should be unsigned
Adapt it to the previous commits

Reviewed-by: Jelmer + Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
74b50b47e9 ldb:ldb_sqlite3.c - all LDB flags should be handled as "unsigned"
Signed-off-by: Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
3956e6840d ldb:tools/cmdline.c + tools/ldbtest.c - the connection flags are typed as "unsigned"
Signed-off-by: Metze
2011-05-21 16:21:13 +02:00
Matthias Dieter Wallnöfer
e6c5e11116 ldb:ldbtest.c - make more use of LDB constants
Signed-off-by: Metze
2011-05-21 16:21:13 +02:00
Andrew Bartlett
30979f3ea1 build: Expand dcerpc-samba grouping library
This is possible in common now because the generated RPC code does not
rely on a particular dcerpc layer.

Andrew Bartlett
2011-05-18 16:12:07 +02:00
Andrew Tridgell
c596d85afd s4-interfaces: keep interfaces in the order they were declared
the spoolss notify test depends on the interfaces order

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun May  8 13:57:58 CEST 2011 on sn-devel-104
2011-05-08 13:57:58 +02:00