samba.git
8 years agodynconfig: add SambaIndentedHelpFormatter in order to support \n in option help text
Stefan Metzmacher [Tue, 21 Jun 2011 15:46:36 +0000 (17:46 +0200)]
dynconfig: add SambaIndentedHelpFormatter in order to support \n in option help text

metze

8 years agodynconfig: remember which options still have their default value
Stefan Metzmacher [Tue, 21 Jun 2011 10:09:40 +0000 (12:09 +0200)]
dynconfig: remember which options still have their default value

If the values are explicit specified on the command line, we need to
keep them.

metze

8 years agodynconfig: use an option group for the samba specific options
Stefan Metzmacher [Tue, 21 Jun 2011 10:07:17 +0000 (12:07 +0200)]
dynconfig: use an option group for the samba specific options

metze

8 years agoRevert "s4-build Change default paths and --with flags for a 4.0 release"
Stefan Metzmacher [Mon, 20 Jun 2011 16:02:04 +0000 (18:02 +0200)]
Revert "s4-build Change default paths and --with flags for a 4.0 release"

This reverts commit edd3e8b03aa0bca85d4a9a62b35471e76a1f9390.

8 years agoRevert "build: Put lockdir and cachedir in FHS-like locations by default"
Stefan Metzmacher [Mon, 20 Jun 2011 16:02:00 +0000 (18:02 +0200)]
Revert "build: Put lockdir and cachedir in FHS-like locations by default"

This reverts commit 6c9a78074a429773cefd1a3c798b7e3ad7d4c325.

8 years agoldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique value test...
Matthieu Patou [Tue, 12 Jul 2011 15:22:35 +0000 (19:22 +0400)]
ldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique value test should be performed or not

The function ltdb_add_internal is called either from ltdb_add or
ltdb_rename. In case of add we enforce the unique test (unless it has
been relaxed by a upper module through the
LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK flag), but for rename as it
is translated by a delete + a add we relax the test as we can have one
or more attribute which are supposed to be single valued but that are
not (ie. when we have a couple of deleted value on a single valued
attribute), we have already done the tests on insert so make the
assumption that the values are OK.

Without this patch deleting a subnet that has been affected to more than
one site fails as the delete is in fact a rename to GUID\0DEL ... with
an attribute siteObject that has 1 active link value and 1 inactive link
value

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Jul 13 02:29:20 CEST 2011 on sn-devel-104

8 years agos3:libsmb: remove unused cli_smb_inbuf()
Stefan Metzmacher [Tue, 12 Jul 2011 14:18:10 +0000 (16:18 +0200)]
s3:libsmb: remove unused cli_smb_inbuf()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul 13 01:19:51 CEST 2011 on sn-devel-104

8 years agos3: dbwrap_ctdb.c: fix #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue (bug #8303)
Björn Baumbach [Tue, 12 Jul 2011 15:32:55 +0000 (17:32 +0200)]
s3: dbwrap_ctdb.c: fix #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue (bug #8303)

Check for HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL instead of
CTDB_CONTROL_SCHEDULE_FOR_DELETION, which is an enum member and not a
define.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 18:56:30 CEST 2011 on sn-devel-104

8 years agos4:libcli/raw: s/SMBchkpth/SMBcheckpath
Stefan Metzmacher [Tue, 12 Jul 2011 07:26:53 +0000 (09:26 +0200)]
s4:libcli/raw: s/SMBchkpth/SMBcheckpath

metze

8 years agos4:winsdb: place wins.ldb in "state dir" instead of "lock dir"
Stefan Metzmacher [Tue, 12 Jul 2011 11:52:54 +0000 (13:52 +0200)]
s4:winsdb: place wins.ldb in "state dir" instead of "lock dir"

It's not only a cache as we also support static records.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 16:16:45 CEST 2011 on sn-devel-104

8 years agoselftest/Samba4: use "state dir" for persistent files
Stefan Metzmacher [Tue, 12 Jul 2011 11:14:41 +0000 (13:14 +0200)]
selftest/Samba4: use "state dir" for persistent files

metze

8 years agos4:provision: place the sysvol share under "state dir" instead of "lock dir"
Stefan Metzmacher [Tue, 12 Jul 2011 11:49:18 +0000 (13:49 +0200)]
s4:provision: place the sysvol share under "state dir" instead of "lock dir"

