metze/samba/wip.git
11 years agos3:test_net_registry_check: eliminate "local" keyword in shell master3-reauth
Björn Jacke [Mon, 25 Jun 2012 18:28:22 +0000 (20:28 +0200)]
s3:test_net_registry_check: eliminate "local" keyword in shell

prefer to use function syntax with (...)  to make variables local

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Jun 26 00:32:11 CEST 2012 on sn-devel-104

11 years agos3:Makefile: use our "$MAKE" instead of "make" in our own Makefile
Björn Jacke [Mon, 25 Jun 2012 17:44:24 +0000 (19:44 +0200)]
s3:Makefile: use our "$MAKE" instead of "make" in our own Makefile

11 years agos3:selftest: run SMB2-SESSION-RECONNECT
Stefan Metzmacher [Fri, 22 Jun 2012 12:08:30 +0000 (14:08 +0200)]
s3:selftest: run SMB2-SESSION-RECONNECT

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 25 22:42:03 CEST 2012 on sn-devel-104

11 years agoselftest/known: samba3.smb2.session.*reconnect passes now
Stefan Metzmacher [Fri, 22 Jun 2012 12:26:42 +0000 (14:26 +0200)]
selftest/known: samba3.smb2.session.*reconnect passes now

metze

11 years agos3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv
Stefan Metzmacher [Wed, 16 May 2012 22:32:40 +0000 (00:32 +0200)]
s3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv

metze

11 years agos3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE
Stefan Metzmacher [Mon, 14 May 2012 14:17:49 +0000 (16:17 +0200)]
s3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE

metze

11 years agos3:smbXsrv_session: add smb2srv_session_close_previous_send/recv
Stefan Metzmacher [Tue, 17 Apr 2012 18:39:58 +0000 (20:39 +0200)]
s3:smbXsrv_session: add smb2srv_session_close_previous_send/recv

metze

11 years agos3:smbXsrv.idl: add smbXsrv_session_close*
Stefan Metzmacher [Mon, 11 Jun 2012 17:29:25 +0000 (19:29 +0200)]
s3:smbXsrv.idl: add smbXsrv_session_close*

metze

11 years agos3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE
Stefan Metzmacher [Wed, 18 Apr 2012 10:44:12 +0000 (12:44 +0200)]
s3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE

metze

11 years agos3:smb2_sesssetup: inline gensec_session_info() call
Stefan Metzmacher [Wed, 16 May 2012 22:30:43 +0000 (00:30 +0200)]
s3:smb2_sesssetup: inline gensec_session_info() call

metze

11 years agos3:smb2_sesssetup: make use of gensec_update_send/recv
Stefan Metzmacher [Wed, 16 May 2012 14:05:48 +0000 (16:05 +0200)]
s3:smb2_sesssetup: make use of gensec_update_send/recv

metze

11 years agos3:smb2_sesssetup: inline most of smbd_smb2_session_setup()
Stefan Metzmacher [Wed, 16 May 2012 13:56:15 +0000 (15:56 +0200)]
s3:smb2_sesssetup: inline most of smbd_smb2_session_setup()

metze

11 years agos3:selftest: run raw.session
Stefan Metzmacher [Fri, 22 Jun 2012 10:11:43 +0000 (12:11 +0200)]
s3:selftest: run raw.session

Note: raw.session.reauth2 still fails:

