From 68259be9d555257042e91e343324eb91f12a7185 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 Oct 2002 01:33:05 +0000 Subject: Added error string for server timeout on client call. Jeremy. (This used to be commit abeebf33c132c4975ac5dadde57c22176ddc9fda) --- source3/include/client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include') diff --git a/source3/include/client.h b/source3/include/client.h index 1e8d1c3d29..7a8889edc5 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -70,6 +70,7 @@ typedef struct smb_sign_info { struct cli_state { int port; int fd; + int smb_read_error; /* Copy of last read error. */ uint16 cnum; uint16 pid; uint16 mid; -- cgit From 5567ef53cb65e6100825ea909d9c35e322e65293 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 Oct 2002 06:50:25 +0000 Subject: Cope with rw errors and timeout to peer. Jeremy. (This used to be commit 736a7bab487d7e217eed452e2089adb6b4164ad5) --- source3/include/client.h | 2 +- source3/include/smb.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/client.h b/source3/include/client.h index 7a8889edc5..17fd150065 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -70,7 +70,7 @@ typedef struct smb_sign_info { struct cli_state { int port; int fd; - int smb_read_error; /* Copy of last read error. */ + int smb_rw_error; /* Copy of last read or write error. */ uint16 cnum; uint16 pid; uint16 mid; diff --git a/source3/include/smb.h b/source3/include/smb.h index c39ebed950..f58e3adf54 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -161,6 +161,8 @@ typedef uint16 smb_ucs2_t; typedef smb_ucs2_t wpstring[PSTRING_LEN]; typedef smb_ucs2_t wfstring[FSTRING_LEN]; +/* This error code can go into the client smb_rw_error. */ +#define WRITE_ERROR 4 #ifdef WORDS_BIGENDIAN #define UCS2_SHIFT 8 -- cgit From 26b8f6bbeb567552f6a75469b0391c06dd87e1e1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 3 Oct 2002 03:20:40 +0000 Subject: We are going to need to track the SAM sequence number too. (This used to be commit 92e0d0e6082117d2d5342383023cff244bbceed0) --- source3/include/sam.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include') diff --git a/source3/include/sam.h b/source3/include/sam.h index d6fc1d7a1c..f46a6e7bcb 100644 --- a/source3/include/sam.h +++ b/source3/include/sam.h @@ -72,6 +72,7 @@ typedef struct sam_domain_handle { uint32 num_accounts; /* number of accounts in the domain */ uint32 num_groups; /* number of global groups */ uint32 num_aliases; /* number of local groups */ + uint32 sam_sequence_number; /* global sequence number */ } private; } SAM_DOMAIN_HANDLE; -- cgit From 83e58265b5595f5268bbcbda1a078a81d6fd5a40 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 4 Oct 2002 03:51:43 +0000 Subject: merge of new client side support the Win2k LSARPC UUID in rpcbind from APP_HEAD (This used to be commit 38c9e4299845fd77cc8629945ce2d259489f7437) --- source3/include/smb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/include') diff --git a/source3/include/smb.h b/source3/include/smb.h index f58e3adf54..5bf79b75fe 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -187,6 +187,17 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN]; #define PIPE_SPOOLSS "\\PIPE\\spoolss" #define PIPE_NETDFS "\\PIPE\\netdfs" +#define PI_LSARPC 0 +#define PI_LSARPC_V2 1 +#define PI_SAMR 2 +#define PI_NETLOGON 3 +#define PI_SRVSVC 4 +#define PI_WKSSVC 5 +#define PI_WINREG 6 +#define PI_SPOOLSS 7 +#define PI_NETDFS 8 +#define PI_MAX_PIPES 9 + /* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */ typedef struct nttime_info { -- cgit From d2ea6d5ae759bd2c842b5836d778b5a52b8af477 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 4 Oct 2002 19:11:36 +0000 Subject: merge of working dsrolegetprimdominfo() client code from APP_HEAD (This used to be commit f70caa25e4ee198151b915cf2bc0a26b2d0e243d) --- source3/include/ntdomain.h | 1 + source3/include/rpc_dce.h | 1 + source3/include/rpc_ds.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++ source3/include/smb.h | 2 +- 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 source3/include/rpc_ds.h (limited to 'source3/include') diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index ffb9c96b72..628035885e 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -374,5 +374,6 @@ struct acct_info #include "rpc_wkssvc.h" #include "rpc_spoolss.h" #include "rpc_dfs.h" +#include "rpc_ds.h" #endif /* _NT_DOMAIN_H */ diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 61316de89c..3e615dab80 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -89,6 +89,7 @@ enum NTLM_MESSAGE_TYPE /* Maximum PDU fragment size. */ #define MAX_PDU_FRAG_LEN 0x1630 +/* #define MAX_PDU_FRAG_LEN 0x10b8 this is what w2k sets */ /* * Actual structure of a DCE UUID diff --git a/source3/include/rpc_ds.h b/source3/include/rpc_ds.h new file mode 100644 index 0000000000..c01d10554e --- /dev/null +++ b/source3/include/rpc_ds.h @@ -0,0 +1,91 @@ +/* + Unix SMB/CIFS implementation. + SMB parameters and setup + Copyright (C) Gerald Carter 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _RPC_DS_H /* _RPC_LSA_H */ +#define _RPC_DS_H + +#include "rpc_misc.h" + + +/* Opcodes available on PIPE_LSARPC_DS */ + +#define DS_GETPRIMDOMINFO 0x00 + + +/* macros for RPC's */ + +#define DSROLE_PRIMARY_DS_RUNNING 0x00000001 +#define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002 +#define DSROLE_UPGRADE_IN_PROGRESS 0x00000004 +#define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000 + +typedef struct +{ + uint16 machine_role; + uint16 unknown; /* 0x6173 -- maybe just alignment? */ + + uint32 flags; + + uint32 netbios_ptr; + uint32 dnsname_ptr; + uint32 forestname_ptr; + + GUID domain_guid; + + UNISTR2 netbios_domain; + /* these 2 might be reversed in order. I can't tell from + my tests as both values are the same --jerry */ + UNISTR2 dns_domain; + UNISTR2 forest_domain; +} DSROLE_PRIMARY_DOMAIN_INFO_BASIC; + +typedef struct +{ + DSROLE_PRIMARY_DOMAIN_INFO_BASIC *basic; +} DS_DOMINFO_CTR; + +/* info levels for ds_getprimdominfo() */ + +#define DsRolePrimaryDomainInfoBasic 1 + + +/* DS_Q_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() request */ +typedef struct +{ + uint16 level; +} DS_Q_GETPRIMDOMINFO; + +/* DS_R_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() response */ +typedef struct +{ + uint32 ptr; + + uint16 level; + uint16 unknown0; /* 0x455c -- maybe just alignment? */ + + DS_DOMINFO_CTR info; + + NTSTATUS status; +} DS_R_GETPRIMDOMINFO; + + + + +#endif /* _RPC_DS_H */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 5bf79b75fe..b5ab504415 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -188,7 +188,7 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN]; #define PIPE_NETDFS "\\PIPE\\netdfs" #define PI_LSARPC 0 -#define PI_LSARPC_V2 1 +#define PI_LSARPC_DS 1 #define PI_SAMR 2 #define PI_NETLOGON 3 #define PI_SRVSVC 4 -- cgit