metze

8 years agoselftest/Samba4: setup "state dir" and "cache dir"
Stefan Metzmacher [Tue, 12 Jul 2011 11:12:50 +0000 (13:12 +0200)]
selftest/Samba4: setup "state dir" and "cache dir"

metze

8 years agos4:param: add "state dir" and "cache dir" options
Stefan Metzmacher [Tue, 12 Jul 2011 11:04:08 +0000 (13:04 +0200)]
s4:param: add "state dir" and "cache dir" options

metze

8 years agos3:libsmb: remove unused cli_oplock_handler()
Stefan Metzmacher [Tue, 12 Jul 2011 07:20:02 +0000 (09:20 +0200)]
s3:libsmb: remove unused cli_oplock_handler()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 10:53:52 CEST 2011 on sn-devel-104

8 years agos4:libcli/raw: remove SMBkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:57:34 +0000 (08:57 +0200)]
s4:libcli/raw: remove SMBkeepalive

metze

8 years agos4:smb_server: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:56:53 +0000 (08:56 +0200)]
s4:smb_server: s/SMBkeepalive/NBSSkeepalive

metze

8 years agos3:include: remove SMBkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:57:14 +0000 (08:57 +0200)]
s3:include: remove SMBkeepalive

metze

8 years agos3:smbd: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:55:58 +0000 (08:55 +0200)]
s3:smbd: s/SMBkeepalive/NBSSkeepalive

metze

8 years agos3:libsmb: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:55:26 +0000 (08:55 +0200)]
s3:libsmb: s/SMBkeepalive/NBSSkeepalive

metze

8 years agos3:lib: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:53:30 +0000 (08:53 +0200)]
s3:lib: s/SMBkeepalive/NBSSkeepalive

metze

8 years agolibcli/smb: add NBSS message types
Stefan Metzmacher [Tue, 12 Jul 2011 06:42:30 +0000 (08:42 +0200)]
libcli/smb: add NBSS message types

metze

8 years agos3:libsmb: remove unused cli->privileges
Stefan Metzmacher [Mon, 11 Jul 2011 20:08:10 +0000 (22:08 +0200)]
s3:libsmb: remove unused cli->privileges

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 09:30:49 CEST 2011 on sn-devel-104

8 years agos3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2
Stefan Metzmacher [Mon, 11 Jul 2011 20:23:56 +0000 (22:23 +0200)]
s3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2

metze

8 years agos3:loadparm: use PROTOCOL_SMB2_02 instead of PROTOCOL_SMB2
Stefan Metzmacher [Mon, 11 Jul 2011 20:22:49 +0000 (22:22 +0200)]
s3:loadparm: use PROTOCOL_SMB2_02 instead of PROTOCOL_SMB2

metze

8 years agolibcli/smb: add PROTOCOL_SMB2_02 constant
Stefan Metzmacher [Mon, 11 Jul 2011 20:21:43 +0000 (22:21 +0200)]
libcli/smb: add PROTOCOL_SMB2_02 constant

metze

8 years agos3:smb2_create: use smbd_calculate_access_mask() instead of smbd_check_open_rights()
Stefan Metzmacher [Sun, 10 Jul 2011 11:09:06 +0000 (13:09 +0200)]
s3:smb2_create: use smbd_calculate_access_mask() instead of smbd_check_open_rights()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 22:45:01 CEST 2011 on sn-devel-104

8 years agos3:smb2_tcon: return the correct maximal_access on the share
Stefan Metzmacher [Sun, 10 Jul 2011 11:02:11 +0000 (13:02 +0200)]
s3:smb2_tcon: return the correct maximal_access on the share

metze

8 years agos3:smbd: return the real share access mask in the SMBtconX response
Stefan Metzmacher [Mon, 11 Jul 2011 14:12:57 +0000 (16:12 +0200)]
s3:smbd: return the real share access mask in the SMBtconX response

metze

8 years agos3:smbd: use smbd_calculate_access_mask() also for fake_files
Stefan Metzmacher [Sun, 10 Jul 2011 11:59:40 +0000 (13:59 +0200)]
s3:smbd: use smbd_calculate_access_mask() also for fake_files