failure: samba3.raw.session.reauth2(s3dc) [
_StringException: _StringException: ../source4/torture/raw/session.c:186: status
was NT_STATUS_ACCESS_DENIED, expected NT_STATUS_OK: 2nd open failed

But it's not critical as real clients won't reauth as anonymous.

metze

11 years agos3:selftest: run rpc.samba3.smb-reauth1 and rpc.samba3.smb-reauth2
Stefan Metzmacher [Fri, 22 Jun 2012 11:06:41 +0000 (13:06 +0200)]
s3:selftest: run rpc.samba3.smb-reauth1 and rpc.samba3.smb-reauth2

metze

11 years agos3:smbd/sesssetup: implement dynamic re-authentication and expire session if client...
Stefan Metzmacher [Wed, 25 Apr 2012 17:36:20 +0000 (19:36 +0200)]
s3:smbd/sesssetup: implement dynamic re-authentication and expire session if client supports it

metze

11 years agos3:selftest: run smbtorture3 SMB2-SESSION-REAUTH
Stefan Metzmacher [Fri, 22 Jun 2012 11:06:01 +0000 (13:06 +0200)]
s3:selftest: run smbtorture3 SMB2-SESSION-REAUTH

metze

11 years agos3:selftest: run smb2.session as ntlm and krb5
Stefan Metzmacher [Fri, 22 Jun 2012 11:03:16 +0000 (13:03 +0200)]
s3:selftest: run smb2.session as ntlm and krb5

This activates the smb2.session.expire1 test, when krb5 is used.

metze

11 years agoselftest/knownfail: only reauth5 still fails
Stefan Metzmacher [Thu, 17 May 2012 17:28:06 +0000 (19:28 +0200)]
selftest/knownfail: only reauth5 still fails

metze

11 years agos3:smb2_sesssetup: implement dynamic re-authentication and expire sessions
Stefan Metzmacher [Mon, 14 May 2012 12:24:08 +0000 (14:24 +0200)]
s3:smb2_sesssetup: implement dynamic re-authentication and expire sessions

metze

11 years agodocs-xml: document "server max protocol" SMB3 and SMB3_00
Stefan Metzmacher [Sun, 3 Jun 2012 21:09:33 +0000 (23:09 +0200)]
docs-xml: document "server max protocol" SMB3 and SMB3_00

metze

11 years agodocs-xml: fix reference from "server min protocol" to "server max protocol"
Stefan Metzmacher [Sun, 3 Jun 2012 21:12:57 +0000 (23:12 +0200)]
docs-xml: fix reference from "server min protocol" to "server max protocol"

metze

11 years agoselftest/Samba3: 'server max protocol = SMB3'
Stefan Metzmacher [Fri, 18 May 2012 08:43:18 +0000 (10:43 +0200)]
selftest/Samba3: 'server max protocol = SMB3'

metze

11 years agolib/param: add "SMB3" as alias for PROTOCOL_SMB3_00
Stefan Metzmacher [Sun, 3 Jun 2012 21:03:54 +0000 (23:03 +0200)]
lib/param: add "SMB3" as alias for PROTOCOL_SMB3_00

metze

11 years agos3:smbd: remove now unused invalidate_all_vuids()
Stefan Metzmacher [Sun, 3 Jun 2012 15:02:16 +0000 (17:02 +0200)]
s3:smbd: remove now unused invalidate_all_vuids()

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

metze

11 years agos3:smbd: remove now unused conn_close_all()
Michael Adam [Tue, 22 May 2012 11:23:13 +0000 (13:23 +0200)]
s3:smbd: remove now unused conn_close_all()

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

11 years agos3:smbd: use smbXsrv_session_logoff_all() and smb1srv_tcon_disconnect_all() in exit_s...
Michael Adam [Tue, 22 May 2012 11:18:06 +0000 (13:18 +0200)]
s3:smbd: use smbXsrv_session_logoff_all() and smb1srv_tcon_disconnect_all() in exit_server_common()

This removes the use of conn_close_all() and invalidate_all_vuids()

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

11 years agos3:smbd: make use of smbXsrv_session for smb1
Stefan Metzmacher [Sun, 1 Apr 2012 19:19:53 +0000 (21:19 +0200)]
s3:smbd: make use of smbXsrv_session for smb1

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

metze

11 years agos3:smbd: make use of smbXsrv_tcon for smb1
Stefan Metzmacher [Wed, 28 Mar 2012 14:14:09 +0000 (16:14 +0200)]
s3:smbd: make use of smbXsrv_tcon for smb1

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

metze

11 years agos3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2
Stefan Metzmacher [Tue, 27 Mar 2012 09:09:05 +0000 (11:09 +0200)]
s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2

The removes the protocol specific smbd_smb2_session and
smbd_smb2_tcon.

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

metze

11 years agos3:smb2_sesssetup: add support for SMB 2.24/3.00 signing
Stefan Metzmacher [Fri, 16 Mar 2012 14:01:27 +0000 (15:01 +0100)]
s3:smb2_sesssetup: add support for SMB 2.24/3.00 signing

metze

11 years agos3:smb2_sesssetup: make use of the smbXsrv_session infrastructure
Stefan Metzmacher [Fri, 16 Mar 2012 14:01:27 +0000 (15:01 +0100)]
s3:smb2_sesssetup: make use of the smbXsrv_session infrastructure

We still have smbd_smb2_session as primary structure,
but that will went away once we got rid of smbd_smb2_tcon.

metze

11 years agos3:smbXsrv_session: init and disconnect smbXsrv_tcon for SMB2/3
Stefan Metzmacher [Mon, 4 Jun 2012 08:30:27 +0000 (10:30 +0200)]
s3:smbXsrv_session: init and disconnect smbXsrv_tcon for SMB2/3

metze

11 years agos3:smbd: add smbXsrv_tcon infrastructure
Stefan Metzmacher [Fri, 16 Mar 2012 15:32:28 +0000 (16:32 +0100)]
s3:smbd: add smbXsrv_tcon infrastructure

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

metze

11 years agos3:smbXsrv.idl: add smbXsrv_tcon* structures
Stefan Metzmacher [Fri, 16 Mar 2012 15:18:40 +0000 (16:18 +0100)]
s3:smbXsrv.idl: add smbXsrv_tcon* structures

struct smbXsrv_tcon will represent a SMB 1 or SMB 2
tree connect. It will replace 'struct smbd_smb2_tcon' and
'connection_struct' will be changed to handle just the protocol
independent glue for the SMB_VFS layer.

metze

11 years agosq smbXsrv_session_global_store no connection
Stefan Metzmacher [Mon, 25 Jun 2012 07:17:40 +0000 (09:17 +0200)]
sq smbXsrv_session_global_store no connection

11 years agos3:smbd: add smbXsrv_session infrastructure
Stefan Metzmacher [Thu, 15 Dec 2011 13:45:56 +0000 (14:45 +0100)]
s3:smbd: add smbXsrv_session infrastructure

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

metze

11 years agos3:smbXsrv.idl: add smbXsrv_session* structures
Stefan Metzmacher [Thu, 15 Dec 2011 13:45:56 +0000 (14:45 +0100)]
s3:smbXsrv.idl: add smbXsrv_session* structures

struct smbXsrv_session will represent a SMB 1 or SMB 2
session. It will replace 'struct smbd_smb2_session' and
'user_struct' will be changed to handle just the protocol
independent glue for the SMB_VFS layer.

metze

11 years agos3:smbd: add smbXsrv_version_* infrastructure
Stefan Metzmacher [Tue, 8 May 2012 14:01:21 +0000 (16:01 +0200)]
s3:smbd: add smbXsrv_version_* infrastructure

metze

11 years agos3:librpc/idl/smbXsrv.idl: add smbXsrv_version_* structures
Stefan Metzmacher [Tue, 8 May 2012 13:57:22 +0000 (15:57 +0200)]
s3:librpc/idl/smbXsrv.idl: add smbXsrv_version_* structures

metze

11 years agos3:librpc: add smbXsrv.idl
Stefan Metzmacher [Thu, 15 Dec 2011 13:45:56 +0000 (14:45 +0100)]
s3:librpc: add smbXsrv.idl

metze

11 years agos3:test: make shell code more porable by elimnating "local" keyword
Björn Jacke [Mon, 25 Jun 2012 15:12:35 +0000 (17:12 +0200)]
s3:test: make shell code more porable by elimnating "local" keyword

don't use "local". That is BASH only.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Mon Jun 25 19:02:13 CEST 2012 on sn-devel-104

11 years agos3: Fix a typo
Volker Lendecke [Mon, 25 Jun 2012 09:07:22 +0000 (11:07 +0200)]
s3: Fix a typo

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 25 17:13:59 CEST 2012 on sn-devel-104

11 years agos3: Avoid a call to server_event_context()
Volker Lendecke [Mon, 25 Jun 2012 09:07:06 +0000 (11:07 +0200)]
s3: Avoid a call to server_event_context()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4-join: Setup correct DNS configuration
Andrew Bartlett [Sun, 24 Jun 2012 11:10:34 +0000 (21:10 +1000)]
s4-join: Setup correct DNS configuration

This means we do not need to run samba_upgradedns any more.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jun 24 18:10:10 CEST 2012 on sn-devel-104

11 years agos4-samba_upgradedns: Do not set DNS account for internal server
Andrew Bartlett [Sun, 24 Jun 2012 10:52:06 +0000 (20:52 +1000)]
s4-samba_upgradedns: Do not set DNS account for internal server

The internal DNS server does not need the samba-only NAME-dns
account.

Andrew Bartlett

11 years agos4-join: Import DNS zones in AD DC join
Andrew Bartlett [Thu, 21 Jun 2012 13:46:21 +0000 (23:46 +1000)]
s4-join: Import DNS zones in AD DC join

11 years agoselftest: Test unix.whoami with kerberos on plugin_s4_dc
Andrew Bartlett [Sun, 24 Jun 2012 08:16:48 +0000 (18:16 +1000)]
selftest: Test unix.whoami with kerberos on plugin_s4_dc

This also tests the comparison with LDAP on anonymous connections
and marks this as knownfail, while we investigate the correct
behaviour here.

Andrew Bartlett

11 years agos4-classicupgrade: Allow DNS backend to be specified
Andrew Bartlett [Sun, 24 Jun 2012 06:31:37 +0000 (16:31 +1000)]
s4-classicupgrade: Allow DNS backend to be specified

11 years agos4-drepl: Ensure that the op->source does not get deallocated too early
Andrew Bartlett [Thu, 21 Jun 2012 23:42:02 +0000 (09:42 +1000)]
s4-drepl: Ensure that the op->source does not get deallocated too early

We need to have the struct dreplsrv_partition_source_dsa around until the end of the
async op, so we use talloc_reference after carefully checking the callers and
making the modifications required.

This prevents a crash when replicating partitions in the vampire_dc test after
adding DNS replication at join time.

Andrew Bartlett

11 years agoselftest: schema is not automatically reloaded now so if you modify it you have to...
Matthieu Patou [Tue, 12 Jun 2012 19:23:52 +0000 (12:23 -0700)]
selftest: schema is not automatically reloaded now so if you modify it you have to reload it

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Sat Jun 23 10:48:13 CEST 2012 on sn-devel-104

11 years agos4-dsdb: operational handle modifyTimeStamp on the CN=aggregate DN
Matthieu Patou [Fri, 18 May 2012 06:58:36 +0000 (23:58 -0700)]
s4-dsdb: operational handle modifyTimeStamp on the CN=aggregate DN

modifyTimeStamp is a generated attribute, for most object it's generated
directly from the whenChanged attribute. But for the CN=aggregate object
in the schema we have to handle it in a different way, that's because
for this object whenChanged!=modifyTimeStamp (as checked against Windows
2003R2 DCs) instead the modifyTimeStamp reflect the timestamp of the
most recently modified and loaded schema object (that is to the one with
the highest USN before the schema was reload due to timeout or by the
reloadSchemaNow command).
Some third party are using this information to know if they have to
update their schema cache and also to check that schema updates have
been correctly reloaded by the DC, a good example of this behavior is
exchange 2010.

11 years agos4-schema: improve the documentation of the dsdb_schema structure
Matthieu Patou [Mon, 11 Jun 2012 05:44:12 +0000 (22:44 -0700)]
s4-schema: improve the documentation of the dsdb_schema structure

11 years agos4-dsdb: Check for key SCHEMA_SEQ_NUM in metadata.tdb updates
Matthieu Patou [Tue, 22 May 2012 22:13:04 +0000 (15:13 -0700)]
s4-dsdb: Check for key SCHEMA_SEQ_NUM in metadata.tdb updates

If the value has changed then reload the schema, this means that now the
schema is only reloaded on a periodical basis or if we have been asked
explicitly to do it and not necesserly if the schema partition has
changed.

11 years agos4-dsdb: Add/Update SCHEMA_SEQ_NUM key in the metadata.tdb after schemaUpdateNow
Matthieu Patou [Wed, 30 May 2012 17:43:27 +0000 (10:43 -0700)]
s4-dsdb: Add/Update SCHEMA_SEQ_NUM key in the metadata.tdb after schemaUpdateNow

The idea is to signal to other process accessing the database that the
schema was forced to be reloaded and so they should reload as well.

11 years agos4-drs: if schema has changed during replication notify other process that they have...
Matthieu Patou [Wed, 30 May 2012 17:42:56 +0000 (10:42 -0700)]
s4-drs: if schema has changed during replication notify other process that they have to reload the schema

11 years agos4-dsdb: move schema_load at the top of module stack
Matthieu Patou [Wed, 30 May 2012 17:41:56 +0000 (10:41 -0700)]
s4-dsdb: move schema_load at the top of module stack

11 years agos4-extended: do not try to fix if there is no schema
Matthieu Patou [Wed, 30 May 2012 17:57:06 +0000 (10:57 -0700)]
s4-extended: do not try to fix if there is no schema

11 years agos4-schema: keep track of the timestamp of the most recently changed/created object
Matthieu Patou [Tue, 22 May 2012 23:25:50 +0000 (16:25 -0700)]
s4-schema: keep track of the timestamp of the most recently changed/created object

11 years agos4-schema: generalized time use its own syntax now
Matthieu Patou [Fri, 18 May 2012 06:59:06 +0000 (23:59 -0700)]
s4-schema: generalized time use its own syntax now

11 years agoldb: lay foundation for proper utc/generalized time handling
Matthieu Patou [Fri, 18 May 2012 06:57:55 +0000 (23:57 -0700)]
ldb: lay foundation for proper utc/generalized time handling

We use to handle UTCtime and generalized time the same way. The thing is
that it's not the case, they are different in the way they are set (most
of the time) with different format and also stored and return in
different format too.

