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

1409 Commits

Author SHA1 Message Date
Volker Lendecke
ebf0779608 r10472: Check for strndup
(This used to be commit 8335aa056f)
2007-10-10 13:38:51 -05:00
Andrew Tridgell
60a455dd44 r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don't
have it. Overestimating is harmless.
(This used to be commit ab953c8c72)
2007-10-10 13:38:51 -05:00
Andrew Tridgell
c72afc39f0 r10470: solaris8 has a problem with tdbtorture with 3 processes. To see if
this is just a solaris issue this patch changes the default to 3, and
I'll see how many build farm boxes break
(This used to be commit c85836bafc)
2007-10-10 13:38:51 -05:00
Andrew Tridgell
ddf733fc58 r10469: use the older style of structure initialisation for tdb to make it
more portable. tdb is used in more than just Samba4, and I think the
portability/readability balance is a bit different
(This used to be commit fc692dc61f)
2007-10-10 13:38:50 -05:00
Andrew Tridgell
3bcfc68e0d r10468: - terminate tdbtorture quickly when an error is detected
- more workarounds for aix not handling malloc of size 0
(This used to be commit c2b1739c63)
2007-10-10 13:38:50 -05:00
Andrew Tridgell
6e4ebbed89 r10467: aix doesn't like zero length malloc :(
(This used to be commit 0177c6ca3e)
2007-10-10 13:38:50 -05:00
Andrew Tridgell
d98b913aa9 r10466: work around missing pread/pwrite declaration on openbsd
(This used to be commit e615f36733)
2007-10-10 13:38:49 -05:00
Andrew Tridgell
5860aef9cd r10465: separate out a read_only db from a read-only traversal to ensure we
don't end up doing a mmap read only
(This used to be commit 294ccfd46a)
2007-10-10 13:38:49 -05:00
Andrew Tridgell
fbc2dbbb41 r10463: consider it an error if tdbtorture produces any log messages
(This used to be commit d9ee0e8b59)
2007-10-10 13:38:49 -05:00
Andrew Tridgell
36cfc9c4ac r10462: cope better with compilers that don't put the object file in the same directory
as the source
(This used to be commit 312491b251)
2007-10-10 13:38:49 -05:00
Andrew Tridgell
5540712156 r10461: fixed tdb build on systems without stdint.h
(This used to be commit 83168c7e76)
2007-10-10 13:38:48 -05:00
Andrew Tridgell
c0e6586405 r10460: fixed portability of transaction code to systems with integer
alignment constraints (like sparc)
(This used to be commit bce35ad237)
2007-10-10 13:38:48 -05:00
Andrew Tridgell
036b27c8e4 r10459: fixed some portability problems
(This used to be commit 03942dd54b)
2007-10-10 13:38:48 -05:00
Jelmer Vernooij
4be0ae794e r10456: More SCons fixes:
- Add framework for fallback generating code
 - Move pread / pwrite replacement functions to libreplace
 - Support pidl builds correctly
 - Support asn1 builds correctly
 - Move OS-specific checks to lib/replace/SConscript
(This used to be commit fbbfad0a1f)
2007-10-10 13:38:48 -05:00
Jelmer Vernooij
da46c9252e r10453: Fix the build
(This used to be commit 7be3ec4dbb)
2007-10-10 13:38:48 -05:00
Jelmer Vernooij
b85f7857dc r10452: Couple of small scons updates - ignore .sconsign files
(This used to be commit b2d2b4f233)
2007-10-10 13:38:47 -05:00
Stefan Metzmacher
aba4d018b4 r10449: remove double copyright header
metze
(This used to be commit f6bd76fa15)
2007-10-10 13:38:47 -05:00
Tim Potter
7906d768cc r10444: Add LIBBASIC files to proto.h
(This used to be commit 1c3748421f)
2007-10-10 13:38:46 -05:00
Jelmer Vernooij
f3b412fbd6 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Andrew Tridgell
86df9ca15a r10424: for caller convenience, automatically turn a tdb_traverse() into a
tdb_traverse_read() for read only databases
(This used to be commit 9b53e04377)
2007-10-10 13:38:44 -05:00
Andrew Tridgell
fcb41c3bbd r10423: minor changes to the ldb test suite to allow it to work correctly with
a real ldap backend (such as openldap)
(This used to be commit d267f8c623)
2007-10-10 13:38:44 -05:00
Andrew Tridgell
1828b783cf r10422: ldb_search() can now use tdb_traverse_read() to ensure it can run in
parallel with any transaction
(This used to be commit ddff66298f)
2007-10-10 13:38:44 -05:00
Andrew Tridgell
bd310b7925 r10421: following on discussions with simo, I have worked out a way of
allowing searches to proceed while another process is in a
transaction, then only upgrading the transaction lock to a write lock
on commit.

