samba.git
11 years agos3: Fix some blank line endings
Volker Lendecke [Mon, 24 Sep 2012 21:11:05 +0000 (14:11 -0700)]
s3: Fix some blank line endings

11 years agos3: Fix a typo
Volker Lendecke [Tue, 25 Sep 2012 17:34:49 +0000 (10:34 -0700)]
s3: Fix a typo

11 years agopysmbd: Fix cut&paste errors
Volker Lendecke [Mon, 24 Sep 2012 21:18:42 +0000 (14:18 -0700)]
pysmbd: Fix cut&paste errors

11 years agopyntdb: Fix init function for ntdb python module.
Pierre Lejeune [Tue, 25 Sep 2012 18:56:37 +0000 (20:56 +0200)]
pyntdb: Fix init function for ntdb python module.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Tue Sep 25 22:40:39 CEST 2012 on sn-devel-104

11 years agos4-python: Override SIGINT handler in scripts only.
Jelmer Vernooij [Tue, 25 Sep 2012 18:49:22 +0000 (20:49 +0200)]
s4-python: Override SIGINT handler in scripts only.

Override the SIGINT handler in a few select cases only, rather than
doing so in one of the samba Python modules. I've done this where it
matters most; we can add this code to other scripts too if necessary.

This means that importing the 'samba' module from a third party
application does not have side-effects on the state of the signal
handlers.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068

11 years agos3: Slightly simplify is_stat_open
Volker Lendecke [Wed, 5 Sep 2012 13:24:46 +0000 (15:24 +0200)]
s3: Slightly simplify is_stat_open

The "access_bits" clause is redundant. is_stat_open says that exactly
at least one of the stat_open_bits must be set and none else.

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 25 20:05:06 CEST 2012 on sn-devel-104

11 years agos3: Make is_stat_open() a bit more readable
Volker Lendecke [Wed, 5 Sep 2012 13:19:28 +0000 (15:19 +0200)]
s3: Make is_stat_open() a bit more readable

11 years agolib: Make async_sock includable on its own
Volker Lendecke [Sun, 12 Aug 2012 12:29:26 +0000 (14:29 +0200)]
lib: Make async_sock includable on its own

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 25 18:03:46 CEST 2012 on sn-devel-104

11 years agos4-torture: Fix some nonemtpy blank lines
Volker Lendecke [Thu, 13 Sep 2012 14:52:44 +0000 (16:52 +0200)]
s4-torture: Fix some nonemtpy blank lines

11 years agos3: Fix indentation of if-expressions
Volker Lendecke [Tue, 4 Sep 2012 07:16:55 +0000 (09:16 +0200)]
s3: Fix indentation of if-expressions

To me this makes open_file_ntcreate a little easier to understand

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 25 10:08:15 CEST 2012 on sn-devel-104

11 years agodocs: Change TOSHARG-VFS to avoid suggesting VFS modules are Linux/IRIX only
Andrew Bartlett [Tue, 25 Sep 2012 01:05:37 +0000 (11:05 +1000)]
docs: Change TOSHARG-VFS to avoid suggesting VFS modules are Linux/IRIX only

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep 25 08:27:15 CEST 2012 on sn-devel-104

11 years agodocs: Remove mention of auth methods in TOSHARG-Passdb
Andrew Bartlett [Tue, 25 Sep 2012 01:05:01 +0000 (11:05 +1000)]
docs: Remove mention of auth methods in TOSHARG-Passdb

This is not connected to the passdb system, and we should not encourage setting of auth methods
in any case.

Andrew Bartlett

11 years agodocs: Fix typo in TOSHARG-Passdb
Andrew Bartlett [Tue, 25 Sep 2012 01:04:14 +0000 (11:04 +1000)]
docs: Fix typo in TOSHARG-Passdb

11 years agodocs: Remove Win9X/WinMe mentions from TOSHARG-PDC
Andrew Bartlett [Sat, 22 Sep 2012 18:55:20 +0000 (04:55 +1000)]
docs: Remove Win9X/WinMe mentions from TOSHARG-PDC

11 years agodocs: Add mention of AD DC support in TOSHARG-PDC
Andrew Bartlett [Sat, 22 Sep 2012 18:54:24 +0000 (04:54 +1000)]
docs: Add mention of AD DC support in TOSHARG-PDC