11 years agos4-drsuapi: Fix a const warning
Matthieu Patou [Thu, 17 May 2012 06:52:51 +0000 (23:52 -0700)]
s4-drsuapi: Fix a const warning

11 years agos4-drsuapi: rework the crackname implementation of functionnal names
Matthieu Patou [Thu, 17 May 2012 06:52:30 +0000 (23:52 -0700)]
s4-drsuapi: rework the crackname implementation of functionnal names

11 years agos4-dsdb-linkedattributes: register the VERIFY_NAME control, handle it when we are...
Matthieu Patou [Wed, 16 May 2012 02:25:25 +0000 (19:25 -0700)]
s4-dsdb-linkedattributes: register the VERIFY_NAME control, handle it when we are a GC

In theory when presented this control and not a GC we should use the
specified name as the DC to contact for cross-domain link verification.
But for the moment we don't support this so we just fail when we have
this control and are not a GC.

11 years agos4-ldap: handle VERIFY_NAME control encoding/decoding
Matthieu Patou [Tue, 15 May 2012 18:15:38 +0000 (11:15 -0700)]
s4-ldap: handle VERIFY_NAME control encoding/decoding

11 years agoldb: add the VERIFY_NAME control
Matthieu Patou [Tue, 15 May 2012 17:14:55 +0000 (10:14 -0700)]
ldb: add the VERIFY_NAME control