The solution is:

 - split tdb_traverse() into two calls, called tdb_traverse() and
   tdb_traverse_read(). The _read() version only gets read locks, and
   will fail any write operations made in the callback from the
   traverse.

 - the normal tdb_traverse() call allows for read or write operations
   in the callback, but gets the transaction lock, preventing
   transastions from starting inside the traverse

In addition we enforce the following rule that you may not start a
transaction within a traverse callback, although you can start a
traverse within a transaction

With these rules in place I believe all the deadlock possibilities are
removed, and we can now allow for searches to happen in parallel with
transactions
(This used to be commit 7dd31288a7)
2007-10-10 13:38:44 -05:00
Jelmer Vernooij
05bd880626 r10420: Two minor scons fixes
(This used to be commit 749b19d34f)
2007-10-10 13:38:43 -05:00
Simo Sorce
2ce3b5a003 r10419: Remove unused prototypes of locking functions (thanks Jelmer)
omment about transactions
(This used to be commit 3335250759)
2007-10-10 13:38:43 -05:00
Tim Potter
7e8372f253 r10415: The ldb and tdb libraries are bad examples to test out the make proto
code as they are marked as NOPROTO in the config.mk files.
(This used to be commit 5f530eacba)
2007-10-10 13:38:43 -05:00
Andrew Tridgell
f08cdba2c5 r10410: blindly update the scons file for tdb. I'm not sure how this works,
but it definately needs transaction.c now
(This used to be commit fa353a5bc5)
2007-10-10 13:38:42 -05:00
Andrew Tridgell
07f123b6c8 r10409: allow smb.conf override of ldb synchronous transactions with "ldb:nosync = yes/no"
(This used to be commit 435cbcf78b)
2007-10-10 13:38:42 -05:00
Andrew Tridgell
af352b4664 r10408: now that we are using tdb transactions we don't need any additional
locking code in the ldb_tdb backend, except for a single read lock
during searches to ensure searches don't cross transaction boundaries

The tdb transactions code would map these extra locks to noops anyway
(as locking makes no sense inside a transaction), but the work in
setting up the locking keys still costs something, and it makes the
code needlessly complex
(This used to be commit 1b8d368a67)
2007-10-10 13:38:42 -05:00
Andrew Tridgell
d78ea3e34a r10406: added --nosync option to all ldb tools, so that you can control if
transactions are synchronous or not on the command line.

add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary
ldb databases non-synchronous
(This used to be commit dba41164e0)
2007-10-10 13:38:41 -05:00
Andrew Tridgell
ede8415d61 r10405: added transactions into tdb, and hook them into ldb. See my
samba-technical posting for more details on the transactions design.

