samba.git
5 years agolib/krb5_wrap: add smb_krb5_create_key_from_string().
Günther Deschner [Fri, 25 Apr 2014 12:12:05 +0000 (14:12 +0200)]
lib/krb5_wrap: add smb_krb5_create_key_from_string().

This function can take either a calculated salt or a principal and calculate the
salt on its own.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

5 years agolib/krb5_wrap: add smb_krb5_get_pw_salt().
Günther Deschner [Fri, 25 Apr 2014 12:03:35 +0000 (14:03 +0200)]
lib/krb5_wrap: add smb_krb5_get_pw_salt().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

5 years agos4-dsdb/samdb: use smb_krb5_make_principal for compatibility reasons with MIT.
Günther Deschner [Fri, 25 Apr 2014 11:59:11 +0000 (13:59 +0200)]
s4-dsdb/samdb: use smb_krb5_make_principal for compatibility reasons with MIT.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodoc: Add new parameters to vfs_full_audit man page
Christof Schmitt [Thu, 7 Aug 2014 19:01:56 +0000 (12:01 -0700)]
doc: Add new parameters to vfs_full_audit man page

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug  8 00:37:48 CEST 2014 on sn-devel-104

5 years agovfs_full_audit: Optionally log security descriptors in FSET_NT_ACL
Volker Lendecke [Thu, 7 Aug 2014 10:53:33 +0000 (10:53 +0000)]
vfs_full_audit: Optionally log security descriptors in FSET_NT_ACL

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_full_audit: Add "full_audit:syslog"
Volker Lendecke [Thu, 7 Aug 2014 10:44:01 +0000 (10:44 +0000)]
vfs_full_audit: Add "full_audit:syslog"

Defaults to true (for compatibility)

With full_audit:syslog=false we DEBUG the messages with level 1.

You can explicitly [en|dis]able this with debug class full_audit:0/1

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_full_audit: Save full_audit:priority in private_data
Volker Lendecke [Thu, 7 Aug 2014 10:34:18 +0000 (10:34 +0000)]
vfs_full_audit: Save full_audit:priority in private_data

lp_parm_enum can become expensive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_full_audit: Save full_audit:facility in private_data
Volker Lendecke [Thu, 7 Aug 2014 10:34:18 +0000 (10:34 +0000)]
vfs_full_audit: Save full_audit:facility in private_data

lp_parm_enum can become expensive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_full_audit: Pass "vfs_full_audit_private_data" to log_failure/success()
Volker Lendecke [Thu, 7 Aug 2014 10:23:25 +0000 (10:23 +0000)]
vfs_full_audit: Pass "vfs_full_audit_private_data" to log_failure/success()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture: use torture_assert instead of torture_comment and return in defer_open...
Michael Adam [Thu, 24 Jul 2014 22:24:56 +0000 (00:24 +0200)]
s4:torture: use torture_assert instead of torture_comment and return in defer_open test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture: consistently log "pid %u: ..." in the defer_open test
Michael Adam [Thu, 24 Jul 2014 22:22:17 +0000 (00:22 +0200)]
s4:torture: consistently log "pid %u: ..." in the defer_open test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture: remove an unused variable and bogus check from the defer_open test
Michael Adam [Thu, 24 Jul 2014 22:20:47 +0000 (00:20 +0200)]
s4:torture: remove an unused variable and bogus check from the defer_open test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodocs: Fix typos in smb.conf (inherit acls)
Marc Muehlfeld [Wed, 6 Aug 2014 19:36:26 +0000 (21:36 +0200)]
docs: Fix typos in smb.conf (inherit acls)

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

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Aug  7 00:52:42 CEST 2014 on sn-devel-104

5 years agoRedescribe --userou usage
Marc Muehlfeld [Wed, 6 Aug 2014 17:52:21 +0000 (19:52 +0200)]
Redescribe --userou usage

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
5 years agoctdbd_conn: Only poll if there's a timeout
Volker Lendecke [Mon, 21 Jul 2014 12:35:39 +0000 (12:35 +0000)]
ctdbd_conn: Only poll if there's a timeout

At this point the ctdb socket is blocking, so we can save a syscall when
we wait indefinitely anyway.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Aug  6 18:01:54 CEST 2014 on sn-devel-104

