rusty/samba.git
12 years agos3: Make name_resolve_bcast do parallel lookups to all interfaces
Volker Lendecke [Mon, 25 Apr 2011 16:47:42 +0000 (18:47 +0200)]
s3: Make name_resolve_bcast do parallel lookups to all interfaces

12 years agos3: Add name_queries_send/recv
Volker Lendecke [Mon, 25 Apr 2011 16:30:35 +0000 (18:30 +0200)]
s3: Add name_queries_send/recv

12 years agos3: Fix a valgrind error
Volker Lendecke [Sun, 5 Jun 2011 11:56:39 +0000 (13:56 +0200)]
s3: Fix a valgrind error

For me this fixes

==1950== Invalid read of size 4
==1950==    at 0x81EBED5: GUID_equal (uuid.c:239)
==1950==    by 0x81E51AB: ndr_syntax_id_equal (ndr_misc.c:35)
==1950==    by 0x82EB0D1: get_iface_from_syntax (rpc_common.c:160)
==1950==    by 0x82EB25E: get_pipe_name_from_syntax (rpc_common.c:179)
==1950==    by 0x8509E4F: close_policy_by_pipe (rpc_handles.c:322)
==1950==    by 0x8507941: close_internal_rpc_pipe_hnd (rpc_ncacn_np.c:109)
==1950==    by 0x468270: _talloc_free_internal (talloc.c:826)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x80E6487: sam_trusted_domains (winbindd_samr.c:406)
==1950==  Address 0x687ea4 is 20 bytes inside a block of size 40 free'd
==1950==    at 0x58CDC: free (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so)
==1950==    by 0x8507812: free_pipe_rpc_context_internal (rpc_ncacn_np.c:74)
==1950==    by 0x8507936: close_internal_rpc_pipe_hnd (rpc_ncacn_np.c:106)
==1950==    by 0x468270: _talloc_free_internal (talloc.c:826)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x467EE0: _talloc_free_internal (talloc.c:1268)
==1950==    by 0x80E6487: sam_trusted_domains (winbindd_samr.c:406)
==1950==    by 0x80C2F85: trusted_domains (winbindd_cache.c:2820)
==1950==    by 0x80D5188: winbindd_dual_list_trusted_domains (winbindd_misc.c:162)
==1950==    by 0x80E987F: wb_child_request_trigger (winbindd_dual.c:437)
==1950==

Andreas, Guenther, please check!

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun  5 13:19:39 CEST 2011 on sn-devel-104

12 years agos3:winbind: Convert WINBINDD_WINS_BYIP to the async API
Volker Lendecke [Sun, 5 Jun 2011 09:30:43 +0000 (11:30 +0200)]
s3:winbind: Convert WINBINDD_WINS_BYIP to the async API

12 years agoMake samba4.drs.fsmo.python knownfail
Volker Lendecke [Sat, 4 Jun 2011 12:10:46 +0000 (14:10 +0200)]
Make samba4.drs.fsmo.python knownfail

This frequently blocks autobuild for me, this time with

Testing for rid role transfer from localdc.samba.example.com to localvampiredc.samba.example.com
ERROR: Failed to initiate transfer of 'rid' role: LDAP error 52 LDAP_UNAVAILABLE -  <Failed FSMO transfer: NT_STATUS_IO_TIMEOUT> <>
UNEXPECTED(failure): samba4.drs.fsmo.python(vampire_dc).fsmo.DrsFsmoTestCase.test_RIDMasterTransfer
REASON: _StringException: _StringException: Content-Type: text/x-traceback;charset=utf8,language=python
traceback
36E
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 128, in _run_user
    return fn(*args)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 368, in _run_test_method
    testMethod()
  File "/memdisk/vlendec/a/b5798/samba4/source4/torture/drs/python/fsmo.py", line 125, in test_RIDMasterTransfer
    self._role_transfer(role="rid", role_dn=self.rid_dn)
  File "/memdisk/vlendec/a/b5798/samba4/source4/torture/drs/python/fsmo.py", line 97, in _role_transfer
    self._net_fsmo_role_transfer(DC=self.dnsname_dc2, role=role)
  File "/memdisk/vlendec/a/b5798/samba4/source4/torture/drs/python/fsmo.py", line 68, in _net_fsmo_role_transfer
    self.assertEquals(ret, 0, "Transferring role %s to %s has failed!" % (role, DC))