11 years agodocs: Explain the no-domain-logons restriction applies to all HOME editions
Andrew Bartlett [Sat, 22 Sep 2012 18:53:55 +0000 (04:53 +1000)]
docs: Explain the no-domain-logons restriction applies to all HOME editions

11 years agodocs: Remove references to default paramters in TOSHARG-PDC
Andrew Bartlett [Sat, 22 Sep 2012 18:52:56 +0000 (04:52 +1000)]
docs: Remove references to default paramters in TOSHARG-PDC

11 years agodocs: Update TOSHARG-Install
Andrew Bartlett [Sat, 22 Sep 2012 17:09:32 +0000 (03:09 +1000)]
docs: Update TOSHARG-Install

- winbindd runs as many processes now
- open_oplock_ipc errors do not happen any more, we do not use UDP messaging any more.

Andrew Bartlett

11 years agoclient: Fix talloc_stackframe() free order assertion in developer mode
Andrew Bartlett [Tue, 25 Sep 2012 00:41:05 +0000 (10:41 +1000)]
client: Fix talloc_stackframe() free order assertion in developer mode

Reported-by: Ricky Nance <ricky.nance@weaubleau.k12.mo.us>
11 years agoreplace: Avoid returning value in void setproctitle() replacement.
Jelmer Vernooij [Mon, 24 Sep 2012 23:22:56 +0000 (01:22 +0200)]
replace: Avoid returning value in void setproctitle() replacement.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Tue Sep 25 06:38:40 CEST 2012 on sn-devel-104

11 years agoWe now pass "samba3.raw.acls.generic" and "samba3.smb2.acls.GENERIC" with the max...
Jeremy Allison [Thu, 20 Sep 2012 20:35:47 +0000 (13:35 -0700)]
We now pass "samba3.raw.acls.generic" and "samba3.smb2.acls.GENERIC" with the max access change.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 25 04:57:44 CEST 2012 on sn-devel-104

11 years agoFix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.
Jeremy Allison [Thu, 20 Sep 2012 19:32:10 +0000 (12:32 -0700)]
Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.

If we aren't already granted DELETE access, check if we have
DELETE_CHILD in the containing directory.

11 years agos4:rpc_server/drsuapi: use talloc_zero instead of talloc() in dcesrv_drsuapi_DsBind()
Stefan Metzmacher [Mon, 24 Sep 2012 23:13:12 +0000 (01:13 +0200)]
s4:rpc_server/drsuapi: use talloc_zero instead of talloc() in dcesrv_drsuapi_DsBind()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 25 03:06:13 CEST 2012 on sn-devel-104

11 years agos4:rpc_server/drsuapi: fix a crash in dcesrv_drsuapi_DsGetDomainControllerInfo_1()
Stefan Metzmacher [Mon, 24 Sep 2012 23:09:55 +0000 (01:09 +0200)]
s4:rpc_server/drsuapi: fix a crash in dcesrv_drsuapi_DsGetDomainControllerInfo_1()

metze

11 years agosamba-tool domain provision: DNS forwarder is not a boolean.
Jelmer Vernooij [Mon, 24 Sep 2012 21:02:05 +0000 (23:02 +0200)]
samba-tool domain provision: DNS forwarder is not a boolean.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Tue Sep 25 00:48:43 CEST 2012 on sn-devel-104

11 years agoRemove compatibility code for setproctitle() now moved to libreplace.
Jelmer Vernooij [Mon, 24 Sep 2012 07:42:15 +0000 (09:42 +0200)]
Remove compatibility code for setproctitle() now moved to libreplace.

11 years agoreplace: Support setproctitle().
Jelmer Vernooij [Mon, 24 Sep 2012 07:20:46 +0000 (09:20 +0200)]
replace: Support setproctitle().

This uses the setproctitle() from libc, libsetproctitle or libbsd.
If none is available it provides a dummy implementation.

11 years agosamba-tool domain-provision: Avoid python2.5-isms.
Jelmer Vernooij [Mon, 24 Sep 2012 06:26:12 +0000 (08:26 +0200)]
samba-tool domain-provision: Avoid python2.5-isms.

11 years agosamba-tool domain-provision: Fix docstring.
Jelmer Vernooij [Mon, 24 Sep 2012 06:21:27 +0000 (08:21 +0200)]
samba-tool domain-provision: Fix docstring.