This also adds a number of command line arguments to tdbtorture,
making it more flexible, and fixes some lock deadlock conditions in
the tdbtorture code.
(This used to be commit 06bd8abba9)
2007-10-10 13:38:41 -05:00
Andrew Tridgell
cd67aa92a5 r10403: fixed the basedn for testing, and add a debug showing the size of the test in ldbtest
(This used to be commit 740b9f7537)
2007-10-10 13:38:40 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Andrew Tridgell
8f334f69b5 r10385: removed obsolete comment
(This used to be commit 40a8ad2d1e)
2007-10-10 13:38:36 -05:00
Andrew Tridgell
9ae24d8058 r10384: add _GNU_SOURCE in tdb configure
(This used to be commit 21e5c328a0)
2007-10-10 13:38:35 -05:00
Tim Potter
3e4f47aaff r10379: Add files for ldb and tdb to proto_files. The tool for building proto.h
is busted though.
(This used to be commit 54882f88ca)
2007-10-10 13:38:34 -05:00
Tim Potter
d191c7d993 r10377: Save configuration stuff to sconf.cache so it isn't annoyingly run
at every single build.  Run 'scons configure=1' or delete sconf.cache
to force checks to be re-run.

Jelmer, I think this stuff is cached in the .sconf_cache directory but
the message is still displayed and it looks like it caches the compiled
test object file not the actual result of the test.
(This used to be commit 9d001dc083)
2007-10-10 13:38:33 -05:00
Jelmer Vernooij
9d44a9a351 r10374: Add HAVE_* defines (on command-line or in config.h file) for scons +
some other minor updates
(This used to be commit f142c15de1)
2007-10-10 13:38:33 -05:00
Jelmer Vernooij
8db177b652 r10366: More scons fixes. Building et, asn1, lex and yacc files sort-of works now
(This used to be commit 22f18a8424)
2007-10-10 13:38:32 -05:00
Andrew Bartlett
65d4da0ff3 r10364: Turn gensec:gssapi on by default, except for a login of the form
-Udomain\\user.

This will probably break in a few configurations, so please let me
know.  I'll also work to have a way to inhibit kerberos/ntlmssp, as
this removes -k.

Andrew Bartlett
(This used to be commit 3c0dc570b8)
2007-10-10 13:38:31 -05:00
Jelmer Vernooij
920a627ba8 r10356: Make the proto generator work with scons
(This used to be commit a2268f1dd4)
2007-10-10 13:38:31 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Tim Potter
6cd5ede5d5 r10335: Build tdb tools into bin directory.
(This used to be commit f35c4763d5)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
b1c3c66ead r10332: Fix the build - messaging uses UNIX_PRIVS
(This used to be commit df4a923c64)
2007-10-10 13:38:28 -05:00
Jelmer Vernooij
069e498da2 r10330: Add SConscript to more subsystems. Some of the tdb tools build now.
Start on custom Samba scons tools (for handling proto generation, pidl, etc)
(This used to be commit 4bffe44359)
2007-10-10 13:38:28 -05:00
Tim Potter
96745cbfc0 r10328: Add more emacs python-mode markers.
(This used to be commit 540a3649e8)
2007-10-10 13:38:28 -05:00
Jelmer Vernooij
523034b9fb r10323: Add first bits required for getting compile with scons working. This does
not work yet and can exist parallel with the existing build system.
(This used to be commit 829568d759)
2007-10-10 13:38:25 -05:00
Jelmer Vernooij
d2a666acbe r10316: More dynconfig fixes
(This used to be commit 0963ab9c14)
2007-10-10 13:38:17 -05:00
Jelmer Vernooij
349294d358 r10315: Remove use of fstring and pstring in dynconfig.c
Remove unused includes of dynconfig.h
(This used to be commit 59083b7ba6)
2007-10-10 13:38:17 -05:00
Stefan Metzmacher
cb9d4c6707 r10312: fix compiler warning
metze
(This used to be commit 3309a0f4d9)
2007-10-10 13:38:16 -05:00
Simo Sorce
16aff2a184 r10305: start implementing better error handling
changed the prioivate modules API
error string are now not spread over all
modules but are kept in  a single place.