AssertionError: Transferring role rid to localvampiredc.samba.example.com has failed!
0

NT_STATUS_IO_TIMEOUT -- does that mean that sn.samba.org is not powerful enough
to run this test successfully?

Volker

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Jun  4 15:24:20 CEST 2011 on sn-devel-104

12 years agos3: Fix the build on FreeBSD 8
Volker Lendecke [Sat, 4 Jun 2011 12:18:31 +0000 (14:18 +0200)]
s3: Fix the build on FreeBSD 8

This is probably not the last word on gss_mech_krb5, but for now it fixes
the build on FreeBSD

13 years agoAdd the same fix to the S3 event backend as the previous commit added to the tevent...
Jeremy Allison [Fri, 3 Jun 2011 19:55:19 +0000 (12:55 -0700)]
Add the same fix to the S3 event backend as the previous commit added to the tevent poll backend.

Metze please check !

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jun  4 00:27:37 CEST 2011 on sn-devel-104

13 years agoFix the poll() backend to correctly respond to POLLHUP|POLLERR returns on a fd select...
Jeremy Allison [Fri, 3 Jun 2011 19:31:11 +0000 (12:31 -0700)]
Fix the poll() backend to correctly respond to POLLHUP|POLLERR returns on a fd selected for TEVENT_FD_WRITE only.

Don't trigger the write handler and remove the POLLOUT flag for this fd. Report errors on TEVENT_FD_READ requests only.
Metze please check !

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jun  3 22:53:52 CEST 2011 on sn-devel-104

13 years agoIn samba_version.m4 the test to get the version now returns several
Herb Lewis [Thu, 2 Jun 2011 17:15:18 +0000 (10:15 -0700)]
In samba_version.m4 the test to get the version now returns several
lines instead of the one we really wanted which causes some spurious
output when configure tries to print the samba version when it starts
running. This is only a cosmetic problem but still looks ugly.

Signed-off-by: Jeremy Allison <jra@samba.org>
13 years agoFix warning messages on Freebsd 4.6.2.
Herb Lewis [Thu, 2 Jun 2011 17:10:39 +0000 (10:10 -0700)]
Fix warning messages on Freebsd 4.6.2.
Signed-off-by: Jeremy Allison <jra@samba.org>
13 years agolib/tdb/python/tests/simple.py: don't assume TDB ordering.
Rusty Russell [Thu, 2 Jun 2011 04:49:38 +0000 (14:19 +0930)]
lib/tdb/python/tests/simple.py: don't assume TDB ordering.

TDB2 can break this assumption.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Jun  2 12:07:40 CEST 2011 on sn-devel-104

13 years agosamba3sam.py: don't assume order of ldb results.
Rusty Russell [Thu, 2 Jun 2011 00:52:06 +0000 (10:22 +0930)]
samba3sam.py: don't assume order of ldb results.

Switching to tdb2 breaks this test horribly, because it relied on the
order of TDB1 traversal.  Fix it to sort te results (by db), then
check them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 years agoRemove another PATH_MAX.
Jeremy Allison [Wed, 1 Jun 2011 23:40:05 +0000 (16:40 -0700)]
Remove another PATH_MAX.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jun  2 02:51:06 CEST 2011 on sn-devel-104

13 years agoRemove a PATH_MAX.
Jeremy Allison [Wed, 1 Jun 2011 23:07:24 +0000 (16:07 -0700)]
Remove a PATH_MAX.

13 years agoFix const warnings.
Jeremy Allison [Wed, 1 Jun 2011 21:51:55 +0000 (14:51 -0700)]
Fix const warnings.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jun  2 01:02:53 CEST 2011 on sn-devel-104

13 years agoFix const warning.
Jeremy Allison [Wed, 1 Jun 2011 21:51:21 +0000 (14:51 -0700)]
Fix const warning.

13 years agoFix const warning.
Jeremy Allison [Wed, 1 Jun 2011 21:50:49 +0000 (14:50 -0700)]
Fix const warning.

13 years agorelease_ip() is only used with CLUSTER_SUPPORT.
Jeremy Allison [Wed, 1 Jun 2011 21:49:43 +0000 (14:49 -0700)]
release_ip() is only used with CLUSTER_SUPPORT.

13 years agoFix type mixing warnings.
Jeremy Allison [Wed, 1 Jun 2011 21:49:03 +0000 (14:49 -0700)]
Fix type mixing warnings.