11 years agoscript/autobuild.py: set the default for --log-base to the current gitroot
Stefan Metzmacher [Mon, 24 Sep 2012 09:53:22 +0000 (11:53 +0200)]
script/autobuild.py: set the default for --log-base to the current gitroot

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Sep 24 15:27:16 CEST 2012 on sn-devel-104

11 years agobuild: Fix detection of quotas on macos
Andrew Bartlett [Mon, 24 Sep 2012 08:02:01 +0000 (18:02 +1000)]
build: Fix detection of quotas on macos

This is a weird one.  While visually OK, the . in sys/types.h was not
made up of the typical ASCII character, so of course did not find
types.h!

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep 24 12:24:45 CEST 2012 on sn-devel-104

11 years agos3-pylibsmb: Use Py_RETURN_NONE
Volker Lendecke [Mon, 24 Sep 2012 01:50:22 +0000 (18:50 -0700)]
s3-pylibsmb: Use Py_RETURN_NONE

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep 24 08:09:53 CEST 2012 on sn-devel-104

11 years agotorture: More torture_assert() calls in rpc.lsa
Andrew Bartlett [Sun, 23 Sep 2012 23:20:59 +0000 (09:20 +1000)]
torture: More torture_assert() calls in rpc.lsa

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep 24 05:27:46 CEST 2012 on sn-devel-104

11 years agotorture: use torture_assert rather than return false in rpc.lsa
Andrew Bartlett [Sun, 23 Sep 2012 22:59:10 +0000 (08:59 +1000)]
torture: use torture_assert rather than return false in rpc.lsa

This will help ensure we always generate correct subunit failures.

Andrew Bartlett

11 years agotorture: tidy up rpc.lsa OpenPolicy2 test to more clearly use torture_fail()
Andrew Bartlett [Sun, 23 Sep 2012 22:40:05 +0000 (08:40 +1000)]
torture: tidy up rpc.lsa OpenPolicy2 test to more clearly use torture_fail()

11 years agobuild: Add missing dep on tdb_compat
Andrew Bartlett [Sun, 23 Sep 2012 21:06:53 +0000 (07:06 +1000)]
build: Add missing dep on tdb_compat

11 years agolib/replace: Look for special flags needed for c99
Andrew Bartlett [Sun, 23 Sep 2012 20:45:05 +0000 (06:45 +1000)]
lib/replace: Look for special flags needed for c99

This is normally handled by the waf core, but for HP-UX we currently fail.

The autoconf code hard-codes a case for HP-UX, but I want to try testing
it using a generic system first.

Andrew Bartlett

11 years agolib/replace: Improve mkstemp test in autoconf and waf
Andrew Bartlett [Sun, 23 Sep 2012 20:03:31 +0000 (06:03 +1000)]
lib/replace: Improve mkstemp test in autoconf and waf

On the Sernet-solaris8 host, this test passed in the autoconf build,
then failed in the recursive waf build.  This newer test should probe
the behaviour more closely, by checking we get two distinct, secure
files.

Andrew Bartlett

11 years agos3:winbindd fix a compiler warning
Christian Ambach [Sun, 23 Sep 2012 03:44:41 +0000 (20:44 -0700)]
s3:winbindd fix a compiler warning

about type potentially being used uninitialized

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon Sep 24 03:49:53 CEST 2012 on sn-devel-104

11 years agos3:printing only do printing_subsystem_update when printing is enabled
Christian Ambach [Sun, 23 Sep 2012 06:39:49 +0000 (08:39 +0200)]
s3:printing only do printing_subsystem_update when printing is enabled

no point in calling this if printing was disabled and no spoolss service was started
this hurts CTDB clusters as the smbds on the cluster nodes will fight for the single record in the TDB

This fixes Bug 9197 - Disabling printing still makes smbd create and access printer_list.tdb

11 years agos4:dns_server - introduce the wildcard binding feature
Matthias Dieter Wallnöfer [Sun, 12 Aug 2012 16:08:20 +0000 (18:08 +0200)]
s4:dns_server - introduce the wildcard binding feature

We need the wildcard binding feature otherwise we might get bound to a
private interface in case of multiple interfaces and no "interfaces"
parameter in smb.conf.

Code taken from source4/ldap_server/ldap_server.c

Signed-off-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sun Sep 23 23:44:03 CEST 2012 on sn-devel-104