metze

8 years agos3:smbd: check the share level access mask in smbd_calculate_access_mask()
Stefan Metzmacher [Sun, 10 Jul 2011 11:03:51 +0000 (13:03 +0200)]
s3:smbd: check the share level access mask in smbd_calculate_access_mask()

I think we should reject invalid access early,
before we might create new files.

Also smbd_check_open_rights() is only called if the file existed.

metze

8 years agos3:smbd: make smbd_calculate_access_mask() non-static
Stefan Metzmacher [Sun, 10 Jul 2011 11:00:25 +0000 (13:00 +0200)]
s3:smbd: make smbd_calculate_access_mask() non-static

metze

8 years agos3:smbd/msdfs: let create_conn_struct() check the share security descriptor
Stefan Metzmacher [Mon, 11 Jul 2011 16:09:44 +0000 (18:09 +0200)]
s3:smbd/msdfs: let create_conn_struct() check the share security descriptor

metze

8 years agos3:winbindd_cm: make use of cli->src_ss instead of calling getsockname()
Stefan Metzmacher [Mon, 11 Jul 2011 13:12:40 +0000 (15:12 +0200)]
s3:winbindd_cm: make use of cli->src_ss instead of calling getsockname()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 19:31:14 CEST 2011 on sn-devel-104

8 years agos3:winbindd_cm: make use of cli->dest_ss instead calling getpeername()
Stefan Metzmacher [Mon, 11 Jul 2011 12:58:41 +0000 (14:58 +0200)]
s3:winbindd_cm: make use of cli->dest_ss instead calling getpeername()

metze

8 years agos3:winbindd_cm: make use of cli_state_disconnect()
Stefan Metzmacher [Mon, 11 Jul 2011 12:38:52 +0000 (14:38 +0200)]
s3:winbindd_cm: make use of cli_state_disconnect()

metze

8 years agos3:winbindd_cm: make use of cli_state_is_connected()
Stefan Metzmacher [Mon, 11 Jul 2011 12:19:55 +0000 (14:19 +0200)]
s3:winbindd_cm: make use of cli_state_is_connected()

metze

8 years agos3:auth_server: use cli_echo() to check if the server is alive
Stefan Metzmacher [Mon, 11 Jul 2011 11:56:10 +0000 (13:56 +0200)]
s3:auth_server: use cli_echo() to check if the server is alive

This works over port 139 and also 445. send_keepalive() would
only work on port 139.

metze

8 years agos3:auth_server: make use of cli_state_is_connected()
Stefan Metzmacher [Mon, 11 Jul 2011 11:55:18 +0000 (13:55 +0200)]
s3:auth_server: make use of cli_state_is_connected()

metze

8 years agos3:client: simplify readline_callback() to only use cli_echo()
Stefan Metzmacher [Mon, 11 Jul 2011 11:19:47 +0000 (13:19 +0200)]
s3:client: simplify readline_callback() to only use cli_echo()

cli_echo() already swallows NBT keepalive messages,
so there's no need to filter them in the 'smbclient' layer.

metze

8 years agos3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()
Stefan Metzmacher [Mon, 11 Jul 2011 12:15:21 +0000 (14:15 +0200)]
s3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()

metze

8 years agos3:libsmbclient: don't log the lowlevel fd in smbc_free_context()
Stefan Metzmacher [Mon, 11 Jul 2011 12:29:28 +0000 (14:29 +0200)]
s3:libsmbclient: don't log the lowlevel fd in smbc_free_context()

metze

8 years agos3:libsmb: add cli_state_disconnect()
Stefan Metzmacher [Mon, 11 Jul 2011 12:33:54 +0000 (14:33 +0200)]
s3:libsmb: add cli_state_disconnect()

metze

8 years agos3:libsmb: make use of cli_state_is_connected()
Stefan Metzmacher [Mon, 11 Jul 2011 14:25:18 +0000 (16:25 +0200)]
s3:libsmb: make use of cli_state_is_connected()

metze

8 years agos3:libsmb: remove unused cli_set_port()
Stefan Metzmacher [Mon, 11 Jul 2011 14:37:25 +0000 (16:37 +0200)]
s3:libsmb: remove unused cli_set_port()