13 years agoFix bug where format arguments were reversed. Please compile with -Wall !
Jeremy Allison [Wed, 1 Jun 2011 21:45:59 +0000 (14:45 -0700)]
Fix bug where format arguments were reversed. Please compile with -Wall !

13 years agoMove fd_close on error path to be identical to all other error paths.
Jeremy Allison [Wed, 1 Jun 2011 19:17:43 +0000 (12:17 -0700)]
Move fd_close on error path to be identical to all other error paths.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jun  1 22:30:03 CEST 2011 on sn-devel-104

13 years agoTALLOC_FREE already checks for null.
Jeremy Allison [Wed, 1 Jun 2011 19:12:26 +0000 (12:12 -0700)]
TALLOC_FREE already checks for null.

13 years agoFix bug #8175 - smbd deadlock.
Jeremy Allison [Wed, 1 Jun 2011 19:11:53 +0000 (12:11 -0700)]
Fix bug #8175 - smbd deadlock.

Force the open operation (which is the expensive one anyway) to
acquire and release locks in a way compatible with the more common
do_lock check.

Jeremy.

13 years agos3:net-man: registry enumerate_recursive
Gregor Beck [Tue, 31 May 2011 16:26:12 +0000 (18:26 +0200)]
s3:net-man: registry enumerate_recursive

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jun  1 17:16:05 CEST 2011 on sn-devel-104

13 years agos3:net-man: registry deletekey & deletekey_recursive
Gregor Beck [Tue, 31 May 2011 16:25:53 +0000 (18:25 +0200)]
s3:net-man: registry deletekey & deletekey_recursive

Signed-off-by: Michael Adam <obnox@samba.org>
13 years agos3:net-man: missing dot
Gregor Beck [Tue, 31 May 2011 16:15:38 +0000 (18:15 +0200)]
s3:net-man: missing dot

Signed-off-by: Michael Adam <obnox@samba.org>
13 years agoRevert "s3: Mark sockets in error state writable"
Volker Lendecke [Wed, 1 Jun 2011 11:46:14 +0000 (13:46 +0200)]
Revert "s3: Mark sockets in error state writable"

This reverts commit 5f6f71956460d6840c1433b59e20555268b622ac.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jun  1 14:56:25 CEST 2011 on sn-devel-104

13 years agos3-epmapper: Register ports on IPv4 too.
Andreas Schneider [Wed, 25 May 2011 15:37:51 +0000 (17:37 +0200)]
s3-epmapper: Register ports on IPv4 too.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jun  1 13:14:53 CEST 2011 on sn-devel-104

13 years agos3-rpc_server: Remove unused variable pipes_open.
Andreas Schneider [Tue, 31 May 2011 09:35:39 +0000 (11:35 +0200)]
s3-rpc_server: Remove unused variable pipes_open.

13 years agos3-rpc_server: Remove syntax from pipes_struct.
Andreas Schneider [Tue, 31 May 2011 11:37:11 +0000 (13:37 +0200)]
s3-rpc_server: Remove syntax from pipes_struct.

13 years agos3-rpc_server: Fixed debug messages of srv_pipe_hnd.
Andreas Schneider [Tue, 31 May 2011 11:42:52 +0000 (13:42 +0200)]
s3-rpc_server: Fixed debug messages of srv_pipe_hnd.

13 years agos3-rpc_server: Fixed debug messages for rpc_handles.
Andreas Schneider [Tue, 31 May 2011 11:32:22 +0000 (13:32 +0200)]
s3-rpc_server: Fixed debug messages for rpc_handles.

13 years agos3-rpc_server: Fix debug messages.
Andreas Schneider [Mon, 30 May 2011 09:27:07 +0000 (11:27 +0200)]
s3-rpc_server: Fix debug messages.

13 years agos3-rpc_server: Don't segfault if there are not handles to free.
Andreas Schneider [Wed, 25 May 2011 15:26:28 +0000 (17:26 +0200)]
s3-rpc_server: Don't segfault if there are not handles to free.

13 years agos3-rpc_server: Remove guessing of the syntax id.
Andreas Schneider [Wed, 25 May 2011 15:26:01 +0000 (17:26 +0200)]
s3-rpc_server: Remove guessing of the syntax id.

This is only a wild guess. We don't know to which rpc service the client
wants to talk until we read the the rpc bind packet.