This allows a better control of memory
and error reporting.
(This used to be commit 3fc676ac1d)
2007-10-10 13:38:16 -05:00
Simo Sorce
46a8d80937 r10304: check for basic ldb_message sanity and return appropriate
LDB_ERR_ value
(This used to be commit 610f5646f0)
2007-10-10 13:38:15 -05:00
Simo Sorce
bb8f5c93ee r10303: check no attribute is given empty
(This used to be commit f0ad9495e4)
2007-10-10 13:38:15 -05:00
Simo Sorce
eebe0c269e r10302: Introduce ldap like error codes
(This used to be commit cbe438be6d)
2007-10-10 13:38:15 -05:00
Simo Sorce
cba1859fe1 r10301: fix standalone compiple after tdb changes
(This used to be commit acfb4b9283)
2007-10-10 13:38:15 -05:00
Simo Sorce
8919d6bf9a r10299: remove the public (un)lock functions and introduce a transaction based
private ldb API

ldb_sqlite3 is already working with this model and ldb_tdb will do
as soon as tridge finishes the tdb transaction code.

currently the transactions are always implicit and wrap any single
ldb API call except searching, the transaction functions are
currently not made public on purpose.

Simo.
(This used to be commit 1da4ac2cdc)
2007-10-10 13:38:14 -05:00
Jelmer Vernooij
86acf90e43 r10294: Generate Makefile directly rather then thru Makefile.in. Autoconf
substitution variables are now no longer used.

This is one more step towards a (hopefully) perl-based configure
(This used to be commit 6f9956a1dd)
2007-10-10 13:38:14 -05:00
Simo Sorce
5c708830bc r10277: do not ovverride LIKE, thanks to derrel I found out how to do
the same thing with a harmless user function
(This used to be commit 158693b406)
2007-10-10 13:38:13 -05:00
Tim Potter
48b513fd23 r10258: Fix an unused/duplicate local variable.
(This used to be commit 360be7028c)
2007-10-10 13:38:12 -05:00
Andrew Tridgell
0868b7c77d r10253: a fairly large tdb cleanup and re-organise. Nearly all of this change
just involves splitting up the core tdb.c code into separate files on
logical boundaries, but there are some minor functional changes as well:

 - move the 'struct tdb_context' into tdb_private.h, hiding it from
   users. This was done to allow the structure to change without
   breaking code that uses tdb.

 - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to
   access the elements of struct tdb_context that were used by
   external code but are no longer visible

 - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just
   as good due to the way tdb locks work

 - changed some of the types (such as tdb_off to tdb_off_t) to make
   syntax highlighting work better

 - removed the old optional spinlock code. It was a bad idea.

 - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes
   fail or report nasty looking errors. This is the only real bug
   fixed in this commit. Jeremy/Jerry, you might like to pickup this
   change for Samba3, as that could definately affect smbd in
   Samba3.

The aim of all of these changes is to make the tdb
transactions/journaling code I am working on easier to write. I
started to write it on top of the existing tdb.c code and it got very
messy. Splitting up the code makes it much easier to follow.

There are more cleanups we could do in tdb, such as using uint32_t
instead of u32 (suggested by metze). I'll leave those for another day.
(This used to be commit 4673cdd0d2)
2007-10-10 13:38:12 -05:00
Simo Sorce
d8da5e4fb7 r10251: some more work on ldb_sqlite3
I must say that writing a new module is a very good way
to find lot of subtle bugs laying in the code

We need more tests!

commit oLschema2ldif.c to keep it safe from data losses (rm -fr :-)