11 years agos3-pylibsmb: Add get_oplock_break
Volker Lendecke [Sat, 22 Sep 2012 17:45:32 +0000 (10:45 -0700)]
s3-pylibsmb: Add get_oplock_break

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Sep 23 18:01:28 CEST 2012 on sn-devel-104

11 years agos3-pylibsmb: Factor out py_tevent_cond_signal
Volker Lendecke [Sat, 22 Sep 2012 17:40:06 +0000 (10:40 -0700)]
s3-pylibsmb: Factor out py_tevent_cond_signal

11 years agos3-pylibsmb: Reduce the number of warnings
Volker Lendecke [Sat, 22 Sep 2012 17:38:46 +0000 (10:38 -0700)]
s3-pylibsmb: Reduce the number of warnings

11 years agos3: Convert cli_oplock_break_waiter to smbXcli
Volker Lendecke [Sat, 22 Sep 2012 16:57:47 +0000 (18:57 +0200)]
s3: Convert cli_oplock_break_waiter to smbXcli

11 years agos3: Add "readdir" to pylibsmb
Volker Lendecke [Mon, 20 Aug 2012 12:38:42 +0000 (14:38 +0200)]
s3: Add "readdir" to pylibsmb

11 years agos3: Fix some nonempty line endings
Volker Lendecke [Tue, 18 Sep 2012 23:19:07 +0000 (16:19 -0700)]
s3: Fix some nonempty line endings

11 years agos3-pylibsmb: move py_tevent_req_wait_exc up in the file
Christian Ambach [Sun, 16 Sep 2012 18:39:26 +0000 (11:39 -0700)]
s3-pylibsmb: move py_tevent_req_wait_exc up in the file

this is needed to be able to use it in other functions and
spares the prototype

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

11 years agos3-pylibsmb: Factor out py_tevent_cond_wait
Volker Lendecke [Fri, 21 Sep 2012 19:05:04 +0000 (12:05 -0700)]
s3-pylibsmb: Factor out py_tevent_cond_wait

11 years agobuild: Remove unused define UNIXWARE
Andrew Bartlett [Sun, 23 Sep 2012 04:37:24 +0000 (14:37 +1000)]
build: Remove unused define UNIXWARE

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Sep 23 08:33:02 CEST 2012 on sn-devel-104

11 years agolib/replace: Remove unused nap and therefore the SCO define
Andrew Bartlett [Sun, 23 Sep 2012 04:35:58 +0000 (14:35 +1000)]
lib/replace: Remove unused nap and therefore the SCO define

In any case, the Samba Team stopped supporting SCO systems a long time ago.

Andrew Bartlett

11 years agobuild: Make waf configure match autoconf for HPUX ACLs
Andrew Bartlett [Sun, 23 Sep 2012 04:30:37 +0000 (14:30 +1000)]
build: Make waf configure match autoconf for HPUX ACLs

11 years agobuild: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default
Andrew Bartlett [Sun, 23 Sep 2012 04:30:10 +0000 (14:30 +1000)]
build: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default

The autoconf build simply has 512 as the default, without a warning.  Rather than
enumerate every OS ever made, just handle the known exceptions.

Andrew Bartlett

11 years agolib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM
Andrew Bartlett [Sun, 23 Sep 2012 04:25:00 +0000 (14:25 +1000)]
lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM

Removing this unbuilt file allows removing BROKEN_GETGRNAM which was only
ever defined per-OS, not based on an actual test.

Andrew Bartlett

11 years agobuild: Remove unused IRIX and IRIX6 defines
Andrew Bartlett [Sun, 23 Sep 2012 03:57:44 +0000 (13:57 +1000)]
build: Remove unused IRIX and IRIX6 defines

11 years agolib/replace: Try to fix build on HP-UX for os2_delete test
Andrew Bartlett [Sun, 23 Sep 2012 03:39:01 +0000 (13:39 +1000)]
lib/replace: Try to fix build on HP-UX for os2_delete test

The issue is that this file is both used in an autoconf test, and
later in a smbtorture test.  Because os2_delete.c does not include
replace.h, bool may not be defined.

So, instead we shift the need for bool to a different header.

(The readdir tests in repdir.m4 are not yet in the waf configure).

Andrew Bartlett

11 years agontdb: Try to fix the build on Solaris which does not have err
Andrew Bartlett [Sun, 23 Sep 2012 03:20:45 +0000 (13:20 +1000)]
ntdb: Try to fix the build on Solaris which does not have err

