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

73848 Commits

Author SHA1 Message Date
Günther Deschner
834dcdb35d s4-smbtorture: use ipv4 addresses for backchannel spoolss change notify
connections for now.

Guenther
2011-06-21 17:46:37 +02:00
Volker Lendecke
7e1d485780 s3: Remove unused code
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jun 21 15:36:01 CEST 2011 on sn-devel-104
2011-06-21 15:36:01 +02:00
Volker Lendecke
729d17e725 s3: Convert WINBINDD_WINS_BYNAME to the async API 2011-06-21 14:25:12 +02:00
Andrew Tridgell
cfdeef4c11 s3-smbd: longer explanation of smbd_shim code
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Jun 21 09:05:37 CEST 2011 on sn-devel-104
2011-06-21 09:05:37 +02:00
Andrew Bartlett
b373d0e777 s3-build: Provide a run-time shim to work around duplicate symbols
The become_root() and similar 'smbd' functions that are used widely in
Samba libraries had 'dummy' copies in dummysmbd.c and dummyroot.c.

These have been replaced by a runtime plugin mechanim, which ensures
that standlone binaries still do nothing, while in smbd the correct
function is used.

This avoids having these as duplicate symbols in the smbd binary,
which can cause unpredictable behaviour.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21 15:54:51 +10:00
Andrew Bartlett
e00b1fa2b0 lib/util: Restore CH_UNIX as source charset for d_printf()
I'm changed this during the change to use the d_printf() code in
common, but should not have.

However, there is a puzzle: What is the right source charset?
Translated strings in our .mo and .msg files are in UTF8, but strings
such as file names on remote servers are in UNIX (whatever that is).
I can't see how this actually works properly when either CH_DISPLAY or
CH_UNIX are other than UTF8!

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21 15:54:44 +10:00
Andrew Bartlett
bf83b641e2 lib/util Remove display_cd from d_printf()
The setting of the display charset is now done by
convert_string_talloc() selecting the right charset based on
CH_DISPLAY.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21 15:54:38 +10:00
Brad Hards
c017cbfaa4 s4/auth: Trivial spelling fixes.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21 15:54:32 +10:00
Andrew Bartlett
35a9c23a01 build: move dynconfig for top level build up
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21 15:54:22 +10:00
Rusty Russell
894b0273fc lib/ccan/tally.h: update for FreeBSD compile.
Based on commit 0284423676209380a2e07086b9b356096a2f93e6 from CCAN:
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Tue Jun 21 10:43:31 2011 +0930

    tally: fix FreeBSD compile, memleak in tests.

    Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough.

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Jun 21 05:52:12 CEST 2011 on sn-devel-104
2011-06-21 05:52:12 +02:00
Andrew Bartlett
233a6223b2 s4-param Autogenerate the loadparm_globals and loadparm_service tables
This makes it much easier and less error prone to add new parameters
as we merge the s3 and s4 loadparm systems.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Jun 21 04:41:54 CEST 2011 on sn-devel-104
2011-06-21 04:41:54 +02:00
Andrew Bartlett
79b1a1092d selftest: Run tests for libsmbclient and libnetapi
This adds the known failure for the one test (netbios browsing) that
fails.

Andrew Bartlett
2011-06-21 11:29:39 +10:00
Andrew Bartlett
a6f31f13ec s4-torture Enable libnetapi and libsmbclient tests using combined build
Because we now always build the source3 code, we can link directly
against a private libnetapi and libsmbclient to test the behaviour of
these important APIs.

We use a private libnetapi_net_init(), and by using this interface
rather than the public one, we can ensure that the correct smb.conf is
loaded (as smbtorture4 is a Samba4 semantics binary).

The #include of the source3 includes.h is required to do the manual
lp_load().

Andrew Bartlett
2011-06-21 11:29:35 +10:00
Andrew Bartlett
577034b3cd build: disable -Wl,--as-needed to try and fix the build
The issue here is that the source3 components now built as part of the
top level build do not have their depenencies fully specified, and
this causes the build to fail for many of our users.

When we fix that, we can restore this flag, so we again find that kind
of bug, which will show up for our Gentoo users regardless.

Andrew Bartlett
2011-06-21 09:36:23 +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
Andrew Bartlett
5db74b9607 lib/util Remove samba-util-common!
All of this code is now in common, so we don't need the second
'-common' library any more!