update test generic to reflect the fix made on comparsion functions
(This used to be commit 4357a2db5e)
2007-10-10 13:38:11 -05:00
Simo Sorce
8bfcb31b0e r10250: the comparison is caseless so we must caseless subtract
otherwise we get the wrong result when comparing upper
case chars with lower case chars
(This used to be commit f6ea6e9382)
2007-10-10 13:38:11 -05:00
Jelmer Vernooij
85263c3061 r10246: Remove unused function
Move auth-specific file to auth/
(This used to be commit 8aa9711a30)
2007-10-10 13:38:11 -05:00
Jelmer Vernooij
fd619b4fb3 r10245: Get rid of XFILE in a few places.
Add fdprintf() and vfdprintf() helper functions.
(This used to be commit 6685009f6a)
2007-10-10 13:38:11 -05:00
Simo Sorce
f77e859e48 r10236: fix (C) note
(This used to be commit 466e6812c3)
2007-10-10 13:38:10 -05:00
Simo Sorce
36d6ebf376 r10233: add commented PRAGMA to avoid fsyncs
(This used to be commit e5d8d83460)
2007-10-10 13:38:10 -05:00
Simo Sorce
38b04883fe r10232: Some work on ldb_sqlite3.
It is still far from being usable in samba4 but I want to commit
so that the work does not get lost by mistake.
This is also a good way to get comments if somebody is interested.

Sorry Derrell I ended up rewriting large parts of the code but I find
this style much more readable. Thanks for the hard work done. Your
work was a good reference for me.

ah the current code also shows some good numbers

sqlite3 generic test:
uid search took 0.05 seconds
real    0m12.492s
user    0m0.492s
sys     0m0.345s

with tdb we still get better numbers:
uid search took 0.46 seconds
real    0m0.892s
user    0m0.360s
sys     0m0.468s

but most of the time is spent in adding operations and I think
there's still a lot of space for improvement.