11 years agos4-dsdb: support otherWellKnownObjects
Matthieu Patou [Tue, 15 May 2012 03:16:11 +0000 (20:16 -0700)]
s4-dsdb: support otherWellKnownObjects

11 years agos4-dsdb: Try to avoid much of the time a db search for msDS-IntID
Matthieu Patou [Sat, 12 May 2012 09:13:42 +0000 (02:13 -0700)]
s4-dsdb: Try to avoid much of the time a db search for msDS-IntID

We search in the schema if we have already this intid (using dsdb_attribute_by_attributeID_id because
in the range 0x80000000 0xBFFFFFFFF, attributeID is a DSDB_ATTID_TYPE_INTID).
If so generate another random value.
If not check if the highest USN in the database for the schema partition is the
one that we know.
If so it means that's only this ldb context that is touching the schema in the database.
If not it means that's someone else has modified the database while we are doing our changes too
(this case should be very bery rare) in order to be sure do the search in the database.

11 years agodsdb-schema: do not reload more often than schema_reload_interval
Matthieu Patou [Thu, 10 May 2012 05:08:55 +0000 (22:08 -0700)]
dsdb-schema: do not reload more often than schema_reload_interval

Samba 4 use to try to reload the schema every time dsdb_get_schema was
called (which could be 20+ time per ldb request). Now we only reload at
most every xx seconds (xx being the value of dsdb:"schema_reload_interval"
 or 120). The timestamp of the last reloaded schema is kept in the
 dsdb_schema object. There is also a timestamp in the ldb_context, that
 is used by the LDAP server to know if it has to reload the schema after
 handling the request. This is used to allow that the schema will be
 immediately reload after a schemaUpdateNow request has been issued, the
 reload can't occur in the handling of the LDAP request itself because
 we have a transaction autostarted.

