kai/samba.git
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() save-diskspace-tags/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

12 years agos3-param use common struct parmlist_entry to hold parametric options
Andrew Bartlett [Thu, 7 Jul 2011 23:18:09 +0000 (09:18 +1000)]
s3-param use common struct parmlist_entry to hold parametric options

This will allow struct loadparm_service to be shared in future.

Andrew Bartlett

12 years agoparam: Move per-share parameters into a seperate file, to share with s3
Andrew Bartlett [Thu, 7 Jul 2011 12:03:30 +0000 (22:03 +1000)]
param: Move per-share parameters into a seperate file, to share with s3

This will allow the struct loadparm_service to be in common between
the two loadparm implementations in the tree.

Andrew Bartlett

12 years agos4-param Remove offset != -1 checks
Andrew Bartlett [Thu, 7 Jul 2011 11:38:46 +0000 (21:38 +1000)]
s4-param Remove offset != -1 checks

No offset values are set to -1 in the parameter table

Andrew Bartlett

12 years agos4-param change to struct bitmap to match s3-param
Andrew Bartlett [Thu, 7 Jul 2011 11:35:51 +0000 (21:35 +1000)]
s4-param change to struct bitmap to match s3-param

12 years agos4-param Also check the p_class matches when comparing offset
Andrew Bartlett [Thu, 7 Jul 2011 11:30:02 +0000 (21:30 +1000)]
s4-param Also check the p_class matches when comparing offset

12 years agos3-param check for aliases with both p_class and offset
Andrew Bartlett [Thu, 7 Jul 2011 11:16:24 +0000 (21:16 +1000)]
s3-param check for aliases with both p_class and offset

This bug was found when comparing with the source4 loadparm code.

Andrew Bartlett

12 years agolib/util Move bitmap.c to lib/util
Andrew Bartlett [Thu, 7 Jul 2011 11:04:31 +0000 (21:04 +1000)]
lib/util Move bitmap.c to lib/util

12 years agoparam: Add hooks to s3 parm_struct and the parameters void * pointer
Andrew Bartlett [Thu, 7 Jul 2011 10:33:55 +0000 (20:33 +1000)]
param: Add hooks to s3 parm_struct and the parameters void * pointer

This is to that the pyparam hooks can use the hooks to connect with
the s3 loadparm system.  This now also includes per-service
parameters.

Andrew Bartlett

12 years agos3-lib use True and False in bitmap.c
Andrew Bartlett [Thu, 7 Jul 2011 08:18:38 +0000 (18:18 +1000)]
s3-lib use True and False in bitmap.c

12 years agos3-param: calculate default_server_announce at runtime
Andrew Bartlett [Thu, 7 Jul 2011 04:10:54 +0000 (14:10 +1000)]
s3-param: calculate default_server_announce at runtime

12 years agos3-param Remove lp_set_passdb_backend()
Andrew Bartlett [Thu, 7 Jul 2011 03:45:13 +0000 (13:45 +1000)]
s3-param Remove lp_set_passdb_backend()

12 years agos3-zfsacl: Fix a debug message
Volker Lendecke [Fri, 8 Jul 2011 08:06:58 +0000 (10:06 +0200)]
s3-zfsacl: Fix a debug message

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jul  8 11:22:55 CEST 2011 on sn-devel-104

12 years agos3:wscript_build: remove unused variable
Stefan Metzmacher [Thu, 7 Jul 2011 17:48:43 +0000 (19:48 +0200)]
s3:wscript_build: remove unused variable

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul  8 02:43:22 CEST 2011 on sn-devel-104

12 years agos3:selftest: run SMB2-BASIC
Stefan Metzmacher [Thu, 7 Jul 2011 23:03:49 +0000 (01:03 +0200)]
s3:selftest: run SMB2-BASIC

metze

12 years agos3:torture: add SMB2-BASIC
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:torture: add SMB2-BASIC

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_query_directory*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_query_directory*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_write*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_write*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_read*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_read*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_flush*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_flush*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_close*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_close*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_create*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_create*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_tcon*() and smb2cli_tdis*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_tcon*() and smb2cli_tdis*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_sesssetup*() and smb2cli_logoff*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_sesssetup*() and smb2cli_logoff*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add smb2cli_negprot*()
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add smb2cli_negprot*()

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agos3:libsmb: add basic smb2 client infrastructure
Stefan Metzmacher [Thu, 5 May 2011 16:12:07 +0000 (18:12 +0200)]
s3:libsmb: add basic smb2 client infrastructure

Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze

12 years agoFix bug #8293 - SMB2 doesn't rotate the log files often enough.
Jeremy Allison [Thu, 7 Jul 2011 21:59:41 +0000 (14:59 -0700)]
Fix bug #8293 - SMB2 doesn't rotate the log files often enough.