5 years agoctdbd_conn: Remove ctdb_packet
Volker Lendecke [Tue, 27 May 2014 07:50:01 +0000 (07:50 +0000)]
ctdbd_conn: Remove ctdb_packet

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdbd_conn: Remove ctdb_packet dependency
Volker Lendecke [Tue, 6 May 2014 10:21:42 +0000 (12:21 +0200)]
ctdbd_conn: Remove ctdb_packet dependency

This was an early, failed attempt at async socket handling.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdb-locking: Simplify ctdb_find_lock_context()
Volker Lendecke [Mon, 4 Aug 2014 13:57:12 +0000 (13:57 +0000)]
ctdb-locking: Simplify ctdb_find_lock_context()

I like early returns that avoid else branches :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Aug  6 14:44:31 CEST 2014 on sn-devel-104

5 years agoctdb-locking: TALLOC_FREE copes with NULL
Volker Lendecke [Mon, 4 Aug 2014 12:41:06 +0000 (12:41 +0000)]
ctdb-locking: TALLOC_FREE copes with NULL

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agos3:smbd: pass smbXsrv_connection to smbd_[un]lock_socket()
Stefan Metzmacher [Thu, 12 Jun 2014 06:43:26 +0000 (08:43 +0200)]
s3:smbd: pass smbXsrv_connection to smbd_[un]lock_socket()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Aug  6 12:15:57 CEST 2014 on sn-devel-104