Andrew Bartlett
2011-06-21 09:36:22 +10:00
Andrew Bartlett
d18491a7bd lib/util: allow parmlist.c to compile under s3 includes.h 2011-06-21 09:36:22 +10:00
Andrew Bartlett
f83fca1c57 lib/util: Use common d_printf() in the whole codebase
This removes the lang_tdb based varient, the only user of the lang_tdb
code is SWAT, which calls that directly.

'net' and 'pam_winbind' are internationalised using gettext.

Andrew Bartlett
2011-06-21 09:35:34 +10:00
Andrew Bartlett
ea006ab8b2 s3-param Put &Globals in the FN_ macros, rather than in each entry
This global replace allows an easier comparison between the source3
and source4 loadparm systems.

Andrew Bartlett
2011-06-21 09:35:34 +10:00
Andrew Bartlett
5db2041511 s4-param Add my authorship to this script 2011-06-21 09:35:34 +10:00
Andrew Bartlett
f3d6b742b1 lib/util Make unused d_vfprintf() static 2011-06-21 09:35:34 +10:00
Volker Lendecke
994abd2dea s3: Fix a winbind message
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 23:28:43 CEST 2011 on sn-devel-104
2011-06-20 23:28:43 +02:00
Michael Adam
c8cfd75674 s3:idmap_autorid: remove redundant code
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jun 20 14:56:29 CEST 2011 on sn-devel-104
2011-06-20 14:56:29 +02:00
Michael Adam
d278eba784 s3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the success case 2011-06-20 13:46:27 +02:00
Michael Adam
389eada12d s3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize" 2011-06-20 13:46:27 +02:00
Michael Adam
0f76273423 s3:idmap_autorid: fail initialization if the domain is not "*"
autorid can only be used as a backend for the default idmap configuration.
2011-06-20 13:46:27 +02:00
Volker Lendecke
dc461cade5 s3: Fix the build, NAME_MAX not universally available
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 13:45:21 CEST 2011 on sn-devel-104
2011-06-20 13:45:21 +02:00
Volker Lendecke
f0ff6f390a Use tevent_req_oom
This fixes a few Coverity errors
2011-06-20 12:33:24 +02:00
Volker Lendecke
8e1b9640e7 tevent: change version to 0.9.12 2011-06-20 12:33:24 +02:00
Volker Lendecke
c2a826b10c tevent: Add tevent_req_oom
This is a replacement for tevent_req_nomem(NULL, req)
2011-06-20 12:33:24 +02:00
Rusty Russell
580fedc321 tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.
I don't think this kind of hack belongs in the tdb2 source, but SAMBA uses
it to speed testing, so we should respect it: handle it in our compat
open wrapper.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Jun 20 12:32:08 CEST 2011 on sn-devel-104
2011-06-20 12:32:08 +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
5eecc85423 tdb2: create tdb2 versions of various testing TDBs.
Soon, TDB2 will handle tdb1 files, but until then, we substitute.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:36 +02:00
Rusty Russell
957801fcb0 tdb2: python wrapper
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
cd96271036 source3/lib/util_tdb.c: operation timeout support for TDB2.
TDB2 doesn't have (the racy) signal pointer; the new method is to
override the locking callbacks and do the timeout internally.

The technique here is to invalidate the struct flock when the timeout
occurs, so it works even if it happens before we enter the fcntl() call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
6b3f9ac0f8 tdb2: minor changes to SAMBIFY it.
This is a bit messy, but it works.  Kept as a separate patch so it's
easier to merge back and forth with CCAN's tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
d24ddb0350 tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
d925b327f4 tdb_compat: Higher level API fixes.
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +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
9eaaf1fc67 tdb2: tdb_parse_record() returns negative errors, not -1.
Fixup callers to tdb_parse_record() to be compatible with tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
42506c4a3e source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.
TDB has no idea of endian itself, but it knows whether the TDB is the
same endian as the current machine, so we should use that rather than
implementing TDB_BIGENDIAN in tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
61867eaa84 tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.
We don't expose freelist or hash size for TDB2.

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
58f7cda1bc tdb_compat: use tdb_errorstr_compat()
Since TDB2 functions return the error directly, tdb_errorstr() taken an
error code, not the tdb as it does in TDB1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
3a8faefd66 tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.
Note that tdb_nextkey_compat frees the old key for us.

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
9850f25633 tdb_chainunlock: ignore return value.
TDB2 returns void here.  tdb_chainunlock will *always* return with the
chain 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
868d77bc5b tdb_chainlock: 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