ira/wip.git
12 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

12 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

12 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

12 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

12 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

12 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

12 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

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

metze

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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

12 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>

12 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>

12 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>

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>

12 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>

12 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>

12 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>

12 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>

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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>
12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 years agos3:client: close the socket if receive_smb_raw() fails
Stefan Metzmacher [Fri, 8 Jul 2011 07:30:58 +0000 (09:30 +0200)]
s3:client: close the socket if receive_smb_raw() fails

metze

12 years agos3:client: use cli_nt_error() in order to avoid cli_errstr()
Stefan Metzmacher [Fri, 8 Jul 2011 07:29:29 +0000 (09:29 +0200)]
s3:client: use cli_nt_error() in order to avoid cli_errstr()

metze

12 years agos3:client: avoid cli_errstr() where we already have an NTSTATUS
Stefan Metzmacher [Fri, 8 Jul 2011 07:16:20 +0000 (09:16 +0200)]
s3:client: avoid cli_errstr() where we already have an NTSTATUS

metze

12 years agos3:clitar: avoid usage of cli_errstr()
Stefan Metzmacher [Fri, 8 Jul 2011 00:13:23 +0000 (02:13 +0200)]
s3:clitar: avoid usage of cli_errstr()

metze

12 years agos3:libsmb: remove use of cli_errstr() in SMBC_server_internal()
Stefan Metzmacher [Thu, 7 Jul 2011 23:55:26 +0000 (01:55 +0200)]
s3:libsmb: remove use of cli_errstr() in SMBC_server_internal()

metze

12 years agos3:auth_server: use cli->is_guestlogin instead of parsing cli->inbuf.
Stefan Metzmacher [Fri, 8 Jul 2011 10:59:32 +0000 (12:59 +0200)]
s3:auth_server: use cli->is_guestlogin instead of parsing cli->inbuf.

cli->inbuf is not the valid response buffer of the session setup response.

metze

12 years agos3:auth: remove unused variable
Stefan Metzmacher [Fri, 8 Jul 2011 11:57:33 +0000 (13:57 +0200)]
s3:auth: remove unused variable

metze

12 years agos3:auth_unix: remove unused var
Stefan Metzmacher [Fri, 8 Jul 2011 09:24:19 +0000 (11:24 +0200)]
s3:auth_unix: remove unused var

metze

12 years agos3:smb2_server: add some comments about change_to_user() and change_to_root_user()
Stefan Metzmacher [Fri, 8 Jul 2011 07:08:39 +0000 (09:08 +0200)]
s3:smb2_server: add some comments about change_to_user() and change_to_root_user()

metze

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

12 years agolib/param: Merge struct loadparm_service into common
Andrew Bartlett [Thu, 7 Jul 2011 23:19:43 +0000 (09:19 +1000)]
lib/param: Merge struct loadparm_service into common

This is handled by a common header and a .c file that is included into
both loadparm.c files.

In the process, _lp functions were renamed to lp__ to allow the common
function definition declarations to be used by source3 and source4
(which have different macro definitions).

The only parameter to change type is 'strict_locking' which was a
bool, and is now an int, to accommodate the 'Auto' value from source3.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jul  8 12:35:56 CEST 2011 on sn-devel-104