11 years agos4-dsdb: fix a warning about unused variable
Matthieu Patou [Wed, 30 May 2012 06:03:09 +0000 (23:03 -0700)]
s4-dsdb: fix a warning about unused variable

11 years agos3: Correct documentation of case sensitive
Olaf Flebbe [Fri, 28 Oct 2011 07:59:07 +0000 (09:59 +0200)]
s3: Correct documentation of case sensitive

this fixes bug #8552

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Jun 22 21:59:59 CEST 2012 on sn-devel-104

11 years agos3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
Volker Lendecke [Fri, 22 Jun 2012 13:46:13 +0000 (15:46 +0200)]
s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs

gpfs2smb_acl can leave errno!=0 around even if it returned a correct
result!=NULL. We can only rely on errno being set if another error
condition (in this case result==NULL) indicates an error. If
result!=NULL, errno is undefined and can be anything. This leads to
SAFE_FREE(result) further down even in the success case.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104

11 years agos3: Give machine password changes 10 minutes of time
Volker Lendecke [Fri, 22 Jun 2012 12:26:45 +0000 (14:26 +0200)]
s3: Give machine password changes 10 minutes of time

This is what we do at domain join time as well, see
lib/netapi/joindomain.c:141

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:torture:smb2: pass smb2-session-reconnect test (add generosity in error case)
Michael Adam [Wed, 18 Apr 2012 15:55:51 +0000 (17:55 +0200)]
s3:torture:smb2: pass smb2-session-reconnect test (add generosity in error case)