13 years agos3-rpc_server: Use the correct syntax id for debugging.
Andreas Schneider [Mon, 30 May 2011 09:11:48 +0000 (11:11 +0200)]
s3-rpc_server: Use the correct syntax id for debugging.

13 years agos3-rpc_server: Migrate init_pipe_handles() to new syntax.
Andreas Schneider [Tue, 31 May 2011 08:53:55 +0000 (10:53 +0200)]
s3-rpc_server: Migrate init_pipe_handles() to new syntax.

13 years agos3-rpc_server: Use the context syntax id in api_pipe_request().
Andreas Schneider [Mon, 30 May 2011 09:02:47 +0000 (11:02 +0200)]
s3-rpc_server: Use the context syntax id in api_pipe_request().

13 years agos3-rpc_server: Use the correct syntax id in api_pipe_bind_req().
Andreas Schneider [Wed, 25 May 2011 14:58:18 +0000 (16:58 +0200)]
s3-rpc_server: Use the correct syntax id in api_pipe_bind_req().

13 years agos3-rpc_server: Use the correct context syntax.
Andreas Schneider [Tue, 31 May 2011 11:33:05 +0000 (13:33 +0200)]
s3-rpc_server: Use the correct context syntax.

13 years agos3-rpc_server: Move the context functions to own file.
Andreas Schneider [Tue, 31 May 2011 08:28:39 +0000 (10:28 +0200)]
s3-rpc_server: Move the context functions to own file.

13 years agos3-rpc_server: Store the ndr syntax id in the pipe context.
Andreas Schneider [Wed, 25 May 2011 14:03:43 +0000 (16:03 +0200)]
s3-rpc_server: Store the ndr syntax id in the pipe context.

The client tell us in the rpc bind to which rpc service it wants to
connect. We did set the p->syntax earlier by guessing to which pipe name
it connects, but we don't know to which rpc service it wants to bind
until we read the first packet.

13 years agos3-rpc_server: Added syntax id to pipe_rpc_fns struct.
Andreas Schneider [Mon, 30 May 2011 08:40:37 +0000 (10:40 +0200)]
s3-rpc_server: Added syntax id to pipe_rpc_fns struct.

13 years agolib/tevent/tevent.h: minor documentation fix.
Rusty Russell [Wed, 1 Jun 2011 02:50:11 +0000 (12:20 +0930)]
lib/tevent/tevent.h: minor documentation fix.

The usecs arguments are (of course) microseconds, not milliseconds.
This was added by Andreas Schneider in 6c1bcdc2 (tevent: Document the
tevent helper functions.).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Jun  1 11:47:38 CEST 2011 on sn-devel-104

13 years agolibcli/cldap/cldap.c: don't hand huge values to tevent_timeval_add usecs
Rusty Russell [Wed, 1 Jun 2011 02:50:08 +0000 (12:20 +0930)]
libcli/cldap/cldap.c: don't hand huge values to tevent_timeval_add usecs