11 years agos4:torture:smb2: add a durable-open.read-only test
Michael Adam [Fri, 7 Sep 2012 10:09:13 +0000 (12:09 +0200)]
s4:torture:smb2: add a durable-open.read-only test

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Sep 23 05:47:30 CEST 2012 on sn-devel-104

11 years agoscript/autobuild.py: remove --rebase-master and --push-master options
Stefan Metzmacher [Sat, 22 Sep 2012 22:50:48 +0000 (00:50 +0200)]
script/autobuild.py: remove --rebase-master and --push-master options

You should explicitly pass the urls to --rebase= and --pushto=

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Sep 23 02:53:56 CEST 2012 on sn-devel-104

11 years agos3:vfs_fake_acls fix a compiler warning
Christian Ambach [Sat, 22 Sep 2012 20:33:02 +0000 (13:33 -0700)]
s3:vfs_fake_acls fix a compiler warning

about acl being potentially uninitialized

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Sun Sep 23 01:08:39 CEST 2012 on sn-devel-104

11 years agos3:winbindd fix a compiler warning
Christian Ambach [Sat, 22 Sep 2012 20:32:00 +0000 (13:32 -0700)]
s3:winbindd fix a compiler warning

about result being potentially uninitialized

11 years agoscript/autobuild.py: add --log-base option
Stefan Metzmacher [Sat, 22 Sep 2012 00:40:19 +0000 (02:40 +0200)]
script/autobuild.py: add --log-base option

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Sep 22 23:21:59 CEST 2012 on sn-devel-104

11 years agoscript/autobuild.py: add log_base variable to avoid hardcoded values
Stefan Metzmacher [Sat, 22 Sep 2012 00:34:38 +0000 (02:34 +0200)]
script/autobuild.py: add log_base variable to avoid hardcoded values

metze

11 years agoscript/autobuild.py: add --branch option
Stefan Metzmacher [Sat, 22 Sep 2012 00:26:10 +0000 (02:26 +0200)]
script/autobuild.py: add --branch option

metze

11 years agoscript/autobuild.py: use some variables for push_remote and push_branch
Stefan Metzmacher [Sat, 22 Sep 2012 00:18:11 +0000 (02:18 +0200)]
script/autobuild.py: use some variables for push_remote and push_branch

metze

11 years agoscript/autobuild.py: use some variables for rebase_remote and rebase_branch
Stefan Metzmacher [Fri, 21 Sep 2012 22:23:21 +0000 (00:23 +0200)]
script/autobuild.py: use some variables for rebase_remote and rebase_branch

metze

11 years agoselftest: skip the samba4.smb2.compound testsuite
Michael Adam [Sat, 22 Sep 2012 17:07:51 +0000 (19:07 +0200)]
selftest: skip the samba4.smb2.compound testsuite

Too many tests are starting but never finish.

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Sep 22 20:50:06 CEST 2012 on sn-devel-104

11 years agos3:smbd:smb2: initialize variable in vfs_default_durable_reconnect()
Michael Adam [Fri, 21 Sep 2012 20:56:20 +0000 (22:56 +0200)]
s3:smbd:smb2: initialize variable in vfs_default_durable_reconnect()

Found by Ambi's state-of-the-art compiler!

11 years agoselftest: we fail samba3.smb2.compound.interim2
Michael Adam [Thu, 20 Sep 2012 18:46:53 +0000 (20:46 +0200)]
selftest: we fail samba3.smb2.compound.interim2

We currently return NT_STATUS_CANCELLED where we should
return NT_STATUS_INTERNAL_ERROR.

11 years agos4:torture:smb2:compound: remove two unused macros
Michael Adam [Wed, 19 Sep 2012 22:43:54 +0000 (00:43 +0200)]
s4:torture:smb2:compound: remove two unused macros

11 years agos4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8
Michael Adam [Wed, 19 Sep 2012 22:41:48 +0000 (00:41 +0200)]
s4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8

11 years agos4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8
Michael Adam [Wed, 19 Sep 2012 22:41:04 +0000 (00:41 +0200)]
s4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8

11 years agos3:smbd: remove struct member smbd_smb2_request.cancelled - it was only written
Michael Adam [Sat, 22 Sep 2012 00:05:18 +0000 (02:05 +0200)]
s3:smbd: remove struct member smbd_smb2_request.cancelled - it was only written