samba checks tree before file, so we get a
STATUS_NETWORK_NAME_DELETED instead STATUS_FILE_CLOSED
when operating on a file handle on a invalid tree id.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap: don't ignore the result of dbwrap_parse_record in dbwrap_fetch_int32()
Stefan Metzmacher [Fri, 22 Jun 2012 13:10:00 +0000 (15:10 +0200)]
dbwrap: don't ignore the result of dbwrap_parse_record in dbwrap_fetch_int32()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 17:10:52 CEST 2012 on sn-devel-104

11 years agodbwrap: intialize state.status in dbwrap_fetch_int32()
Stefan Metzmacher [Fri, 22 Jun 2012 13:08:22 +0000 (15:08 +0200)]
dbwrap: intialize state.status in dbwrap_fetch_int32()

This might not be needed, but it makes it more clear that
we won't use uninitialized memory, it the callback was not triggered.

metze

11 years agodbwrap: Convert fetch_int32 to dbwrap_parse_record
Volker Lendecke [Tue, 12 Jun 2012 10:58:47 +0000 (12:58 +0200)]
dbwrap: Convert fetch_int32 to dbwrap_parse_record

Now dbwrap_fetch_int32 is used in smbd/locking/posix.c is used a
lot more often than before.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3: Remove reduce_windows_lock_ref_count, used only once
Volker Lendecke [Tue, 12 Jun 2012 10:14:59 +0000 (12:14 +0200)]
s3: Remove reduce_windows_lock_ref_count, used only once

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3: Make reduce_windows_lock_ref_count static
Volker Lendecke [Tue, 12 Jun 2012 10:13:15 +0000 (12:13 +0200)]
s3: Make reduce_windows_lock_ref_count static

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3: Use dbwrap_util for windows_lock_ref_count
Volker Lendecke [Tue, 12 Jun 2012 10:11:40 +0000 (12:11 +0200)]
s3: Use dbwrap_util for windows_lock_ref_count

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap: Add dbwrap_fetch_int32
Volker Lendecke [Fri, 15 Jun 2012 08:52:07 +0000 (10:52 +0200)]
dbwrap: Add dbwrap_fetch_int32

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap: Add dbwrap_change_int32_atomic
Volker Lendecke [Fri, 15 Jun 2012 08:50:00 +0000 (10:50 +0200)]
dbwrap: Add dbwrap_change_int32_atomic

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agoscript/autobuild: fix path to random-sleep.sh
Stefan Metzmacher [Fri, 22 Jun 2012 12:58:25 +0000 (14:58 +0200)]
script/autobuild: fix path to random-sleep.sh