metze

8 years agos3:libsmb: also remember the local socket address after connect
Stefan Metzmacher [Mon, 11 Jul 2011 12:26:23 +0000 (14:26 +0200)]
s3:libsmb: also remember the local socket address after connect

metze

8 years agos3:smb2cli_base: add my copyright
Stefan Metzmacher [Mon, 11 Jul 2011 13:14:34 +0000 (15:14 +0200)]
s3:smb2cli_base: add my copyright

metze

8 years agos3-torture: run_locktest2(): replace check_error() with check_both_error()
Björn Baumbach [Mon, 11 Jul 2011 12:23:30 +0000 (14:23 +0200)]
s3-torture: run_locktest2(): replace check_error() with check_both_error()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-torture: run_locktest2(): replace cli_lock() with cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 12:20:14 +0000 (14:20 +0200)]
s3-torture: run_locktest2(): replace cli_lock() with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-torture: run_locktest1(): replace cli_lock() with cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 12:05:14 +0000 (14:05 +0200)]
s3-torture: run_locktest1(): replace cli_lock() with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-torture: locktest2: replace cli_lock() with cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 11:49:18 +0000 (13:49 +0200)]
s3-torture: locktest2: replace cli_lock() with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-torture: let wait_lock() use cli_lock32() instead of cli_lock()
Björn Baumbach [Mon, 11 Jul 2011 09:50:59 +0000 (11:50 +0200)]
s3-torture: let wait_lock() use cli_lock32() instead of cli_lock()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-libsmb: let cli_lock64 return NTSTATUS instead of bool
Björn Baumbach [Mon, 11 Jul 2011 09:19:21 +0000 (11:19 +0200)]
s3-libsmb: let cli_lock64 return NTSTATUS instead of bool

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 12:48:38 CEST 2011 on sn-devel-104

8 years agos3-libsmb: introduce cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 09:13:18 +0000 (11:13 +0200)]
s3-libsmb: introduce cli_lock32()

Same like cli_lock() but return NTSTATUS instead of bool

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agodbcheck: use get_lDAPDisplayName_by_attid()
Andrew Tridgell [Mon, 11 Jul 2011 04:28:19 +0000 (14:28 +1000)]
dbcheck: use get_lDAPDisplayName_by_attid()

this is better than doing a schema search inside the dbcheck code

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jul 11 07:43:18 CEST 2011 on sn-devel-104

8 years agodsdb: added get_lDAPDisplayName_by_attid
Andrew Tridgell [Mon, 11 Jul 2011 04:27:21 +0000 (14:27 +1000)]
dsdb: added get_lDAPDisplayName_by_attid

this allows conversion from a DRS attribute ID to a LDAP display name

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agodbcheck: improved error checking in fixup of missing metdata
Andrew Tridgell [Mon, 11 Jul 2011 04:05:30 +0000 (14:05 +1000)]
dbcheck: improved error checking in fixup of missing metdata

when fixing missing attributes in replPropertyMetaData, allow user to
confirm changes, and check for exceptions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agos4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets
Andrew Tridgell [Mon, 11 Jul 2011 03:45:50 +0000 (13:45 +1000)]
s4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agos4-drs: do not return links pointed to unexistant objects
Matthieu Patou [Thu, 7 Jul 2011 22:06:04 +0000 (02:06 +0400)]
s4-drs: do not return links pointed to unexistant objects