Simo.
(This used to be commit ace9990060)
2007-10-10 13:38:10 -05:00
Simo Sorce
2b2e133752 r10231: seem I flipped these, fix.
(This used to be commit 8ddf4de162)
2007-10-10 13:38:09 -05:00
Jelmer Vernooij
5d2c2edc19 r10207: Add some const
(This used to be commit b1ad340b47)
2007-10-10 13:38:08 -05:00
Andrew Tridgell
45f760973d r10200: added a composite_trigger_done() call that allows a composite function
to cause an event to happen immediately. This allows metzes patch for
recognising IPs in resolve_name() to work, and also allows us to
remove some of the other code where we currently do specific checks
for is_ipaddress().
(This used to be commit 9cc000d868)
2007-10-10 13:38:08 -05:00
James Peach
3818f7793b r10161: Check for alloca.h to prevent incorrect local declaration.
(This used to be commit efc70d2672)
2007-10-10 13:38:04 -05:00
Jelmer Vernooij
8b5a953725 r10111: Make pidl by default assume the input file is an IDL file rather
then a .pidl file.
(This used to be commit d8a31d3048)
2007-10-10 13:38:00 -05:00
Tim Potter
289127b026 r10104: Fix code before declaration.
(This used to be commit 05c0201815)
2007-10-10 13:37:59 -05:00
Rafal Szczesniak
a769fa3467 r10089: Fix a typo breaking the Makefile generator and therefore - the build.
rafal
(This used to be commit d6936185d5)
2007-10-10 13:37:52 -05:00
Jelmer Vernooij
c070fd6222 r10074: Pass CPP to pidl via environment variables rather then config.pm. This fixes the
standalone pidl build (as used for ethereal)
(This used to be commit 9c9ebd2214)
2007-10-10 13:37:50 -05:00
Jelmer Vernooij
db400b4a58 r10052: Add 'print' command
(This used to be commit d99c9e2817)
2007-10-10 13:36:33 -05:00
Jelmer Vernooij
e3a1ee4788 r10043: Only recompile subsystems that actually need recompilation
(This used to be commit de98309797)
2007-10-10 13:36:32 -05:00
Jelmer Vernooij
3ca370b3db r10038: Update instructions on using gcov with ldb
(This used to be commit 8d246fac49)
2007-10-10 13:36:32 -05:00
Jelmer Vernooij
a3e0e69196 r10030: Add hierarchical memory allocation to TDR's pull functions
(This used to be commit 0e358de93a)
2007-10-10 13:36:31 -05:00
Jelmer Vernooij
a487b6c19c r10028: More registry fixes.
Remove save_hive() function (there is a flush_key function already).
Fixes for the allocation mechanism in the REGF backend
(This used to be commit 499d03bc90)
2007-10-10 13:36:31 -05:00
Jelmer Vernooij
f4910eff48 r10027: Use blob length for keeping track of buffer length, add TODO
(This used to be commit a924bec84b)
2007-10-10 13:36:31 -05:00
Jelmer Vernooij
ff7342a4ad r10026: Move registry header file to lib/registry
Add support for showing security descriptor in regshell
Add support for saving files in NT4 registry backend
(This used to be commit 47cecd4726)
2007-10-10 13:36:30 -05:00
Jelmer Vernooij
4729c3db26 r10025: Add some utility functions for storing/loading tdr encoded data
(This used to be commit bcd433bfc1)
2007-10-10 13:36:30 -05:00
Jelmer Vernooij
23e6e07b28 r10020: Support for malloc / realloc / free in HBIN blocks
Initial support for adding keys (still broken though)
(This used to be commit ff8d3a27c1)
2007-10-10 13:36:30 -05:00
Jelmer Vernooij
16788f27a8 r10019: Only return NT_STATUS_NO_MEMORY if the alloc failed..
(This used to be commit ea92959209)
2007-10-10 13:36:29 -05:00
Jelmer Vernooij
eac7fe4ebc r10016: Support reading security descriptors on keys.
(This used to be commit b349e902c7)
2007-10-10 13:36:29 -05:00
Jelmer Vernooij
40cbd4625a r10015: Change the NT4 registry backend to use the IDL-generate parse functions.
(This used to be commit 0ad46ef804)
2007-10-10 13:36:29 -05:00
Jelmer Vernooij
6a2c9e729f r10013: Support zero-sized strings.
(This used to be commit cf3be71c33)
2007-10-10 13:36:29 -05:00
Jelmer Vernooij
102a6ec95b r10009: Fix bug in uint8 parsing functions
(This used to be commit abb0db1218)
2007-10-10 13:36:28 -05:00
Jelmer Vernooij
02b3abec25 r10007: Merge data_blk and data_len member of registry_value into a DATA_BLOB.
Fix handling of REG_DWORD in the LDB backend.
Fix a couple of warnings
(This used to be commit 709fdc7ebf)
2007-10-10 13:36:28 -05:00
Jelmer Vernooij
201fd3bd72 r9995: Add file describing the REGF file format in IDL.
(used in reg_backend_nt4.c rewrite)
(This used to be commit 5e1a16eda2)
2007-10-10 13:36:27 -05:00
Tim Potter
7f66d5ce25 r9993: Gcc is fussy about the lack of parentheses around assignment statements.
(This used to be commit 908ba89259)
2007-10-10 13:36:27 -05:00
Jelmer Vernooij
52d995feb0 r9959: Fix bug where data offset was incorrect after parsing element with
[charset]
(This used to be commit b17478229e)
2007-10-10 13:36:25 -05:00
Jelmer Vernooij
c70405cd72 r9957: Switch to using DATA_BLOBs internally in TDR
(This used to be commit 351149d160)
2007-10-10 13:36:25 -05:00
Jelmer Vernooij
fc411bed80 r9949: Portability fixes for mingw32
(This used to be commit 994093b08e)
2007-10-10 13:36:24 -05:00
Jelmer Vernooij
4462869db2 r9948: Be a bit less verbose
(This used to be commit 071dba2d0a)
2007-10-10 13:36:24 -05:00
Andrew Bartlett
9319cace3b r9940: When guessing, don't make DEBUG(1,... errors.
Andrew Bartlett
(This used to be commit 664736e73d)
2007-10-10 13:36:23 -05:00
Andrew Bartlett
95fcf031b0 r9929: Fix indentation
Andrew Bartlett
(This used to be commit d6f57ec921)
2007-10-10 13:36:23 -05:00
Andrew Bartlett
ca87549168 r9928: ncName is a DN, and needs to use DN matching rules.
Andrew Bartlett
(This used to be commit b89e7a7fcd)
2007-10-10 13:36:22 -05:00