metze

11 years agoselftest/knownfail: mark ^samba4.raw.session.expire1 as knownfail
Stefan Metzmacher [Fri, 22 Jun 2012 10:58:04 +0000 (12:58 +0200)]
selftest/knownfail: mark ^samba4.raw.session.expire1 as knownfail

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 15:03:16 CEST 2012 on sn-devel-104

11 years agos4:torture/raw: add raw.session.expire1
Stefan Metzmacher [Fri, 22 Jun 2012 09:02:39 +0000 (11:02 +0200)]
s4:torture/raw: add raw.session.expire1

This demonstrates the interaction of CAP_DYNAMIC_REAUTH
and NT_STATUS_NETWORK_SESSION_EXPIRED.

metze

11 years agos3:smbd: fix warning in smbd_tevent_trace_callback() without profile support
Stefan Metzmacher [Fri, 22 Jun 2012 10:10:00 +0000 (12:10 +0200)]
s3:smbd: fix warning in smbd_tevent_trace_callback() without profile support

metze

11 years agos3:serverid: don't ignore the result of dbwrap_parse_record()
Stefan Metzmacher [Fri, 22 Jun 2012 10:20:54 +0000 (12:20 +0200)]
s3:serverid: don't ignore the result of dbwrap_parse_record()

metze

11 years agos4:torture/smb2: run smb2.session.reauth5 in a subdirectory
Stefan Metzmacher [Fri, 22 Jun 2012 07:40:53 +0000 (09:40 +0200)]
s4:torture/smb2: run smb2.session.reauth5 in a subdirectory

This way we can give anonymous full access to the directory.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 11:30:06 CEST 2012 on sn-devel-104

11 years agotdb: don't use err.h in tests.
Rusty Russell [Fri, 22 Jun 2012 05:37:44 +0000 (15:07 +0930)]
tdb: don't use err.h in tests.

