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

2485 Commits

Author SHA1 Message Date
Stefan Metzmacher
d7dcbcc42d lib/param: avoid talloc_reference() in copy_service()
The memory reduction compared of talloc_reference() over talloc_strdup()
is typically very low. As the strings are typically short compared
to the talloc header overhead.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan 11 16:13:50 CET 2012 on sn-devel-104
2012-01-11 16:13:50 +01:00
Stefan Metzmacher
91ffcdd5a9 talloc/testsuite: fix compiler warnings
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 10 13:31:33 CET 2012 on sn-devel-104
2012-01-10 13:31:33 +01:00
Ira Cooper
eff69aa0f9 Add "repack" command to tdbtool.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jan  7 02:18:41 CET 2012 on sn-devel-104
2012-01-07 02:18:40 +01:00
Ira Cooper
7b42ceb414 Fix compile when TDB_TRACE is enabled.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan  6 04:16:41 CET 2012 on sn-devel-104
2012-01-06 04:16:41 +01:00
Matthieu Patou
f05edc0ecb pyldb: raise an exception if we can't add the attribute 2012-01-03 06:47:10 +01:00
Matthias Dieter Wallnöfer
9ab7299b32 ldb:ldb/common/ldb_controls.c - reference "err_string" variable correctly
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-02 19:10:04 +01:00
Volker Lendecke
ad3c0e03e2 talloc: Slightly simplify talloc_unlink
Nested if's are hard to understand to me.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jan  2 19:07:23 CET 2012 on sn-devel-104
2012-01-02 19:07:23 +01:00
Volker Lendecke
0bee8719b2 talloc: Fix a typo 2012-01-02 14:59:59 +01:00
Andrew Bartlett
4b7b26e3c0 gensec: Allow an alternate set of modules to be specified
This will allow s3 to specify modules to use as a list, rather than
needing to start the individual module with gensec_start_mech_by_ops()

