From 296dcbac5897ad208c890720d3356a3ddc5f7794 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 20 Mar 2007 01:17:47 +0000 Subject: r21882: The server part of the code has to use an AUTH_NTLMSSP struct, not just an NTLMSSP - grr. This complicates the re-use of common client and server code but I think I've got it right. Not turned on of valgrinded yet, but you can see it start to take shape ! Jeremy. (This used to be commit 60fc9c0aedf42dcd9df2ef9f1df07eaf3bca9bce) --- source3/smbd/trans2.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index deb5db1baf..25fd6621e9 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2758,6 +2758,33 @@ cap_low = 0x%x, cap_high = 0x%x\n", } break; } + case SMB_REQUEST_TRANSPORT_ENCRYPTION: + { + NTSTATUS status; + size_t data_len = total_data; + + if (!lp_unix_extensions()) { + return ERROR_NT(NT_STATUS_INVALID_LEVEL); + } + + DEBUG( 4,("call_trans2setfsinfo: request transport encrption.\n")); + + status = srv_request_encryption_setup((unsigned char **)&pdata, &data_len); + + if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + error_packet_set(outbuf, 0, 0, status, __LINE__,__FILE__); + } else if (!NT_STATUS_IS_OK(status)) { + return ERROR_NT(status); + } + + send_trans2_replies( outbuf, bufsize, params, 0, pdata, data_len, max_data_bytes); + + if (NT_STATUS_IS_OK(status)) { + /* Server-side transport encryption is now *on*. */ + srv_encryption_start(); + } + return -1; + } case SMB_FS_QUOTA_INFORMATION: { files_struct *fsp = NULL; -- cgit