11 years agos3:smb2_lock: let smbd_smb2_create_cancel() trigger NT_STATUS_CANCELED
Stefan Metzmacher [Thu, 20 Sep 2012 14:16:03 +0000 (16:16 +0200)]
s3:smb2_lock: let smbd_smb2_create_cancel() trigger NT_STATUS_CANCELED

Instead of violating the tevent_req layers.

metze

11 years agos3:smb2_lock: smbd_smb2_notify_recv() can already return NT_STATUS_CANCELED
Stefan Metzmacher [Thu, 20 Sep 2012 14:16:03 +0000 (16:16 +0200)]
s3:smb2_lock: smbd_smb2_notify_recv() can already return NT_STATUS_CANCELED

That's why we can remove the code that violates the tevent_req layers.

metze

11 years agos3:smb2_notify: make use of tevent_req_defer_callback() instead of custom tevent_imme...
Stefan Metzmacher [Thu, 20 Sep 2012 14:25:58 +0000 (16:25 +0200)]
s3:smb2_notify: make use of tevent_req_defer_callback() instead of custom tevent_immediate

metze

11 years agos3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()
Stefan Metzmacher [Thu, 20 Sep 2012 14:23:26 +0000 (16:23 +0200)]
s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()

smbd_notify_cancel_by_smbreq() will already trigger this via
smbd_smb2_notify_reply() and smbd_smb2_notify_reply_trigger().

metze

11 years agos3:smb2_lock: let smbd_smb2_lock_cancel() trigger NT_STATUS_CANCELED
Stefan Metzmacher [Thu, 20 Sep 2012 14:16:03 +0000 (16:16 +0200)]
s3:smb2_lock: let smbd_smb2_lock_cancel() trigger NT_STATUS_CANCELED

Instead of violating the tevent_req layers.

metze

11 years agos3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()
Stefan Metzmacher [Thu, 20 Sep 2012 14:04:01 +0000 (16:04 +0200)]
s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()

Because we should not call smbd_smb2_request_error() on an
request that is still running.

If the subreq implementes a cancel function, this should
take care of triggering smbd_smb2_request_error.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos4:torture:smb2: extend the compound.invalid1 test
Stefan Metzmacher [Fri, 21 Sep 2012 20:20:20 +0000 (22:20 +0200)]
s4:torture:smb2: extend the compound.invalid1 test

Test that when turning the related flag back off for the
last compound request, the return code changes from
invalid parameter to file closed.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

11 years agos3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()
Michael Adam [Fri, 21 Sep 2012 19:43:36 +0000 (21:43 +0200)]
s3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()

removes unnneccary checks/assignments for compound_related and next_status
and duplicate setting of error status.

And remove (now) unused next_status from struct smbd_smb2_request.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

11 years agos3:smbd:smb2: add check for session_status for compound requests
Michael Adam [Sat, 22 Sep 2012 02:06:27 +0000 (04:06 +0200)]
s3:smbd:smb2: add check for session_status for compound requests

11 years agos3:smb2_server: do the req->next_status check before the signing checks
Stefan Metzmacher [Wed, 19 Sep 2012 22:52:19 +0000 (00:52 +0200)]
s3:smb2_server: do the req->next_status check before the signing checks

Windows 2012 returns NT_STATUS_INVALID_PARAMETER to
the smb2.compound.invalid1 test if that uses signing
(instead of NT_STATUS_ACCESS_DENIED).

metze

11 years agos3:smb2_server: reset req->last_session_id and req->last_tid after using it
Stefan Metzmacher [Thu, 20 Sep 2012 03:10:28 +0000 (05:10 +0200)]
s3:smb2_server: reset req->last_session_id and req->last_tid after using it

If we can find a valid session or tcon we'll set it after the lookup,
but it need to make sure to reset it if we don't find the session.

This fixes a problem where a compound unrelated request between
related requests doesn't reset the session.

If we have 3 requests in a compound chain, request 3 should never
use the id's cached from request 1. It should only every inherit
handles from request 2.

metze

11 years agos4:torture:smb2: fix the compound.invalid3 test to work against windows
Michael Adam [Wed, 19 Sep 2012 22:36:29 +0000 (00:36 +0200)]
s4:torture:smb2: fix the compound.invalid3 test to work against windows