Andrew Bartlett
2011-12-28 22:39:19 +11:00
Volker Lendecke
1364eb7bd7 lib/charset: Remove an unused variable
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Dec 25 15:07:56 CET 2011 on sn-devel-104
2011-12-25 15:07:55 +01:00
Volker Lendecke
b2eaa9afd3 s3: Fix fn signatures in charset_macosx.c 2011-12-25 13:31:58 +01:00
Volker Lendecke
1eefd6bafb tdb: Use tdb_parse_record in tdb_update_hash
This avoids a tdb_fetch, thus a malloc/memcpy/free in the tdb_store path
2011-12-25 13:31:58 +01:00
Volker Lendecke
c1e9537ed0 tdb: Use tdb_parse_record in tdb_update_hash
This avoids a tdb_fetch, thus a malloc/memcpy/free in the tdb_store path
2011-12-25 13:31:58 +01:00
Volker Lendecke
c3a4057a21 libreplace: Don't check for standards.h on darwin (Lion)
standards.h on Lion holds a #warning that standards.h will be removed. This is
annoying during the build.
2011-12-25 13:31:58 +01:00
Matthias Dieter Wallnöfer
eddf0d0fe2 ldb:ldb_tdb.c - fix warnings in "ltdb_init_rootdse"
We should ignore the LDB result.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-23 10:36:07 +01:00
Amitay Isaacs
20e425f7a8 ldif-handler: Fix the case for attribute dnsproperty 2011-12-23 16:18:25 +11:00
Stefan Metzmacher
d855e77c69 lib/param: add support for "SMB2_24" in smb.conf options
metze
2011-12-22 15:58:46 +01:00
Andrew Tridgell
4ecac6067f runcmd: use set_close_on_exec()
this prevents a fd leak to child processes

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 22 14:00:06 CET 2011 on sn-devel-104
2011-12-22 14:00:06 +01:00
Andrew Tridgell
81c564798c runcmd: use a pipe for stdin to child processes
this allows child processes to detect the exit of the parent by
looking for EOF on stdin
2011-12-22 12:26:08 +01:00
Amitay Isaacs
8303d163cf param: domain_logons and domain_master are of type enum_bool_auto
These parameters should be defined as int and not bool. This fixes
the test failures on big endian machines.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Dec 22 10:37:42 CET 2011 on sn-devel-104
2011-12-22 10:37:42 +01:00
Amitay Isaacs
cd772e9bd8 param: Fix the data type for bAvailable
This causes the copy_service() to not copy bAvailable boolean on
big endian machines causing tests to fail.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Dec 22 05:30:49 CET 2011 on sn-devel-104
2011-12-22 05:30:49 +01:00
Rusty Russell
5767224b7f tdb: don't free old recovery area when expanding if already at EOF.
We allocate a new recovery area by expanding the file.  But if the
recovery area is already at the end of file (as shown in at least one
client case), we can simply expand the record, rather than freeing it
and creating a new one.

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

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Dec 21 06:25:40 CET 2011 on sn-devel-104
2011-12-21 06:25:40 +01:00
Rusty Russell
3a2a755e33 tdb: use same expansion factor logic when expanding for new recovery area.
If we're expanding because the current recovery area is too small, we
expand only the amount we need.  This can quickly lead to exponential
growth when we have a slowly-expanding record (hence a
slowly-expanding transaction size).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-12-21 14:17:16 +10:30
Volker Lendecke
bfc74811d0 tdb2: Avoid a malloc/memcpy in _tdb1_store
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Dec 19 16:53:40 CET 2011 on sn-devel-104
2011-12-19 16:53:39 +01:00
Volker Lendecke
664add1775 tdb: Avoid a malloc/memcpy in _tdb_store 2011-12-19 15:18:08 +01:00
Rusty Russell
b64494535d tdb: be more careful on 4G files.
I came across a tdb which had wrapped to 4G + 4K, and the contents had been
destroyed by processes which thought it only 4k long.  Fix this by checking
on open, and making tdb_oob() check for wrap itself.

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

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec 19 07:52:01 CET 2011 on sn-devel-104
2011-12-19 07:52:01 +01:00
Volker Lendecke
79fe4bbf73 s3: Fix the clustering build
ctdb_private.h already defines set_close_on_exec.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Dec 17 18:41:39 CET 2011 on sn-devel-104
2011-12-17 18:41:39 +01:00
Kai Blin
b1fdf4065e s4 dns: Allow updates based on smb.conf setting
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Dec 17 04:19:40 CET 2011 on sn-devel-104
2011-12-17 04:19:40 +01:00
Volker Lendecke
bcd3db6264 Add support for TCP_DEFER_ACCEPT
"man tcp" on Linux says:

TCP_DEFER_ACCEPT

Allows a listener to be awakened only when data arrives on the  socket.  Takes
an integer value (seconds), this can bound the maximum number of attempts TCP
will make to complete the connection. This option should not be used in code
intended to be portable.

This might reduce the 139/445 forks a bit on high-load servers
2011-12-16 07:34:48 +01:00
Andrew Bartlett
d62de8d83e lib/param: Set s4 "host msdfs = true" by default
This matches the s3 loadparm, and makes this feature available
by default for our users in a DC environment.  (This is needed
for the correct operation of GPOs).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Dec 16 01:08:34 CET 2011 on sn-devel-104
2011-12-16 01:08:34 +01:00
Andrew Tridgell
77a551d613 loadparm: fixed service list handling
when you have:

  server services = +smb -s3fs