5 years agos3:smb2_server: pass smbXsrv_connection to smbd_smb2_send_break()
Stefan Metzmacher [Thu, 12 Jun 2014 06:43:26 +0000 (08:43 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_smb2_send_break()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to smb1 encryption functions
Stefan Metzmacher [Thu, 12 Jun 2014 06:43:26 +0000 (08:43 +0200)]
s3:smbd: pass smbXsrv_connection to smb1 encryption functions

These parameters are not really used currently, but may be in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: propagate NTSTATUS from smb2_sendfile_send_data() to smbd_smb2_flush_...
Stefan Metzmacher [Fri, 11 Jul 2014 00:25:00 +0000 (02:25 +0200)]
s3:smb2_server: propagate NTSTATUS from smb2_sendfile_send_data() to smbd_smb2_flush_send_queue()

Calling exit_server() from within a destructor is a bit ugly...

This will result in smbd_server_connection_terminate() instead of
directly calling exit_server(), which will be useful for multi-channel in
future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agosmbd: Use %s/__func__
Volker Lendecke [Wed, 23 Jul 2014 13:26:19 +0000 (13:26 +0000)]
smbd: Use %s/__func__

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection explicitly to sendfile_short_send()
Stefan Metzmacher [Thu, 12 Jun 2014 06:42:16 +0000 (08:42 +0200)]
s3:smbd: pass smbXsrv_connection explicitly to sendfile_short_send()

We now let the caller terminate the connection.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection explicitly to fake_sendfile()
Stefan Metzmacher [Thu, 12 Jun 2014 06:40:25 +0000 (08:40 +0200)]
s3:smbd: pass smbXsrv_connection explicitly to fake_sendfile()

In future (with multi-channel) a fsp can be used from multiple
connections, we need to make it explicit on which we want to reply.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: remember the time of the session setup auth_time
Stefan Metzmacher [Thu, 12 Jun 2014 07:49:28 +0000 (09:49 +0200)]
s3:smbd: remember the time of the session setup auth_time

This is the time of the last reauth.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_sesssetup: make use of smb2req->xconn
Stefan Metzmacher [Thu, 12 Jun 2014 08:47:51 +0000 (10:47 +0200)]
s3:smb2_sesssetup: make use of smb2req->xconn

We should use stuff relative to the current request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_sesssetup: split out smbd_smb2_session_setup_auth_return()
Stefan Metzmacher [Thu, 12 Jun 2014 07:19:29 +0000 (09:19 +0200)]
s3:smb2_sesssetup: split out smbd_smb2_session_setup_auth_return()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbXsrv_tcon: don't pass smbXsrv_connection to smbXsrv_tcon_create()
Stefan Metzmacher [Thu, 12 Jun 2014 08:40:12 +0000 (10:40 +0200)]
s3:smbXsrv_tcon: don't pass smbXsrv_connection to smbXsrv_tcon_create()

A tcon can be used on multiple connections in future,
so better pass the few needed parameters explicitly
and let the caller figure out where to get them.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to smbd_[un]lock_socket_internal()
Stefan Metzmacher [Thu, 12 Jun 2014 06:48:16 +0000 (08:48 +0200)]
s3:smbd: pass smbXsrv_connection to smbd_[un]lock_socket_internal()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in smb_request_done()
Stefan Metzmacher [Thu, 12 Jun 2014 06:51:44 +0000 (08:51 +0200)]
s3:smbd: use req->xconn in smb_request_done()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in message.c
Stefan Metzmacher [Wed, 11 Jun 2014 10:36:14 +0000 (12:36 +0200)]
s3:smbd: use req->xconn in message.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in reply.c
Stefan Metzmacher [Wed, 11 Jun 2014 13:12:32 +0000 (15:12 +0200)]
s3:smbd: use req->xconn in reply.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in sesssetup.c
Stefan Metzmacher [Wed, 11 Jun 2014 13:11:05 +0000 (15:11 +0200)]
s3:smbd: use req->xconn in sesssetup.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to reply_readbraw_error()
Stefan Metzmacher [Wed, 11 Jun 2014 12:51:05 +0000 (14:51 +0200)]
s3:smbd: pass smbXsrv_connection to reply_readbraw_error()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to is_valid_writeX_buffer()
Stefan Metzmacher [Wed, 11 Jun 2014 12:35:55 +0000 (14:35 +0200)]
s3:smbd: pass smbXsrv_connection to is_valid_writeX_buffer()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: remove unused 'sconn' from valid_smb_header()
Stefan Metzmacher [Wed, 11 Jun 2014 12:29:52 +0000 (14:29 +0200)]
s3:smbd: remove unused 'sconn' from valid_smb_header()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: remove unused 'sconn' from is_encrypted_packet()
Stefan Metzmacher [Wed, 11 Jun 2014 12:28:13 +0000 (14:28 +0200)]
s3:smbd: remove unused 'sconn' from is_encrypted_packet()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in nttrans.c
Stefan Metzmacher [Wed, 11 Jun 2014 12:26:57 +0000 (14:26 +0200)]
s3:smbd: use req->xconn in nttrans.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in send_trans_reply()
Stefan Metzmacher [Wed, 11 Jun 2014 12:26:08 +0000 (14:26 +0200)]
s3:smbd: use req->xconn in send_trans_reply()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in files.c
Stefan Metzmacher [Wed, 11 Jun 2014 12:25:07 +0000 (14:25 +0200)]
s3:smbd: use req->xconn in files.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn to send_trans2_replies()
Stefan Metzmacher [Wed, 11 Jun 2014 12:22:13 +0000 (14:22 +0200)]
s3:smbd: use req->xconn to send_trans2_replies()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: remove unused 'sconn' in call_trans2setfsinfo()
Stefan Metzmacher [Wed, 11 Jun 2014 11:57:30 +0000 (13:57 +0200)]
s3:smbd: remove unused 'sconn' in call_trans2setfsinfo()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use req->xconn in vfs_[p]write_data()
Stefan Metzmacher [Wed, 11 Jun 2014 11:54:43 +0000 (13:54 +0200)]
s3:smbd: use req->xconn in vfs_[p]write_data()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to smbd_do_qfsinfo()
Stefan Metzmacher [Wed, 11 Jun 2014 11:36:34 +0000 (13:36 +0200)]
s3:smbd: pass smbXsrv_connection to smbd_do_qfsinfo()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to netbios_session_retarget()
Stefan Metzmacher [Wed, 11 Jun 2014 10:55:24 +0000 (12:55 +0200)]
s3:smbd: pass smbXsrv_connection to netbios_session_retarget()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to reply_special()
Stefan Metzmacher [Wed, 11 Jun 2014 10:54:47 +0000 (12:54 +0200)]
s3:smbd: pass smbXsrv_connection to reply_special()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to get_challenge()
Stefan Metzmacher [Wed, 11 Jun 2014 10:42:56 +0000 (12:42 +0200)]
s3:smbd: pass smbXsrv_connection to get_challenge()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to negprot_spnego()
Stefan Metzmacher [Wed, 11 Jun 2014 10:41:26 +0000 (12:41 +0200)]
s3:smbd: pass smbXsrv_connection to negprot_spnego()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_negprot: remove NBT_HDR_SIZE from smbd_smb2_first_negprot()
Stefan Metzmacher [Tue, 24 Jun 2014 17:28:51 +0000 (19:28 +0200)]
s3:smb2_negprot: remove NBT_HDR_SIZE from smbd_smb2_first_negprot()

This will simplify future features like multi-channel and rdma.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smbd_server_connection_terminate*()
Stefan Metzmacher [Wed, 11 Jun 2014 10:15:48 +0000 (12:15 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_server_connection_terminate*()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_*: make use of smb2req->xconn where possible
Stefan Metzmacher [Thu, 12 Jun 2014 06:38:48 +0000 (08:38 +0200)]
s3:smb2_*: make use of smb2req->xconn where possible

We need to use the connection that is used by the current request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in is_smb2_recvfile_write()
Stefan Metzmacher [Wed, 11 Jun 2014 09:41:27 +0000 (11:41 +0200)]
s3:smb2_server: use req->xconn in is_smb2_recvfile_write()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: remove unused 'sconn' from smbd_smb2_send_break_state
Stefan Metzmacher [Wed, 11 Jun 2014 09:40:36 +0000 (11:40 +0200)]
s3:smb2_server: remove unused 'sconn' from smbd_smb2_send_break_state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in smbd_smb2_request_error_ex()
Stefan Metzmacher [Wed, 11 Jun 2014 09:40:04 +0000 (11:40 +0200)]
s3:smb2_server: use req->xconn in smbd_smb2_request_error_ex()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in smbd_smb2_request_dispatch()
Stefan Metzmacher [Wed, 11 Jun 2014 09:31:37 +0000 (11:31 +0200)]
s3:smb2_server: use req->xconn in smbd_smb2_request_dispatch()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in smbd_smb2_request_verify_creditcharge()
Stefan Metzmacher [Wed, 11 Jun 2014 09:31:04 +0000 (11:31 +0200)]
s3:smb2_server: use req->xconn in smbd_smb2_request_verify_creditcharge()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in smbd_smb2_request_check_session()
Stefan Metzmacher [Wed, 11 Jun 2014 09:30:23 +0000 (11:30 +0200)]
s3:smb2_server: use req->xconn in smbd_smb2_request_check_session()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in smbd_smb2_request_process_cancel()
Stefan Metzmacher [Wed, 11 Jun 2014 09:29:01 +0000 (11:29 +0200)]
s3:smb2_server: use req->xconn in smbd_smb2_request_process_cancel()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: remove unused 'sconn' from smbd_smb2_request_pending_state
Stefan Metzmacher [Wed, 11 Jun 2014 09:22:16 +0000 (11:22 +0200)]
s3:smb2_server: remove unused 'sconn' from smbd_smb2_request_pending_state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: talloc smbd_smb2_request_pending_state on smbXsrv_connection
Stefan Metzmacher [Wed, 11 Jun 2014 09:22:16 +0000 (11:22 +0200)]
s3:smb2_server: talloc smbd_smb2_request_pending_state on smbXsrv_connection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use req->xconn in smbd_smb2_request_setup_out()
Stefan Metzmacher [Wed, 11 Jun 2014 09:19:24 +0000 (11:19 +0200)]
s3:smb2_server: use req->xconn in smbd_smb2_request_setup_out()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smbd_smb2_request_next_incoming()
Stefan Metzmacher [Wed, 11 Jun 2014 08:59:00 +0000 (10:59 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_smb2_request_next_incoming()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smbd_smb2_request_create()
Stefan Metzmacher [Wed, 11 Jun 2014 08:51:04 +0000 (10:51 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_smb2_request_create()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smbd_initialize_smb2()
Stefan Metzmacher [Wed, 11 Jun 2014 08:45:56 +0000 (10:45 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_initialize_smb2()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smbd_smb2_first_negprot()
Stefan Metzmacher [Wed, 11 Jun 2014 08:42:01 +0000 (10:42 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_smb2_first_negprot()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smb2_set_operation_credit()
Stefan Metzmacher [Wed, 11 Jun 2014 08:08:26 +0000 (10:08 +0200)]
s3:smb2_server: pass smbXsrv_connection to smb2_set_operation_credit()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smb2_validate_message_id()
Stefan Metzmacher [Wed, 11 Jun 2014 08:05:43 +0000 (10:05 +0200)]
s3:smb2_server: pass smbXsrv_connection to smb2_validate_message_id()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smb2_validate_sequence_number()
Stefan Metzmacher [Wed, 11 Jun 2014 08:03:27 +0000 (10:03 +0200)]
s3:smb2_server: pass smbXsrv_connection to smb2_validate_sequence_number()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to smbd_smb2_flush_send_queue()
Stefan Metzmacher [Wed, 11 Jun 2014 08:00:09 +0000 (10:00 +0200)]
s3:smb2_server: pass smbXsrv_connection to smbd_smb2_flush_send_queue()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: rename 'conn' variables to 'xconn'
Stefan Metzmacher [Mon, 7 Jul 2014 10:25:48 +0000 (12:25 +0200)]
s3:smb2_server: rename 'conn' variables to 'xconn'

This makes the code more consistent with other functions
using 'struct smbXsrv_connection *xconn' as local variables.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: pass smbXsrv_connection to fd handlers
Stefan Metzmacher [Tue, 10 Jun 2014 18:20:58 +0000 (20:20 +0200)]
s3:smb2_server: pass smbXsrv_connection to fd handlers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to fd handlers
Stefan Metzmacher [Tue, 10 Jun 2014 18:20:58 +0000 (20:20 +0200)]
s3:smbd: pass smbXsrv_connection to fd handlers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to process_smb()
Stefan Metzmacher [Wed, 11 Jun 2014 08:40:42 +0000 (10:40 +0200)]
s3:smbd: pass smbXsrv_connection to process_smb()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: let construct_reply() also use smb_request_done()
Stefan Metzmacher [Wed, 11 Jun 2014 06:34:05 +0000 (08:34 +0200)]
s3:smbd: let construct_reply() also use smb_request_done()

This way it matches the code path in construct_reply_chain().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: use smbXsrv_connection in switch_message()
Stefan Metzmacher [Wed, 11 Jun 2014 01:22:53 +0000 (03:22 +0200)]
s3:smbd: use smbXsrv_connection in switch_message()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: pass smbXsrv_connection to smbd_register_ips()
Stefan Metzmacher [Wed, 11 Jun 2014 01:06:00 +0000 (03:06 +0200)]
s3:smbd: pass smbXsrv_connection to smbd_register_ips()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: rename 'conn' to 'xconn' in exit_server_common()
Stefan Metzmacher [Tue, 10 Jun 2014 13:05:41 +0000 (15:05 +0200)]
s3:smbd: rename 'conn' to 'xconn' in exit_server_common()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: rename 'conn' to 'xconn' in smbd_process()
Stefan Metzmacher [Tue, 10 Jun 2014 13:05:41 +0000 (15:05 +0200)]
s3:smbd: rename 'conn' to 'xconn' in smbd_process()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: remember smbXsrv_connection for each smb_request
Stefan Metzmacher [Tue, 10 Jun 2014 11:34:55 +0000 (13:34 +0200)]
s3:smbd: remember smbXsrv_connection for each smb_request

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: remember smbXsrv_connection for each smbd_smb2_request
Stefan Metzmacher [Tue, 10 Jun 2014 11:34:55 +0000 (13:34 +0200)]
s3:smb2_server: remember smbXsrv_connection for each smbd_smb2_request

This prepares the structures for multi-channel support.
Each request needs to respond on the same connection,
where it arrived.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: talloc smbd_smb2_request as child of smbXsrv_connection
Stefan Metzmacher [Tue, 10 Jun 2014 11:34:55 +0000 (13:34 +0200)]
s3:smb2_server: talloc smbd_smb2_request as child of smbXsrv_connection

As the list of pending requests moved from sconn->smb2.requests to xconn->smb2.requests,
it is more logical to use smbXsrv_connection as talloc parent.

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: move sconn->smb2.requests to xconn->smb2.requests
Stefan Metzmacher [Tue, 10 Jun 2014 11:24:50 +0000 (13:24 +0200)]
s3:smb2_server: move sconn->smb2.requests to xconn->smb2.requests

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: move sconn->smb2.*credits* to xconn->smb2.credits.*
Stefan Metzmacher [Fri, 23 May 2014 10:10:23 +0000 (12:10 +0200)]
s3:smb2_server: move sconn->smb2.*credits* to xconn->smb2.credits.*

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_negprot: remove unused variable 'conn' we already have 'xconn'...
Stefan Metzmacher [Thu, 12 Jun 2014 06:36:08 +0000 (08:36 +0200)]
s3:smb2_negprot: remove unused variable 'conn' we already have 'xconn'...

We don't need two helper variables for the same thing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use xconn->smb2.server.max_* instead of sconn->smb2.max_*
Stefan Metzmacher [Fri, 23 May 2014 08:22:34 +0000 (10:22 +0200)]
s3:smb2_server: use xconn->smb2.server.max_* instead of sconn->smb2.max_*

We don't need this twice...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: move sconn->smb2.negprot_2ff to xconn->smb2.allow_2ff
Stefan Metzmacher [Fri, 23 May 2014 08:07:21 +0000 (10:07 +0200)]
s3:smb2_server: move sconn->smb2.negprot_2ff to xconn->smb2.allow_2ff

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: move sconn->smb2.send_queue* to xconn->smb2.send_queue*
Stefan Metzmacher [Fri, 23 May 2014 07:53:21 +0000 (09:53 +0200)]
s3:smb2_server: move sconn->smb2.send_queue* to xconn->smb2.send_queue*

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: move sconn->smb2.request_read_state to xconn->smb2.request_read_state
Stefan Metzmacher [Fri, 23 May 2014 07:41:57 +0000 (09:41 +0200)]
s3:smb2_server: move sconn->smb2.request_read_state to xconn->smb2.request_read_state

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smb2_server: use xconn->transport.fde also for smb2
Stefan Metzmacher [Fri, 23 May 2014 07:36:24 +0000 (09:36 +0200)]
s3:smb2_server: use xconn->transport.fde also for smb2

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move libasys state from smbXsrv_connection to smbd_server_connection
Stefan Metzmacher [Thu, 12 Jun 2014 06:32:47 +0000 (08:32 +0200)]
s3:smbd: move libasys state from smbXsrv_connection to smbd_server_connection

This doesn't belong to a connection, it's state used within the VFS stack.
And smbd_server_connection is the legacy structure we're using for
global VFS state.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move xconn->msg_state to xconn->smb1.msg_state
Stefan Metzmacher [Wed, 11 Jun 2014 10:36:14 +0000 (12:36 +0200)]
s3:smbd: move xconn->msg_state to xconn->smb1.msg_state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->smb1.unix_info.* to xconn->smb1.unix_info.*
Stefan Metzmacher [Tue, 10 Jun 2014 10:57:38 +0000 (12:57 +0200)]
s3:smbd: move sconn->smb1.unix_info.* to xconn->smb1.unix_info.*

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->smb1.echo_handler.* to xconn->smb1.echo_handler.*
Stefan Metzmacher [Fri, 23 May 2014 07:26:26 +0000 (09:26 +0200)]
s3:smbd: move sconn->smb1.echo_handler.* to xconn->smb1.echo_handler.*

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->smb1.signing_state to xconn->smb1.signing_state
Stefan Metzmacher [Wed, 21 May 2014 12:44:01 +0000 (14:44 +0200)]
s3:smbd: move sconn->smb1.signing_state to xconn->smb1.signing_state

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->smb1.sessions.* to xconn->smb1.sessions.*
Stefan Metzmacher [Wed, 21 May 2014 08:56:26 +0000 (10:56 +0200)]
s3:smbd: move sconn->smb1.sessions.* to xconn->smb1.sessions.*

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->smb1.negprot.* to xconn->smb1.negprot.*
Stefan Metzmacher [Wed, 21 May 2014 08:27:50 +0000 (10:27 +0200)]
s3:smbd: move sconn->smb1.negprot.* to xconn->smb1.negprot.*

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->status to xconn->transport.status
Stefan Metzmacher [Fri, 23 May 2014 07:07:47 +0000 (09:07 +0200)]
s3:smbd: move sconn->status to xconn->transport.status

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbd: move sconn->smb1.fde to xconn->transport.fde
Stefan Metzmacher [Fri, 23 May 2014 06:45:01 +0000 (08:45 +0200)]
s3:smbd: move sconn->smb1.fde to xconn->transport.fde

This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>