It's not portable.  While we could use ccan/err, it seems overkill since
we actually only use it in one test (I obviously cut & paste the #include).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Fri Jun 22 09:22:28 CEST 2012 on sn-devel-104

11 years agotdb: make TDB_NOSYNC merely disable sync.
Rusty Russell [Fri, 22 Jun 2012 05:37:44 +0000 (15:07 +0930)]
tdb: make TDB_NOSYNC merely disable sync.

(As suggested by Stefan Metzmacher, based on the change to ntdb.)

Since commit ec96ea690edbe3398d690b4a953d487ca1773f1c, we handle the case
where a process dies during a transaction commit.  Unfortunately, TDB_NOSYNC
means this no longer works, as it disables the recovery area as well as the
actual msync/fsync.  We should do everything except the syncs.

This also means we can do a complete test with $TDB_NO_FSYNC set; just
to get more complete coverage, we disable it explicitly for one test
(where we override the actual sync calls anyway).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: dbwrap_hash_size().
Rusty Russell [Fri, 22 Jun 2012 05:37:44 +0000 (15:07 +0930)]
dbwrap: dbwrap_hash_size().

Implemented for ntdb and tdb; falls back to 0 for others.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: dbwrap_name().
Rusty Russell [Fri, 22 Jun 2012 05:37:44 +0000 (15:07 +0930)]
dbwrap: dbwrap_name().

Useful for debug messages: particularly once we start switching between .tdb
and .ntdb files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: dbwrap_transaction_start_nonblock().
Rusty Russell [Fri, 22 Jun 2012 05:37:44 +0000 (15:07 +0930)]
dbwrap: dbwrap_transaction_start_nonblock().

Implemented for ntdb and tdb; falls back to the blocking variant
for others.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: dbwrap_fetch_locked_timeout().
Rusty Russell [Fri, 22 Jun 2012 05:37:44 +0000 (15:07 +0930)]
dbwrap: dbwrap_fetch_locked_timeout().

Implemented for ntdb and tdb; falls back to the non-timeout variant
for others.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: add dbwrap_check() function.
Rusty Russell [Fri, 22 Jun 2012 05:37:43 +0000 (15:07 +0930)]
dbwrap: add dbwrap_check() function.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: dbwrap_local_open()
Rusty Russell [Fri, 22 Jun 2012 05:37:43 +0000 (15:07 +0930)]
dbwrap: dbwrap_local_open()

This simply opens a tdb: it will eventually switch depending on the
extension.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodbwrap: remove get_flags().
Rusty Russell [Fri, 22 Jun 2012 05:37:43 +0000 (15:07 +0930)]
dbwrap: remove get_flags().

The flags returned were TDB-specific: this was only used for detecting
the endianness of obsolete databases (the conversion code was put in in
2003, with reference to Samba 2.3).

It's easier to remove it than to translate the NTDB flags to TDB flags,
and it's a really weird thing to ask for anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoutil_tdb: move timeout chainlock variants from source3/lib/util/util_tdb.c
Rusty Russell [Fri, 22 Jun 2012 05:37:36 +0000 (15:07 +0930)]
util_tdb: move timeout chainlock variants from source3/lib/util/util_tdb.c

We're about to use them for dbwrap.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoutil: util_ntdb ntdb_fetch_int32/ntdb_store_int32 and ntdb_add_int32_atomic
Rusty Russell [Fri, 22 Jun 2012 00:14:42 +0000 (09:44 +0930)]
util: util_ntdb ntdb_fetch_int32/ntdb_store_int32 and ntdb_add_int32_atomic

Similar to the util_tdb versions, but return the error code.

ntdb_add_int32_atomic seems a clearer name than tdb_change_int32_atomic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoutil: util_ntdb.c gets NTDB_ERROR => NTSTATUS map.
Rusty Russell [Fri, 22 Jun 2012 00:14:41 +0000 (09:44 +0930)]
util: util_ntdb.c gets NTDB_ERROR => NTSTATUS map.

Very similar to the tdb version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agoutil: util_ntdb.c gains bystring functions.
Rusty Russell [Fri, 22 Jun 2012 00:14:41 +0000 (09:44 +0930)]
util: util_ntdb.c gains bystring functions.

Very similar to the util_tdb versions, but these return the error.
I've only implemented those functions actually used.

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