state->request.delay is two million here, resulting in an invalid timeval.
Since tevent doesn't have a convenient wrapper to add arbitrary usecs,
do the arithmetic here (it's the sole caller of this function).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 years agolib/util/time.c: timeval_current_ofs_usec
Rusty Russell [Wed, 1 Jun 2011 01:54:51 +0000 (11:24 +0930)]
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>
13 years agolib/util/time.c: timeval_current_ofs_msec
Rusty Russell [Wed, 1 Jun 2011 01:51:15 +0000 (11:21 +0930)]
lib/util/time.c: timeval_current_ofs_msec

Several places want "milliseconds from current time", and several were
simply doing "msec * 1000" which can (and does in one place) result in
a usec value over 1 a million.

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

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 years agosamba-tool: update tests for new 'user enable' syntax
Andrew Tridgell [Wed, 1 Jun 2011 07:22:15 +0000 (17:22 +1000)]
samba-tool: update tests for new 'user enable' syntax

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jun  1 10:37:50 CEST 2011 on sn-devel-104

13 years agosamba-tool: improved error handling in user setexpiry
Andrew Tridgell [Wed, 1 Jun 2011 04:46:04 +0000 (14:46 +1000)]
samba-tool: improved error handling in user setexpiry

13 years agosamba-tool: improved user enable error handling
Andrew Tridgell [Wed, 1 Jun 2011 04:41:51 +0000 (14:41 +1000)]
samba-tool: improved user enable error handling

13 years agos4:samba-tool: Move samba-tool setexpiry to samba-tool user setexpiry <user>
Theresa Halloran [Thu, 19 May 2011 20:24:00 +0000 (16:24 -0400)]
s4:samba-tool: Move samba-tool setexpiry to samba-tool user setexpiry <user>

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos4/samba-tool: Move samba-tool enableaccount to samba-tool user enable command.
Theresa Halloran [Thu, 19 May 2011 20:17:07 +0000 (16:17 -0400)]
s4/samba-tool: Move samba-tool enableaccount to samba-tool user enable command.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agobuild: fixed a problem with installing scripts in the build tree
Andrew Tridgell [Wed, 1 Jun 2011 01:43:52 +0000 (11:43 +1000)]
build: fixed a problem with installing scripts in the build tree

the SAMBA_SCRIPT() function was not always triggering correctly. The
base problem was that we were using a target outside the build
tree. This implements a simpler solution where we just create the
links directly in SAMBA_SCRIPT() rather than creating a waf task

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jun  1 06:50:04 CEST 2011 on sn-devel-104

13 years agos3-param Make lp_ncalrpc_dir() const
Andrew Bartlett [Wed, 1 Jun 2011 02:18:00 +0000 (12:18 +1000)]
s3-param Make lp_ncalrpc_dir() const

This disables % substitutions in the 'ncalrpc dir' parameter.  This is
used as a communication point between multiple parts of the codebase,
and needs to be internally consistent between all the Samba tasks.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  1 05:30:53 CEST 2011 on sn-devel-104

13 years agos3-param Make lp_dedicated_keytab_file() const
Andrew Bartlett [Wed, 1 Jun 2011 02:15:48 +0000 (12:15 +1000)]
s3-param Make lp_dedicated_keytab_file() const

This disables % substitutions in the 'dedicated keytab file' parameter.

Andrew Bartlett

13 years agos3-param Make lp_realm() const
Andrew Bartlett [Wed, 1 Jun 2011 01:55:59 +0000 (11:55 +1000)]
s3-param Make lp_realm() const

This disables % substitutions in the 'realm' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett

13 years agos3-param Make lp_name_resolv_order() const
Andrew Bartlett [Wed, 1 Jun 2011 01:54:52 +0000 (11:54 +1000)]
s3-param Make lp_name_resolv_order() const

This disables % substitutions in the 'name resolv order' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett

13 years agos3-param Make lp_utmpdir() and lp_wtmpdir const
Andrew Bartlett [Wed, 1 Jun 2011 01:53:21 +0000 (11:53 +1000)]
s3-param Make lp_utmpdir() and lp_wtmpdir const

This disables % substitutions in the 'utmp dir' and 'wtmp dir'
parameters.  These are system paths, and need to be consistent between
all the Samba tasks.

Andrew Bartlett

13 years agos3-param Make lp_piddir() const
Andrew Bartlett [Wed, 1 Jun 2011 01:52:07 +0000 (11:52 +1000)]
s3-param Make lp_piddir() const

This disables % substitutions in the 'pid dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett

13 years agos3-param Make lp_cachedir() const
Andrew Bartlett [Wed, 1 Jun 2011 01:51:12 +0000 (11:51 +1000)]
s3-param Make lp_cachedir() const

This disables % substitutions in the 'cache dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett

13 years agos3-param Make lp_statedir() const
Andrew Bartlett [Wed, 1 Jun 2011 01:48:38 +0000 (11:48 +1000)]
s3-param Make lp_statedir() const

This disables % substitutions in the 'state dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett

13 years agos3-param Make lp_lockdir() const
Andrew Bartlett [Wed, 1 Jun 2011 01:45:44 +0000 (11:45 +1000)]
s3-param Make lp_lockdir() const

This disables % substitutions in the 'lock dir' parameter.  This is
used all over the codebase, and needs to be internally consistent
for the life of the process, as they determine the location of
our locking databases.

Andrew Bartlett

13 years agos3-param Make lp_smb_passwd_file() and lp_private_dir() const
Andrew Bartlett [Wed, 1 Jun 2011 01:19:21 +0000 (11:19 +1000)]
s3-param Make lp_smb_passwd_file() and lp_private_dir() const

This disables % substitutions in the 'smb passwd file' and 'private
dir' parameters.  These are used all over the codebase, and need to be
internally consistent for the life of the process, as they determine
the location of secrets.tdb, as well as the passdb databases.

Andrew Bartlett

13 years agos3-param Make lp_smb_ports() const
Andrew Bartlett [Wed, 1 Jun 2011 01:18:09 +0000 (11:18 +1000)]
s3-param Make lp_smb_ports() const

It makes no sense to have a % substiution in the 'smb ports' parameter.

Andrew Bartlett

13 years agos3-param Make charset parameters const
Andrew Bartlett [Wed, 1 Jun 2011 01:13:30 +0000 (11:13 +1000)]
s3-param Make charset parameters const

This removes the dangerous ability for these parameters to change
based on % substitutions.

Andrew Bartlett

13 years agos3-param Make lp_passwordserver() const.
Andrew Bartlett [Wed, 1 Jun 2011 01:10:47 +0000 (11:10 +1000)]
s3-param Make lp_passwordserver() const.

This means that it no longer takes % substituations, and so the documentation for this behaviour is removed from the smb.conf manpage.  (This mode is only useful in security=server, which is already marked as deprecated in 3.6).

Andrew Bartlett

13 years agos3-param prepare for some lp_ functions to return const
Andrew Bartlett [Wed, 1 Jun 2011 01:09:39 +0000 (11:09 +1000)]
s3-param prepare for some lp_ functions to return const

13 years agoRemove the char * argument from the SMB_VFS_GETWD() call. Now always
Jeremy Allison [Tue, 31 May 2011 23:36:06 +0000 (16:36 -0700)]
Remove the char * argument from the SMB_VFS_GETWD() call. Now always
returns malloc'ed memory.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jun  1 04:06:12 CEST 2011 on sn-devel-104

13 years agoChange sys_getcd() to take no arguments and always return malloc'ed memory (or NULL).
Jeremy Allison [Tue, 31 May 2011 23:14:04 +0000 (16:14 -0700)]
Change sys_getcd() to take no arguments and always return malloc'ed memory (or NULL).

Part of the efforts to remove PATH_MAX on modern systems.

13 years agoAdd check for the getcwd function being able to take NULL,0 arguments.
Jeremy Allison [Tue, 31 May 2011 22:38:55 +0000 (15:38 -0700)]
Add check for the getcwd function being able to take NULL,0 arguments.

13 years agoSplit the ACE flag mapping between nfs4 and Windows
Jeremy Allison [Tue, 31 May 2011 22:37:30 +0000 (15:37 -0700)]
Split the ACE flag mapping between nfs4 and Windows
into two separate functions rather than trying to do
it inline. Allows us to carefully control what flags
are mapped to what in one place. Modification to
bug #8191 - vfs_gpfs dosn't honor ACE_FLAG_INHERITED_ACE

13 years agos3:doc: update the ldap_user_dn documentation in the idmap_ldap manpage
Michael Adam [Tue, 31 May 2011 23:19:50 +0000 (01:19 +0200)]
s3:doc: update the ldap_user_dn documentation in the idmap_ldap manpage

also extend the example with ldap_user_dn.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jun  1 02:53:32 CEST 2011 on sn-devel-104

13 years agos3:idmap_ldap: allow creation of ldap stored mappings for explicitly configured domains.
Michael Adam [Tue, 31 May 2011 22:30:11 +0000 (00:30 +0200)]
s3:idmap_ldap: allow creation of ldap stored mappings for explicitly configured domains.

After the preparations, this is achieved by using idmap_ldap_allocate_id_internal()
as get_new_id rw method instead of idmap_ldap_allocate_id().

13 years agos3:idmap_ldap: rename idmap_ldap_get_new_id to idmap_ldap_allocate_id
Michael Adam [Tue, 31 May 2011 22:25:23 +0000 (00:25 +0200)]
s3:idmap_ldap: rename idmap_ldap_get_new_id to idmap_ldap_allocate_id

This is in preparation of allowing allocating ldap based domain-specific configs.

13 years agos3:idmap_ldap: rename idmap_ldap_allocate_id to idmap_ldap_allocate_id_internal
Michael Adam [Tue, 31 May 2011 22:25:23 +0000 (00:25 +0200)]
s3:idmap_ldap: rename idmap_ldap_allocate_id to idmap_ldap_allocate_id_internal

This is in preparation of allowing allocating ldap based domain-specific configs.

13 years agoidmap_ldap.8: Add example with readonly backend
Luk Claes [Tue, 31 May 2011 21:28:57 +0000 (23:28 +0200)]
idmap_ldap.8: Add example with readonly backend

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Michael Adam <obnox@samba.org>
13 years agolibrpc/ndr: Use converted_size to determine if NULL termination was sent
Andrew Bartlett [Tue, 31 May 2011 10:21:37 +0000 (20:21 +1000)]
librpc/ndr: Use converted_size to determine if NULL termination was sent

This is better than doing a strlen() on the string, as that huristic
only worked for ASCII strings.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  1 01:42:22 CEST 2011 on sn-devel-104

13 years agolibrpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_string
Sean Finney [Tue, 31 May 2011 07:49:19 +0000 (09:49 +0200)]
librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_string

Introduce a new flag, LIBNDR_FLAG_STR_RAW8, which indicates that libndr
should not attempt to convert the corresponding byte sequence, and place
the responsibility on the caller to do so later.

This is needed in cases where the string is known to be 8-bit and either
NULL terminated or of known length, but in an unspecified character set.
For example, when pulling PT_STRING8 properties from an exchange server
via libmapi + libndr, the codepage is neither known nor in the control
of the caller, and is determined by subsequent properties requested from
the server.  Therefore the client would like to fetch all properties in
one large batch, and convert the resulting strings locally.

This commit also includes some (basic) tests of each of the flags'
respective behaviors with the ndr push/pull string functions, in a new
source4 torture test suite ndr.ndr_string.

Signed-off-by: Sean Finney <seanius@seanius.net>
13 years agolibrpc/ndr: consolidate string conversion logic in ndr_pull_string
Sean Finney [Tue, 31 May 2011 07:49:18 +0000 (09:49 +0200)]
librpc/ndr: consolidate string conversion logic in ndr_pull_string

Reduce the amount of duplicate code in ndr_pull_string by moving the
almost duplicate conversion calls and their corresponding NDR pulls and
checks to a single location.  In the place of the removed calls is logic
allowing the conversion to be generalized, and and any specific
pulls/checks that do not apply to the general case.

This is similar to what has already been done in the switch statement
for ndr_push_string.

Signed-off-by: Sean Finney <seanius@seanius.net>
13 years agos3: fix more -Wunused-but-set-variable build warnings.
Günther Deschner [Tue, 31 May 2011 11:24:09 +0000 (13:24 +0200)]
s3: fix more -Wunused-but-set-variable build warnings.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jun  1 00:29:30 CEST 2011 on sn-devel-104

13 years agoTiny simplification to dom_sid_string_buf
Volker Lendecke [Tue, 31 May 2011 20:07:11 +0000 (22:07 +0200)]
Tiny simplification to dom_sid_string_buf

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue May 31 23:16:31 CEST 2011 on sn-devel-104

13 years agostruct make "struct shadow_copy_data" its own talloc context
Volker Lendecke [Mon, 30 May 2011 10:11:53 +0000 (12:11 +0200)]
struct make "struct shadow_copy_data" its own talloc context

13 years agos3: Remove SHADOW_COPY_DATA typedef
Volker Lendecke [Mon, 30 May 2011 10:06:31 +0000 (12:06 +0200)]
s3: Remove SHADOW_COPY_DATA typedef

13 years agos3: Mark sockets in error state writable
Volker Lendecke [Tue, 31 May 2011 11:24:22 +0000 (13:24 +0200)]
s3: Mark sockets in error state writable

Without this patch, when a socket only has a write event pending, we will never
detect an error condition. I've seen winbind doing

12:19:13.659964 gettimeofday({1306837153, 659984}, NULL) = 0 <0.000016>
12:19:13.660109 poll([{fd=35, events=POLLOUT}, {fd=32, events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) <0.000015>
12:19:13.660253 gettimeofday({1306837153, 660269}, NULL) = 0 <0.000013>
12:19:13.660298 poll([{fd=35, events=POLLOUT}, {fd=32, events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) <0.000015>

for a while when trying to connect to a DC when the socket had died already.

Volker

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue May 31 20:59:10 CEST 2011 on sn-devel-104

13 years agos3:doc: clean up the example section of the idmap_tdb manpage
Michael Adam [Tue, 31 May 2011 16:09:14 +0000 (18:09 +0200)]
s3:doc: clean up the example section of the idmap_tdb manpage

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue May 31 19:47:45 CEST 2011 on sn-devel-104

13 years agowinbindd.8: Use new idmap syntax for smbconfoptions
Luk Claes [Tue, 31 May 2011 15:21:09 +0000 (17:21 +0200)]
winbindd.8: Use new idmap syntax for smbconfoptions

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Michael Adam <obnox@samba.org>
13 years agos3:passdb: add GPL/copyright header to machine_sid.h
Michael Adam [Tue, 31 May 2011 12:32:40 +0000 (14:32 +0200)]
s3:passdb: add GPL/copyright header to machine_sid.h

13 years agos3:nmbd: add _NMBD_NMBD_H_ guard to nmbd.h
Michael Adam [Tue, 31 May 2011 11:30:34 +0000 (13:30 +0200)]
s3:nmbd: add _NMBD_NMBD_H_ guard to nmbd.h

13 years agos3:nmbd: add GPL/Copyright header to nmbd.h
Michael Adam [Tue, 31 May 2011 11:29:34 +0000 (13:29 +0200)]
s3:nmbd: add GPL/Copyright header to nmbd.h

13 years agos3:rpc_server: add _RPC_SERVER_SRV_ACCESS_CHECK_H_ guard to srv_access_check.h
Michael Adam [Tue, 31 May 2011 11:25:34 +0000 (13:25 +0200)]
s3:rpc_server: add _RPC_SERVER_SRV_ACCESS_CHECK_H_ guard to srv_access_check.h

13 years agos3:rpc_server: add GPL/Copyright header to rpc_server/srv_access_check.h
Michael Adam [Tue, 31 May 2011 11:24:24 +0000 (13:24 +0200)]
s3:rpc_server: add GPL/Copyright header to rpc_server/srv_access_check.h

13 years agos3: add _LIB_IDMAP_CACHE_H_ guard to lib/idmap_cache.h
Michael Adam [Tue, 31 May 2011 11:19:52 +0000 (13:19 +0200)]
s3: add _LIB_IDMAP_CACHE_H_ guard to lib/idmap_cache.h

13 years agos3: add GPL/Copyright header to lib/idmap_cache.h
Michael Adam [Tue, 31 May 2011 11:18:51 +0000 (13:18 +0200)]
s3: add GPL/Copyright header to lib/idmap_cache.h

13 years agoreplace: remove waring if IOV_MAX is not defined
Björn Jacke [Tue, 31 May 2011 07:47:17 +0000 (09:47 +0200)]
replace: remove waring if IOV_MAX is not defined

as discussed on samba-techincal we currelty don't rely on it and we don't want
to flood this warning message during compile.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 31 18:36:53 CEST 2011 on sn-devel-104

13 years agos3:librpc: remove unused file librpc/ndr/util.h
Michael Adam [Tue, 31 May 2011 10:06:00 +0000 (12:06 +0200)]
s3:librpc: remove unused file librpc/ndr/util.h

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue May 31 15:19:46 CEST 2011 on sn-devel-104

13 years agos3:winbindd_nrd: include ../librpc/ndr/libndr.h instead of librpc/ndr/util.h
Michael Adam [Tue, 31 May 2011 10:03:07 +0000 (12:03 +0200)]
s3:winbindd_nrd: include ../librpc/ndr/libndr.h instead of librpc/ndr/util.h

13 years agos3:libads/ndr: include ../librpc/ndr/libndr.h instead of librpc/ndr/util.h
Michael Adam [Tue, 31 May 2011 10:03:07 +0000 (12:03 +0200)]
s3:libads/ndr: include ../librpc/ndr/libndr.h instead of librpc/ndr/util.h

13 years agos3: Support shadow copy display over SMB2
Volker Lendecke [Mon, 30 May 2011 15:14:56 +0000 (17:14 +0200)]
s3: Support shadow copy display over SMB2

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue May 31 12:53:10 CEST 2011 on sn-devel-104

13 years agos3:doc: document "idmap gid" as deprecated.
Michael Adam [Tue, 31 May 2011 08:29:37 +0000 (10:29 +0200)]
s3:doc: document "idmap gid" as deprecated.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue May 31 11:39:38 CEST 2011 on sn-devel-104

13 years agos3:doc: document "idmap uid" as deprecated.
Michael Adam [Tue, 31 May 2011 08:29:08 +0000 (10:29 +0200)]
s3:doc: document "idmap uid" as deprecated.