11 years agos4:torture:smb2: fix compound.related3 test to work against windows
Michael Adam [Wed, 19 Sep 2012 22:35:52 +0000 (00:35 +0200)]
s4:torture:smb2: fix compound.related3 test to work against windows

11 years agos3: Compound requests should continue processing.
Ira Cooper [Wed, 19 Sep 2012 18:39:07 +0000 (18:39 +0000)]
s3: Compound requests should continue processing.

This patch addresses #9173.

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agobuild: Fix enabled handling for HAVE_LDAP, we need to use bld.CONFIG_SET
Andrew Bartlett [Sat, 22 Sep 2012 05:27:24 +0000 (22:27 -0700)]
build: Fix enabled handling for HAVE_LDAP, we need to use bld.CONFIG_SET

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Sep 22 09:09:17 CEST 2012 on sn-devel-104

11 years agobuild: Try not build with LDAP if we do not have ldap.h
Andrew Bartlett [Sat, 22 Sep 2012 04:57:22 +0000 (21:57 -0700)]
build: Try not build with LDAP if we do not have ldap.h

11 years agos4:dns.py: reproducer for (bug #9184)
Stefan Metzmacher [Fri, 21 Sep 2012 21:06:13 +0000 (23:06 +0200)]
s4:dns.py: reproducer for (bug #9184)

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Sep 22 06:08:05 CEST 2012 on sn-devel-104

11 years agolib/tsocket: fix receiving of udp packets from 0 bytes (bug #9184)
Stefan Metzmacher [Fri, 21 Sep 2012 20:54:26 +0000 (22:54 +0200)]
lib/tsocket: fix receiving of udp packets from 0 bytes (bug #9184)

It's possible for a client to send 0 bytes in a UDP packet,
we need still need to call recvfrom() and skip the invalid
packet at a higher level. Otherwise the kernel receive queue
is blocked.

metze

11 years agolibcli/echo: validate the message length
Stefan Metzmacher [Fri, 21 Sep 2012 20:18:10 +0000 (22:18 +0200)]
libcli/echo: validate the message length

metze

11 years agos3:pdb_ldap remove unused function
Christian Ambach [Fri, 21 Sep 2012 20:54:47 +0000 (13:54 -0700)]
s3:pdb_ldap remove unused function

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Sat Sep 22 04:28:37 CEST 2012 on sn-devel-104

11 years agos3:rpcclient fix a compiler warning
Christian Ambach [Fri, 21 Sep 2012 21:00:53 +0000 (14:00 -0700)]
s3:rpcclient fix a compiler warning

11 years agos3:utils/net fix a compiler warning
Christian Ambach [Fri, 21 Sep 2012 20:58:29 +0000 (13:58 -0700)]
s3:utils/net fix a compiler warning

ret might be used uninitialized in out-of-memory condition

11 years agoauth/kerberos: add HAVE_KRB5 guard to fix non-krb5 build after winbindd pac changes
Andrew Bartlett [Fri, 21 Sep 2012 22:59:11 +0000 (15:59 -0700)]
auth/kerberos: add HAVE_KRB5 guard to fix non-krb5 build after winbindd pac changes

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Sep 22 02:44:07 CEST 2012 on sn-devel-104

11 years agos3:smbd: release the share mode lock before calling exit_server() (bug #9191)
Stefan Metzmacher [Fri, 21 Sep 2012 18:36:16 +0000 (20:36 +0200)]
s3:smbd: release the share mode lock before calling exit_server() (bug #9191)

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Sep 21 22:36:57 CEST 2012 on sn-devel-104

11 years agos3:dbwrap_ctdb: set errno = ENOSYS if clustering is not supported
Gregor Beck [Tue, 8 Nov 2011 15:06:56 +0000 (16:06 +0100)]
s3:dbwrap_ctdb: set errno = ENOSYS if clustering is not supported

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Sep 21 18:05:56 CEST 2012 on sn-devel-104

11 years agolibtorture: factor out simple ui backend
Gregor Beck [Tue, 18 Oct 2011 11:15:22 +0000 (13:15 +0200)]
libtorture: factor out simple ui backend

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:dbwrap: remove unused args from db_open_file()
Gregor Beck [Tue, 25 Oct 2011 12:51:23 +0000 (14:51 +0200)]
s3:dbwrap: remove unused args from db_open_file()

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