Move the num_requests field out of the smb1 struct into the generic
struct smbd_server_connection struct. Use it to count SMB2 requests
as well as SMB1 and ensure that check_log_size() is called every 50
SMB2 requests.

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

12 years agos3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()
Stefan Metzmacher [Thu, 7 Jul 2011 14:38:33 +0000 (16:38 +0200)]
s3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()

For all requests which don't operate on a tcon, we should call
change_to_root_user(), to match the SMB1 behavior.

For SMB1 we do the following operations without AS_USER:

/* 0x70 */ { "SMBtcon",reply_tcon,0},
/* 0x71 */ { "SMBtdis",reply_tdis,DO_CHDIR},
/* 0x72 */ { "SMBnegprot",reply_negprot,0},
/* 0x73 */ { "SMBsesssetupX",reply_sesssetup_and_X,0},
/* 0x74 */ { "SMBulogoffX",reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */
/* 0x75 */ { "SMBtconX",reply_tcon_and_X,0},
...
/* 0x2b */ { "SMBecho",reply_echo,0},
...
/* 0xa4 */ { "SMBntcancel",reply_ntcancel, 0 },

For SMB2tdis we still call smbd_smb2_request_check_tcon()
as close_cnum() calls change_to_root_user() when needed.

metze

Signed-off-by: Jeremy Allison <jra@samba.org>
12 years agolibcli: remove duplicate of #define NT_STATUS_NO_SUCH_JOB
Björn Baumbach [Thu, 7 Jul 2011 15:43:46 +0000 (17:43 +0200)]
libcli: remove duplicate of #define NT_STATUS_NO_SUCH_JOB

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jul  7 20:29:13 CEST 2011 on sn-devel-104

12 years agos3-client: Remove use of cli_errstr()
Björn Baumbach [Thu, 7 Jul 2011 15:36:22 +0000 (17:36 +0200)]
s3-client: Remove use of cli_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-libsmb: Remove use of cli_errstr()
Björn Baumbach [Thu, 7 Jul 2011 15:18:40 +0000 (17:18 +0200)]
s3-libsmb: Remove use of cli_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: run_shortname_test: Remove uses of cli_errstr()
Björn Baumbach [Thu, 7 Jul 2011 14:56:05 +0000 (16:56 +0200)]
s3-torture: run_shortname_test: Remove uses of cli_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: run_simple_posix_open_test: Remove uses of cli_errstr()
Björn Baumbach [Thu, 7 Jul 2011 14:49:12 +0000 (16:49 +0200)]
s3-torture: run_simple_posix_open_test: Remove uses of cli_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: use nt_errstr() for cli_unlink() error handling
Stefan Metzmacher [Thu, 7 Jul 2011 15:56:19 +0000 (17:56 +0200)]
s3-torture: use nt_errstr() for cli_unlink() error handling

Use nt_errstr() instead of cli_errstr() for error handling on
cli_unlink() calls.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: introduce check_both_error()
Björn Baumbach [Thu, 7 Jul 2011 14:27:39 +0000 (16:27 +0200)]
s3-torture: introduce check_both_error()

Check if the server produced the expected dos or nt error code like
check_error(), but without a cli_state struct.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: finally remove unused cli_state->outbuf
Stefan Metzmacher [Thu, 7 Jul 2011 16:16:56 +0000 (18:16 +0200)]
s3:libsmb: finally remove unused cli_state->outbuf

metze

12 years agos3:libsmb: remove unused clistr_push_fn()
Stefan Metzmacher [Thu, 7 Jul 2011 15:24:32 +0000 (17:24 +0200)]
s3:libsmb: remove unused clistr_push_fn()

metze

12 years agos3:libsmb: remove unused clistr_pull_fn()
Stefan Metzmacher [Wed, 6 Jul 2011 15:57:45 +0000 (17:57 +0200)]
s3:libsmb: remove unused clistr_pull_fn()

metze

12 years agos3:torture/scanner: use trans2_bytes_push_str() in scan_nttrans()
Stefan Metzmacher [Thu, 7 Jul 2011 13:38:02 +0000 (15:38 +0200)]
s3:torture/scanner: use trans2_bytes_push_str() in scan_nttrans()

metze

12 years agos3:torture/scanner: use trans2_bytes_push_str() in scan_trans2()
Stefan Metzmacher [Thu, 7 Jul 2011 13:38:02 +0000 (15:38 +0200)]
s3:torture/scanner: use trans2_bytes_push_str() in scan_trans2()

metze

12 years agos3:libsmb: use trans2_bytes_push_str() in cli_tcon_andx_create() for the plaintext...
Stefan Metzmacher [Thu, 7 Jul 2011 08:55:00 +0000 (10:55 +0200)]
s3:libsmb: use trans2_bytes_push_str() in cli_tcon_andx_create() for the plaintext password

This makes sure we push the string always in DOS charset.

metze

12 years agos3:libsmb: use trans2_bytes_push_str() in cli_set_ea_path()
Stefan Metzmacher [Thu, 7 Jul 2011 08:16:38 +0000 (10:16 +0200)]
s3:libsmb: use trans2_bytes_push_str() in cli_set_ea_path()

metze

12 years agos3:libsmb: use trans2_bytes_push_str() in cli_dfs_get_referral()
Stefan Metzmacher [Wed, 6 Jul 2011 16:36:29 +0000 (18:36 +0200)]
s3:libsmb: use trans2_bytes_push_str() in cli_dfs_get_referral()

metze

12 years agos3:libsmb: use a talloc_stackframe in cli_dfs_get_referral()
Stefan Metzmacher [Thu, 7 Jul 2011 06:58:25 +0000 (08:58 +0200)]
s3:libsmb: use a talloc_stackframe in cli_dfs_get_referral()

metze

12 years agos3:libsmb: use trans2_bytes_push_str/bytes() in cli_list_trans_*()
Stefan Metzmacher [Wed, 6 Jul 2011 16:24:50 +0000 (18:24 +0200)]
s3:libsmb: use trans2_bytes_push_str/bytes() in cli_list_trans_*()

metze

12 years agos3:libsmb: use clistr_pull_talloc() for short_name in interpret_long_filename()
Stefan Metzmacher [Wed, 6 Jul 2011 16:57:27 +0000 (18:57 +0200)]
s3:libsmb: use clistr_pull_talloc() for short_name in interpret_long_filename()

metze

12 years agos3:libsmb: interpret_long_filename() short_name is always UNICODE
Stefan Metzmacher [Thu, 7 Jul 2011 12:46:40 +0000 (14:46 +0200)]
s3:libsmb: interpret_long_filename() short_name is always UNICODE

metze

12 years agos3:libsmb: add trans2_bytes_push_bytes()
Stefan Metzmacher [Thu, 7 Jul 2011 08:02:36 +0000 (10:02 +0200)]
s3:libsmb: add trans2_bytes_push_bytes()

metze

12 years agos3:libsmb: make trans2_bytes_push_str() non-static
Stefan Metzmacher [Wed, 6 Jul 2011 16:23:52 +0000 (18:23 +0200)]
s3:libsmb: make trans2_bytes_push_str() non-static

We should use this and get rid of clistr_push().

metze

12 years agos3:utils: avoid cli_nt_error()/cli_errstr() if we already have the status
Stefan Metzmacher [Thu, 7 Jul 2011 13:33:43 +0000 (15:33 +0200)]
s3:utils: avoid cli_nt_error()/cli_errstr() if we already have the status

metze

12 years agos3-printing: remove tdb migration invalid printer name checks
David Disseldorp [Tue, 5 Jul 2011 13:04:02 +0000 (15:04 +0200)]
s3-printing: remove tdb migration invalid printer name checks

WERR_INVALID_PRINTER_NAME only needed to be handled when printing tdb
migration used spoolss, with winreg such errors are no longer possible.

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Jul  7 19:15:34 CEST 2011 on sn-devel-104

12 years agos3-printing: make sure to first migrate the printers then the security descriptor.
Günther Deschner [Tue, 5 Jul 2011 12:01:40 +0000 (14:01 +0200)]
s3-printing: make sure to first migrate the printers then the security descriptor.

Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>

12 years agos3-printing: fill info2_mask in printer migration
David Disseldorp [Tue, 5 Jul 2011 09:34:47 +0000 (11:34 +0200)]
s3-printing: fill info2_mask in printer migration

Also fix possibly uninitialised status return from
printing_tdb_migrate_printer().

12 years agos3-printing: remove spoolss pipe from migration library, only using winreg finally.
Günther Deschner [Tue, 5 Jul 2011 00:33:23 +0000 (02:33 +0200)]
s3-printing: remove spoolss pipe from migration library, only using winreg finally.

Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>

12 years agos3-printing: use winreg interface for migration, instead of spoolss.
Günther Deschner [Mon, 4 Jul 2011 17:47:07 +0000 (19:47 +0200)]
s3-printing: use winreg interface for migration, instead of spoolss.

Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>

12 years agos3-printing: safe a ton of roundtrips by reusing existing winreg binding_handles.
Günther Deschner [Mon, 4 Jul 2011 22:55:35 +0000 (00:55 +0200)]
s3-printing: safe a ton of roundtrips by reusing existing winreg binding_handles.

Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>