When an object is deleted, link pointed to it are marked as inactive.
When the same object is purged we do not remmove the link pointed to it
(we can't know them) so they stay in the database, it turns to be a
problem for Windows 2008.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-dirsync: do not return linked attribute if the target object is no more
Matthieu Patou [Thu, 7 Jul 2011 22:04:52 +0000 (02:04 +0400)]
s4-dirsync: do not return linked attribute if the target object is no more

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-dsdb: allow objectsid to be specified in a modification operation
Matthieu Patou [Wed, 6 Jul 2011 20:32:32 +0000 (00:32 +0400)]
s4-dsdb: allow objectsid to be specified in a modification operation

if we have the provision control, it's used by dbcheck

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-samba-tool: dbcheck, check and fix broken metadata
Matthieu Patou [Wed, 6 Jul 2011 20:31:21 +0000 (00:31 +0400)]
s4-samba-tool: dbcheck, check and fix broken metadata

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-python: Add functions to get linkid and systemflags of an attribute
Matthieu Patou [Wed, 6 Jul 2011 20:29:58 +0000 (00:29 +0400)]
s4-python: Add functions to get linkid and systemflags of an attribute

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-dsdb: if the provision control is specified, update replication metadata even...
Matthieu Patou [Wed, 6 Jul 2011 20:27:44 +0000 (00:27 +0400)]
s4-dsdb: if the provision control is specified, update replication metadata even if the data hasn't change

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agoupgradeprovision: reduce the number of attribute that we skip
Matthieu Patou [Tue, 5 Jul 2011 17:56:30 +0000 (21:56 +0400)]
upgradeprovision: reduce the number of attribute that we skip

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-provision: fix the value of creation timestamp to be a MS timestamp
Matthieu Patou [Sun, 3 Jul 2011 07:15:05 +0000 (11:15 +0400)]
s4-provision: fix the value of creation timestamp to be a MS timestamp

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-dsdb: when replacing linked attribute take always the new dn as the old dn might...
Matthieu Patou [Sun, 3 Jul 2011 18:21:29 +0000 (22:21 +0400)]
s4-dsdb: when replacing linked attribute take always the new dn as the old dn might be broken

The usual use case is that you have a not complete linked attribute (ie.
without the SID) if we keep using the old dn, then the SID will never be
added.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4-dsdb: check for single valued attribute in repl_meta_data module
Matthieu Patou [Sun, 3 Jul 2011 18:06:34 +0000 (22:06 +0400)]
s4-dsdb: check for single valued attribute in repl_meta_data module

This is needed because we can have more than 1 value in a single valued
attribute as we store also deleted values. So we do the check in repl_meta_data
and then indicate LDB to do the check.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agodbcheck: check all objects, including deleted objects
Andrew Tridgell [Mon, 11 Jul 2011 02:23:01 +0000 (12:23 +1000)]
dbcheck: check all objects, including deleted objects

this makes dbcheck search over all objects, deleted or not. This
matters because when another DC replicates from this DC it replicates
the deleted objects as well, so invalid attributes in deleted objects
can cause problems on the new DC (for example, windows can get stuck
or even crash during the replication)

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agos4-dsdb: deleted objects are expected to be missing mandatory attributes
Andrew Tridgell [Mon, 11 Jul 2011 02:20:27 +0000 (12:20 +1000)]
s4-dsdb: deleted objects are expected to be missing mandatory attributes

the objectclass_attrs validation that an object contains all mandatory
attributes is incorrect for deleted objects, as they get stripped of
some mandatory attributes when deleted (for example, objectCategory
gets stripped)

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agos4-dsdb: fixed crash bug in extended_dn_in
Andrew Tridgell [Mon, 11 Jul 2011 02:01:18 +0000 (12:01 +1000)]
s4-dsdb: fixed crash bug in extended_dn_in

when extended_dn_in fails to resolve a GUID extended DN component, the
debug code assumed that it was a search operation, and accessed
ac->req->op.search.base, which is not valid for non-search DN
expansions.

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agodbcheck: added confirm_all support for remaining checks
Andrew Tridgell [Mon, 11 Jul 2011 01:09:00 +0000 (11:09 +1000)]
dbcheck: added confirm_all support for remaining checks

this allows the user to choose all/none for all the remaining database
checks

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agodbcheck: use specified DB schema for non-LDAP URLs
Andrew Tridgell [Mon, 11 Jul 2011 00:53:52 +0000 (10:53 +1000)]
dbcheck: use specified DB schema for non-LDAP URLs

when connecting to a local database with -H we can use that databases
schema

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

8 years agosocket_wrapper: make sure interfaces are in the valid range on bind()
Stefan Metzmacher [Sun, 10 Jul 2011 14:40:37 +0000 (16:40 +0200)]
socket_wrapper: make sure interfaces are in the valid range on bind()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jul 10 18:24:14 CEST 2011 on sn-devel-104

8 years agos4:lib/socket: iface_list_wildcard() should only return "::" if we have ipv6 interfaces
Stefan Metzmacher [Sun, 10 Jul 2011 13:13:45 +0000 (15:13 +0200)]
s4:lib/socket: iface_list_wildcard() should only return "::" if we have ipv6 interfaces

If glibc has IPv6 support, but it's not enabled in the running kernel
we should not try to listen on "::".

metze

8 years agos3:smb2cli_tcon: use tevent_req_oom()
Stefan Metzmacher [Sun, 10 Jul 2011 15:09:11 +0000 (17:09 +0200)]
s3:smb2cli_tcon: use tevent_req_oom()

metze

8 years agos3: Fix Coverity ID 2587,2588: CHECKED_RETURN
Volker Lendecke [Sun, 10 Jul 2011 07:21:45 +0000 (09:21 +0200)]
s3: Fix Coverity ID 2587,2588: CHECKED_RETURN

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul 10 10:36:11 CEST 2011 on sn-devel-104

8 years agos3:smb2cli_base: ask for the next response if there're still pending requests
Stefan Metzmacher [Sat, 9 Jul 2011 08:13:15 +0000 (10:13 +0200)]
s3:smb2cli_base: ask for the next response if there're still pending requests

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul  9 13:55:04 CEST 2011 on sn-devel-104

8 years agos3:smb2cli_base: make use of tevent_req_defer_callback()
Stefan Metzmacher [Sat, 9 Jul 2011 08:12:11 +0000 (10:12 +0200)]
s3:smb2cli_base: make use of tevent_req_defer_callback()

In order to notify requests of transport layer errors,
we need to defer the triggering of the callbacks,
otherwise we may crash, if one of the callbacks
destroys the cli_state.

metze

8 years agos3:smb2cli_base: fix memory hierachy in smb2cli_req_recv()
Stefan Metzmacher [Fri, 8 Jul 2011 15:57:56 +0000 (17:57 +0200)]
s3:smb2cli_base: fix memory hierachy in smb2cli_req_recv()

We need to use talloc_reference() if there're more than one
response, but we use it in a way that the caller can't
call talloc_free() or talloc_unlink() on it.

metze

8 years agos3:smb2cli_base: call smb2cli_req_unset_pending() before tevent_req_done()
Stefan Metzmacher [Sat, 9 Jul 2011 08:42:21 +0000 (10:42 +0200)]
s3:smb2cli_base: call smb2cli_req_unset_pending() before tevent_req_done()

metze

8 years agos3:smb2cli_base: unset the destructor in smb2cli_req_unset_pending()
Stefan Metzmacher [Sat, 9 Jul 2011 08:40:30 +0000 (10:40 +0200)]
s3:smb2cli_base: unset the destructor in smb2cli_req_unset_pending()

metze

8 years agos3:smb2cli_base: keep the order of pending requests
Stefan Metzmacher [Sat, 9 Jul 2011 07:51:33 +0000 (09:51 +0200)]
s3:smb2cli_base: keep the order of pending requests

metze

8 years agos3:smb2cli_base: rename 'result' => 'req' in smb2cli_req_create()
Stefan Metzmacher [Fri, 8 Jul 2011 15:59:51 +0000 (17:59 +0200)]
s3:smb2cli_base: rename 'result' => 'req' in smb2cli_req_create()

metze

8 years agotevent: change version to 0.9.13 after adding tevent_req_defer_callback() tevent-0.9.13
Stefan Metzmacher [Fri, 8 Jul 2011 14:04:32 +0000 (16:04 +0200)]
tevent: change version to 0.9.13 after adding tevent_req_defer_callback()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul  9 12:16:44 CEST 2011 on sn-devel-104

8 years agotevent: add tevent_req_defer_callback()
Stefan Metzmacher [Fri, 8 Jul 2011 13:54:51 +0000 (15:54 +0200)]
tevent: add tevent_req_defer_callback()

metze

8 years agotevent: fix comments for tevent_req_post()
Stefan Metzmacher [Sat, 9 Jul 2011 09:01:10 +0000 (11:01 +0200)]
tevent: fix comments for tevent_req_post()

metze

8 years agoMove smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next to their...
Jeremy Allison [Fri, 8 Jul 2011 17:44:29 +0000 (10:44 -0700)]
Move smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next to their only user and make them static. Add comments.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jul  8 21:01:40 CEST 2011 on sn-devel-104

8 years agos3-waf: split out LIBCLI_WINREG_INTERNAL as LIBCLI_WINREG was pulling in rpc server...
Günther Deschner [Fri, 8 Jul 2011 15:17:17 +0000 (17:17 +0200)]
s3-waf: split out LIBCLI_WINREG_INTERNAL as LIBCLI_WINREG was pulling in rpc server code in undesired places.

Andreas, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jul  8 18:34:44 CEST 2011 on sn-devel-104

8 years agowinreg: Ensure server return status is set on success
David Disseldorp [Mon, 4 Jul 2011 09:59:36 +0000 (11:59 +0200)]
winreg: Ensure server return status is set on success

Currently cli_winreg.c functions only set the returned server werror
status on failure, if the server request succeeds the value remains
uninitialised.

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Jul  8 16:32:39 CEST 2011 on sn-devel-104

8 years agowinreg: Use the ntstatus return code for client side errors
David Disseldorp [Wed, 6 Jul 2011 10:19:05 +0000 (12:19 +0200)]
winreg: Use the ntstatus return code for client side errors

cli_winreg.c functions indicate status to the caller in two ways. The
ntstatus return code indicates client side errors, the pwerr argument
carries the server response error code.

Many functions are filling the pwerr argument on client side error, this
change removes these cases.

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agos3:libsmb: remove unused cli->inbuf and cli->bufsize
Stefan Metzmacher [Fri, 8 Jul 2011 11:02:51 +0000 (13:02 +0200)]
s3:libsmb: remove unused cli->inbuf and cli->bufsize

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul  8 15:21:46 CEST 2011 on sn-devel-104

8 years agos3:client: use an inbuf on the stack in readline_callback()
Stefan Metzmacher [Fri, 8 Jul 2011 10:41:20 +0000 (12:41 +0200)]
s3:client: use an inbuf on the stack in readline_callback()

metze

8 years agos3:libsmb: clistr_pull_talloc() doesn't need base_ptr and flags2 with STR_ASCII
Stefan Metzmacher [Fri, 8 Jul 2011 10:35:36 +0000 (12:35 +0200)]
s3:libsmb: clistr_pull_talloc() doesn't need base_ptr and flags2 with STR_ASCII

interpret_short_filename() always parses OEM_Strings (in DOS charset).

metze

8 years agos3:libsmb: remove unused smb_dos_errstr()
Stefan Metzmacher [Fri, 8 Jul 2011 09:05:31 +0000 (11:05 +0200)]
s3:libsmb: remove unused smb_dos_errstr()

metze

8 years agos3:libsmb/smberr: make global const arrays static
Stefan Metzmacher [Fri, 8 Jul 2011 08:54:53 +0000 (10:54 +0200)]
s3:libsmb/smberr: make global const arrays static

metze

8 years agos3:libsmb: don't use the cli->inbuf to store the last error
Stefan Metzmacher [Fri, 8 Jul 2011 08:52:22 +0000 (10:52 +0200)]
s3:libsmb: don't use the cli->inbuf to store the last error

We keep the raw error in cli->raw_status now, until we fixed all
caller to get the NTSTATUS from the function calls.

metze

8 years agos3:torture: use cli_is_nt/dos_error() in run_error_map_extract()
Stefan Metzmacher [Fri, 8 Jul 2011 11:34:38 +0000 (13:34 +0200)]
s3:torture: use cli_is_nt/dos_error() in run_error_map_extract()

Callers should avoid using cli->inbuf directly!

metze

8 years agos3:libsmb: don't call cli_set_error() in cli_echo()
Stefan Metzmacher [Fri, 8 Jul 2011 08:27:41 +0000 (10:27 +0200)]
s3:libsmb: don't call cli_set_error() in cli_echo()

cli_smb_recv() already does it.

metze

8 years agos3:libsmb: remove unused enum smb_read_errors infrastructure
Stefan Metzmacher [Fri, 8 Jul 2011 07:45:05 +0000 (09:45 +0200)]
s3:libsmb: remove unused enum smb_read_errors infrastructure

metze