summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-08 23:57:46 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-08 23:57:46 +0000
commit6909350ed9b87875ee40191b2e636c6049749195 (patch)
treefcb6234d5b30068a00bee15d60f40cd3bbb6ffe5 /source3/include
parent40eec6f6a5986c20e47a807cb7d8bc3972c92a62 (diff)
downloadsamba-6909350ed9b87875ee40191b2e636c6049749195.tar.gz
samba-6909350ed9b87875ee40191b2e636c6049749195.tar.bz2
samba-6909350ed9b87875ee40191b2e636c6049749195.zip
dce/rpc
(This used to be commit 62fdeef1b79c5c4c9bf0e860881651711bb80b9a)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/client.h101
-rw-r--r--source3/include/proto.h13
-rw-r--r--source3/include/rpc_dce.h9
3 files changed, 70 insertions, 53 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 495780cbaa..44ac147665 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -72,54 +72,59 @@ struct pwd_info
};
struct cli_state {
- int fd;
- uint16 cnum;
- uint16 pid;
- uint16 mid;
- uint16 vuid;
- int protocol;
- int sec_mode;
- int rap_error;
- int privilages;
-
- fstring eff_name;
- fstring desthost;
- fstring user_name;
- fstring domain;
-
- fstring share;
- fstring dev;
- struct nmb_name called;
- struct nmb_name calling;
- fstring full_dest_host_name;
- struct in_addr dest_ip;
-
- struct pwd_info pwd;
- unsigned char cryptkey[8];
- uint32 sesskey;
- int serverzone;
- uint32 servertime;
- int readbraw_supported;
- int writebraw_supported;
- int timeout;
- int max_xmit;
- int max_mux;
- char *outbuf;
- char *inbuf;
- int bufsize;
- int initialised;
- int win95;
- uint32 capabilities;
- /*
- * Only used in NT domain calls.
- */
- uint32 nt_error; /* NT RPC error code. */
- uint16 nt_pipe_fnum; /* Pipe handle. */
- unsigned char sess_key[16]; /* Current session key. */
- DOM_CRED clnt_cred; /* Client credential. */
- fstring mach_acct; /* MYNAME$. */
- fstring srv_name_slash; /* \\remote server. */
- fstring clnt_name_slash; /* \\local client. */
+ int fd;
+ uint16 cnum;
+ uint16 pid;
+ uint16 mid;
+ uint16 vuid;
+ int protocol;
+ int sec_mode;
+ int rap_error;
+ int privilages;
+
+ fstring eff_name;
+ fstring desthost;
+ fstring user_name;
+ fstring domain;
+
+ fstring share;
+ fstring dev;
+ struct nmb_name called;
+ struct nmb_name calling;
+ fstring full_dest_host_name;
+ struct in_addr dest_ip;
+
+ struct pwd_info pwd;
+ unsigned char cryptkey[8];
+ uint32 sesskey;
+ int serverzone;
+ uint32 servertime;
+ int readbraw_supported;
+ int writebraw_supported;
+ int timeout;
+ int max_xmit;
+ int max_mux;
+ char *outbuf;
+ char *inbuf;
+ int bufsize;
+ int initialised;
+ int win95;
+ uint32 capabilities;
+
+ /*
+ * Only used in NT domain calls.
+ */
+
+ uint32 nt_error; /* NT RPC error code. */
+ uint16 nt_pipe_fnum; /* Pipe handle. */
+ unsigned char sess_key[16]; /* Current session key. */
+ unsigned char ntlmssp_hash[256]; /* ntlmssp data. */
+ uint32 ntlmssp_cli_flgs; /* ntlmssp client flags */
+ uint32 ntlmssp_srv_flgs; /* ntlmssp server flags */
+ DOM_CRED clnt_cred; /* Client credential. */
+ fstring mach_acct; /* MYNAME$. */
+ fstring srv_name_slash; /* \\remote server. */
+ fstring clnt_name_slash; /* \\local client. */
};
#endif /* _CLIENT_H */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1c31c1076b..4cf63d2797 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -390,7 +390,9 @@ BOOL cli_close(struct cli_state *cli, int fnum);
BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout);
BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout);
size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
-size_t cli_write(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
+size_t cli_write(struct cli_state *cli,
+ int fnum, uint16 write_mode,
+ char *buf, off_t offset, size_t size);
BOOL cli_getattrE(struct cli_state *cli, int fd,
uint32 *attr, size_t *size,
time_t *c_time, time_t *a_time, time_t *m_time);
@@ -1551,13 +1553,13 @@ void make_rpc_hdr_auth(RPC_HDR_AUTH *rai,
uint8 auth_type, uint8 auth_level,
uint8 stub_type_len);
void smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth);
+void make_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
+ char *signature, uint32 msg_type);
+void smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
void make_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg,
uint32 neg_flgs,
fstring myname, fstring domain);
void smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth);
-void make_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
- char *signature, uint32 msg_type);
-void smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
void make_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL *chl,
uint32 neg_flags,
uint8 challenge[8]);
@@ -1567,6 +1569,9 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
char *domain, char *user, char *wks,
uint32 neg_flags);
void smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_struct *ps, int depth);
+void make_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk,
+ uint32 ver, uint32 crc32, uint32 seq_num);
+void smb_io_rpc_auth_ntlmssp_chk(char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth);
/*The following definitions come from rpc_parse/parse_samr.c */
diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index fe5f809f0d..982ec1f52b 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -59,12 +59,18 @@ enum NTLM_MESSAGE_TYPE
#define NTLMSSP_NEGOTIATE_SEAL 0x00000020
#define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080
#define NTLMSSP_NEGOTIATE_NTLM 0x00000200
+#define NTLMSSP_NEGOTIATE_00001000 0x00001000
+#define NTLMSSP_NEGOTIATE_00002000 0x00002000
#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000
#define NTLMSSP_NEGOTIATE_NTLM2 0x00080000
#define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000
#define NTLMSSP_NEGOTIATE_128 0x20000000
#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000
+/* NTLMSSP signature version */
+#define NTLMSSP_SIGN_VERSION 0x01
+
+
/* RPC_IFACE */
typedef struct rpc_iface_info
{
@@ -271,7 +277,8 @@ typedef struct rpc_auth_ntlmssp_resp_info
typedef struct rpc_auth_ntlmssp_chk_info
{
uint32 ver; /* 0x0000 0001 */
- uint8 crc32[8]; /* checksum using 0xEDB8 8320 as a polynomial */
+ uint32 reserved;
+ uint32 crc32; /* checksum using 0xEDB8 8320 as a polynomial */
uint32 seq_num;
} RPC_AUTH_NTLMSSP_CHK;