and 'smb' is already in the list, then this should not be an
error. This ensures that a config that specifically sets the services
it wants doesn't generate an error if the service list being set
happens to be the default
2011-12-15 23:36:22 +01:00
Andrew Tridgell
d581c9d284 genrand: use set_close_on_exec()
this prevents a fd leak to child processes
2011-12-15 23:36:22 +01:00
Andrew Tridgell
3b56f64923 lib/util: added set_close_on_exec()
this was already in tevent_util.c, but library layering prevented us
from using it in some other libraries
2011-12-15 23:36:22 +01:00
Martin Schwenke
0429471fe4 lib/ccan: Fix some typos in libccan.m4
Signed-off-by: Martin Schwenke <martin@meltin.net>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Dec 15 07:40:33 CET 2011 on sn-devel-104
2011-12-15 07:40:33 +01:00
Rusty Russell
fef4f5193b lib/ccan: fix m4 tests for builtin_expect and compound literals.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-12-15 15:34:55 +10:30
Amitay Isaacs
a4ab152a05 tdb2: Fix python documentation for tdb.Tdb object 2011-12-14 15:57:32 +11:00
Amitay Isaacs
20789bfdde tdb: Fix python documentation for tdb module 2011-12-13 00:55:32 +11:00
Volker Lendecke
092f1b9744 tevent: tevent_schedule_immediate never fails
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec  9 16:47:23 CET 2011 on sn-devel-104
2011-12-09 16:47:23 +01:00
Jelmer Vernooij
eae3e6230f Add pep8. 2011-12-08 22:12:00 +01:00
Jelmer Vernooij
624a78d9f8 testtools: Update to new upstream revision. 2011-12-08 22:12:00 +01:00
Jelmer Vernooij
03e5f581ae pyldb: Add more docstrings.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 22:08:49 CET 2011 on sn-devel-104
2011-12-08 22:08:49 +01:00
Dave Craft
a3613b0533 Add samba_kcc load parameter
Configures parameter to enumerate name of python KCC
topology generator for subsequent use by samba_runcmd_send()
invocation from kcc task

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-12-08 11:48:17 +11:00
Jelmer Vernooij
fbfd155a32 Add version attribute for pytevent.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Dec  7 15:07:49 CET 2011 on sn-devel-104
2011-12-07 15:07:48 +01:00
Jelmer Vernooij
817f7529d3 tevent: Install python tevent modules.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Dec  6 23:13:37 CET 2011 on sn-devel-104
2011-12-06 23:13:37 +01:00
Jelmer Vernooij
5d1922739e Add stub python module for tevent. 2011-12-06 21:03:21 +01:00
Michael Adam
8f7f244200 lib/util/util_tdb: adhere to coding style for tdb_data_is_empty()
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  6 15:22:08 CET 2011 on sn-devel-104
2011-12-06 15:22:08 +01:00
Rusty Russell
372dd3b7d0 tdb2: tlist: remove type arg from tlist_top(), tlist_tail()
With the type canary, it's unnecessary.  Though the implementation is
a bit more awkward since they longer map directly through to list_top/tail.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit a6b5111fe6948e51114c33aa34785c9fd0d403e6)

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec  5 12:13:08 CET 2011 on sn-devel-104
2011-12-05 12:13:08 +01:00
Rusty Russell
c6133b4755 tdb2: display capability information in tdb_summary()
This means we know they're there in future, and what restrictions they
carry.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b3ca95351517e76b635347b39382b059a66f8388)
2011-12-05 17:04:30 +10:30
Rusty Russell
80c3ba8123 tdb2: add a capability list from the header.
This allows even more extensibility in future: in particular, the top
bits of each capability tell us what to do if we don't understand it:
fail the open, fail to open for write, or don't try to check the
format.

tdb_check needs to understand the capability list so it can know to
skip over it: each element in the list is prefixed with the type tag
and the length.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 35f198de1851a7d57064546b7ced677b6fabee27)
2011-12-05 17:04:30 +10:30
Rusty Russell
3f99fc16a0 tdb2: provide tdb_layout_write() rather than implying it by new_tdb_layout arg.
Neater API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 79d603a5f73dfbb655d8d08f67eecb5f2da542d5)
2011-12-05 17:04:30 +10:30