* samba/include/smb.h: Remove unneeded includes.
* samba/include/ntdomain.h: Remove, it's unused. * samba/include/rpc*.h: Likewise. * samba/lib/util_unistr.c: Remove unused code. * samba/include/proto.h: Regenerate. * Makefile.am: Remove unused Samba headers.
Этот коммит содержится в:
родитель
3bff4a829d
Коммит
c037f013a3
@ -1,3 +1,12 @@
|
||||
2003-08-30 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* samba/include/smb.h: Remove unneeded includes.
|
||||
* samba/include/ntdomain.h: Remove, it's unused.
|
||||
* samba/include/rpc*.h: Likewise.
|
||||
* samba/lib/util_unistr.c: Remove unused code.
|
||||
* samba/include/proto.h: Regenerate.
|
||||
* Makefile.am: Remove unused Samba headers.
|
||||
|
||||
2003-08-29 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* samba/lib/system.c: Remove all unused code.
|
||||
|
@ -118,19 +118,8 @@ SAMBA_DIST = \
|
||||
include/kanji.h \
|
||||
include/local.h \
|
||||
include/nameserv.h \
|
||||
include/ntdomain.h \
|
||||
include/nterr.h \
|
||||
include/proto.h \
|
||||
include/rpc_dce.h \
|
||||
include/rpc_lsa.h \
|
||||
include/rpc_misc.h \
|
||||
include/rpc_netlogon.h \
|
||||
include/rpc_reg.h \
|
||||
include/rpc_samr.h \
|
||||
include/rpc_secdes.h \
|
||||
include/rpc_srvsvc.h \
|
||||
include/rpc_wkssvc.h \
|
||||
include/rpcclient.h \
|
||||
include/smb.h \
|
||||
include/stamp-h.in \
|
||||
include/trans2.h \
|
||||
|
@ -1,156 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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 _NT_DOMAIN_H /* _NT_DOMAIN_H */
|
||||
#define _NT_DOMAIN_H
|
||||
|
||||
|
||||
/* dce/rpc support */
|
||||
#include "rpc_dce.h"
|
||||
|
||||
/* miscellaneous structures / defines */
|
||||
#include "rpc_misc.h"
|
||||
|
||||
/* security descriptor structures */
|
||||
#include "rpc_secdes.h"
|
||||
|
||||
/* different dce/rpc pipes */
|
||||
#include "rpc_lsa.h"
|
||||
#include "rpc_netlogon.h"
|
||||
#include "rpc_reg.h"
|
||||
#include "rpc_samr.h"
|
||||
#include "rpc_srvsvc.h"
|
||||
#include "rpc_wkssvc.h"
|
||||
|
||||
/*
|
||||
* A bunch of stuff that was put into smb.h
|
||||
* in the NTDOM branch - it didn't belong there.
|
||||
*/
|
||||
|
||||
typedef struct _prs_struct
|
||||
{
|
||||
BOOL io; /* parsing in or out of data stream */
|
||||
/*
|
||||
* If the (incoming) data is big-endian. On output we are
|
||||
* always little-endian.
|
||||
*/
|
||||
BOOL bigendian_data;
|
||||
uint8 align; /* data alignment */
|
||||
BOOL is_dynamic; /* Do we own this memory or not ? */
|
||||
uint32 data_offset; /* Current working offset into data. */
|
||||
uint32 buffer_size; /* Current size of the buffer. */
|
||||
char *data_p; /* The buffer itself. */
|
||||
} prs_struct;
|
||||
|
||||
/*
|
||||
* Defines for io member of prs_struct.
|
||||
*/
|
||||
|
||||
#define MARSHALL 0
|
||||
#define UNMARSHALL 1
|
||||
|
||||
#define MARSHALLING(ps) (!(ps)->io)
|
||||
#define UNMARSHALLING(ps) ((ps)->io)
|
||||
|
||||
typedef struct pipes_struct
|
||||
{
|
||||
struct pipes_struct *next, *prev;
|
||||
int pnum;
|
||||
connection_struct *conn;
|
||||
uint16 vuid;
|
||||
BOOL open; /* open connection */
|
||||
uint16 device_state;
|
||||
uint16 priority;
|
||||
fstring name;
|
||||
fstring pipe_srv_name;
|
||||
|
||||
RPC_HDR hdr; /* Incoming RPC header. */
|
||||
RPC_HDR_REQ hdr_req; /* Incoming request header. */
|
||||
|
||||
uint32 ntlmssp_chal_flags; /* Client challenge flags. */
|
||||
BOOL ntlmssp_auth_requested; /* If the client wanted authenticated rpc. */
|
||||
BOOL ntlmssp_auth_validated; /* If the client *got* authenticated rpc. */
|
||||
unsigned char challenge[8];
|
||||
unsigned char ntlmssp_hash[258];
|
||||
uint32 ntlmssp_seq_num;
|
||||
|
||||
/*
|
||||
* Windows user info.
|
||||
*/
|
||||
fstring user_name;
|
||||
fstring domain;
|
||||
fstring wks;
|
||||
|
||||
/*
|
||||
* Unix user name and credentials.
|
||||
*/
|
||||
fstring unix_user_name;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
|
||||
/*
|
||||
* Raw RPC output data. This does not include RPC headers or footers.
|
||||
*/
|
||||
prs_struct rdata;
|
||||
|
||||
/* The amount of data sent from the current rdata struct. */
|
||||
uint32 data_sent_length;
|
||||
|
||||
/*
|
||||
* The current PDU being returned. This inclues
|
||||
* headers, data and authentication footer.
|
||||
*/
|
||||
unsigned char current_pdu[MAX_PDU_FRAG_LEN];
|
||||
|
||||
/* The amount of data in the current_pdu buffer. */
|
||||
uint32 current_pdu_len;
|
||||
|
||||
/* The amount of data sent from the current PDU. */
|
||||
uint32 current_pdu_sent;
|
||||
|
||||
/* When replying to an SMBtrans, this is the maximum amount of
|
||||
data that can be sent in the initial reply. */
|
||||
int max_trans_reply;
|
||||
} pipes_struct;
|
||||
|
||||
struct api_struct
|
||||
{
|
||||
char *name;
|
||||
uint8 opnum;
|
||||
BOOL (*fn) (uint16 vuid, prs_struct*, prs_struct*);
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 rid;
|
||||
char *name;
|
||||
|
||||
} rid_name;
|
||||
|
||||
struct acct_info
|
||||
{
|
||||
fstring acct_name; /* account name */
|
||||
uint32 smb_userid; /* domain-relative RID */
|
||||
};
|
||||
|
||||
#endif /* _NT_DOMAIN_H */
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,332 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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 _DCE_RPC_H /* _DCE_RPC_H */
|
||||
#define _DCE_RPC_H
|
||||
|
||||
#include "rpc_misc.h" /* this only pulls in STRHDR */
|
||||
|
||||
|
||||
/* DCE/RPC packet types */
|
||||
|
||||
enum RPC_PKT_TYPE
|
||||
{
|
||||
RPC_REQUEST = 0x00,
|
||||
RPC_RESPONSE = 0x02,
|
||||
RPC_FAULT = 0x03,
|
||||
RPC_BIND = 0x0B,
|
||||
RPC_BINDACK = 0x0C,
|
||||
RPC_BINDNACK = 0x0D,
|
||||
RPC_BINDRESP = 0x10 /* not the real name! this is undocumented! */
|
||||
};
|
||||
|
||||
/* DCE/RPC flags */
|
||||
#define RPC_FLG_FIRST 0x01
|
||||
#define RPC_FLG_LAST 0x02
|
||||
|
||||
/* NTLMSSP message types */
|
||||
enum NTLM_MESSAGE_TYPE
|
||||
{
|
||||
NTLMSSP_NEGOTIATE = 1,
|
||||
NTLMSSP_CHALLENGE = 2,
|
||||
NTLMSSP_AUTH = 3,
|
||||
NTLMSSP_UNKNOWN = 4
|
||||
};
|
||||
|
||||
/* NTLMSSP negotiation flags */
|
||||
#define NTLMSSP_NEGOTIATE_UNICODE 0x00000001
|
||||
#define NTLMSSP_NEGOTIATE_OEM 0x00000002
|
||||
#define NTLMSSP_REQUEST_TARGET 0x00000004
|
||||
#define NTLMSSP_NEGOTIATE_SIGN 0x00000010
|
||||
#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
|
||||
|
||||
#define SMBD_NTLMSSP_NEG_FLAGS 0x000082b1
|
||||
|
||||
/* NTLMSSP signature version */
|
||||
#define NTLMSSP_SIGN_VERSION 0x01
|
||||
|
||||
/* NTLMSSP auth type and level. */
|
||||
#define NTLMSSP_AUTH_TYPE 0xa
|
||||
#define NTLMSSP_AUTH_LEVEL 0x6
|
||||
|
||||
/* Maximum PDU fragment size. */
|
||||
#define MAX_PDU_FRAG_LEN 0x1630
|
||||
|
||||
/*
|
||||
* Actual structure of a DCE UUID
|
||||
*/
|
||||
|
||||
typedef struct rpc_uuid
|
||||
{
|
||||
uint32 time_low;
|
||||
uint16 time_mid;
|
||||
uint16 time_hi_and_version;
|
||||
uint8 remaining[8];
|
||||
} RPC_UUID;
|
||||
|
||||
#define RPC_UUID_LEN 16
|
||||
|
||||
/* RPC_IFACE */
|
||||
typedef struct rpc_iface_info
|
||||
{
|
||||
RPC_UUID uuid; /* 16 bytes of rpc interface identification */
|
||||
uint32 version; /* the interface version number */
|
||||
|
||||
} RPC_IFACE;
|
||||
|
||||
#define RPC_IFACE_LEN (RPC_UUID_LEN + 4)
|
||||
|
||||
struct pipe_id_info
|
||||
{
|
||||
/* the names appear not to matter: the syntaxes _do_ matter */
|
||||
|
||||
char *client_pipe;
|
||||
RPC_IFACE abstr_syntax; /* this one is the abstract syntax id */
|
||||
|
||||
char *server_pipe; /* this one is the secondary syntax name */
|
||||
RPC_IFACE trans_syntax; /* this one is the primary syntax id */
|
||||
};
|
||||
|
||||
/* RPC_HDR - dce rpc header */
|
||||
typedef struct rpc_hdr_info
|
||||
{
|
||||
uint8 major; /* 5 - RPC major version */
|
||||
uint8 minor; /* 0 - RPC minor version */
|
||||
uint8 pkt_type; /* RPC_PKT_TYPE - RPC response packet */
|
||||
uint8 flags; /* DCE/RPC flags */
|
||||
uint8 pack_type[4]; /* 0x1000 0000 - little-endian packed data representation */
|
||||
uint16 frag_len; /* fragment length - data size (bytes) inc header and tail. */
|
||||
uint16 auth_len; /* 0 - authentication length */
|
||||
uint32 call_id; /* call identifier. matches 12th uint32 of incoming RPC data. */
|
||||
|
||||
} RPC_HDR;
|
||||
|
||||
#define RPC_HEADER_LEN 16
|
||||
|
||||
/* RPC_HDR_REQ - ms request rpc header */
|
||||
typedef struct rpc_hdr_req_info
|
||||
{
|
||||
uint32 alloc_hint; /* allocation hint - data size (bytes) minus header and tail. */
|
||||
uint16 context_id; /* 0 - presentation context identifier */
|
||||
uint16 opnum; /* opnum */
|
||||
|
||||
} RPC_HDR_REQ;
|
||||
|
||||
#define RPC_HDR_REQ_LEN 8
|
||||
|
||||
/* RPC_HDR_RESP - ms response rpc header */
|
||||
typedef struct rpc_hdr_resp_info
|
||||
{
|
||||
uint32 alloc_hint; /* allocation hint - data size (bytes) minus header and tail. */
|
||||
uint16 context_id; /* 0 - presentation context identifier */
|
||||
uint8 cancel_count; /* 0 - cancel count */
|
||||
uint8 reserved; /* 0 - reserved. */
|
||||
|
||||
} RPC_HDR_RESP;
|
||||
|
||||
#define RPC_HDR_RESP_LEN 8
|
||||
|
||||
/* this seems to be the same string name depending on the name of the pipe,
|
||||
* but is more likely to be linked to the interface name
|
||||
* "srvsvc", "\\PIPE\\ntsvcs"
|
||||
* "samr", "\\PIPE\\lsass"
|
||||
* "wkssvc", "\\PIPE\\wksvcs"
|
||||
* "NETLOGON", "\\PIPE\\NETLOGON"
|
||||
*/
|
||||
/* RPC_ADDR_STR */
|
||||
typedef struct rpc_addr_info
|
||||
{
|
||||
uint16 len; /* length of the string including null terminator */
|
||||
fstring str; /* the string above in single byte, null terminated form */
|
||||
|
||||
} RPC_ADDR_STR;
|
||||
|
||||
/* RPC_HDR_BBA */
|
||||
typedef struct rpc_hdr_bba_info
|
||||
{
|
||||
uint16 max_tsize; /* maximum transmission fragment size (0x1630) */
|
||||
uint16 max_rsize; /* max receive fragment size (0x1630) */
|
||||
uint32 assoc_gid; /* associated group id (0x0) */
|
||||
|
||||
} RPC_HDR_BBA;
|
||||
|
||||
#define RPC_HDR_BBA_LEN 8
|
||||
|
||||
/* RPC_HDR_AUTHA */
|
||||
typedef struct rpc_hdr_autha_info
|
||||
{
|
||||
uint16 max_tsize; /* maximum transmission fragment size (0x1630) */
|
||||
uint16 max_rsize; /* max receive fragment size (0x1630) */
|
||||
|
||||
uint8 auth_type; /* 0x0a */
|
||||
uint8 auth_level; /* 0x06 */
|
||||
uint8 stub_type_len; /* don't know */
|
||||
uint8 padding; /* padding */
|
||||
|
||||
uint32 unknown; /* 0x0014a0c0 */
|
||||
|
||||
} RPC_HDR_AUTHA;
|
||||
|
||||
#define RPC_HDR_AUTHA_LEN 12
|
||||
|
||||
/* RPC_HDR_AUTH */
|
||||
typedef struct rpc_hdr_auth_info
|
||||
{
|
||||
uint8 auth_type; /* 0x0a */
|
||||
uint8 auth_level; /* 0x06 */
|
||||
uint8 stub_type_len; /* don't know */
|
||||
uint8 padding; /* padding */
|
||||
|
||||
uint32 unknown; /* pointer */
|
||||
|
||||
} RPC_HDR_AUTH;
|
||||
|
||||
#define RPC_HDR_AUTH_LEN 8
|
||||
|
||||
/* RPC_BIND_REQ - ms req bind */
|
||||
typedef struct rpc_bind_req_info
|
||||
{
|
||||
RPC_HDR_BBA bba;
|
||||
|
||||
uint32 num_elements; /* the number of elements (0x1) */
|
||||
uint16 context_id; /* presentation context identifier (0x0) */
|
||||
uint8 num_syntaxes; /* the number of syntaxes (has always been 1?)(0x1) */
|
||||
|
||||
RPC_IFACE abstract; /* num and vers. of interface client is using */
|
||||
RPC_IFACE transfer; /* num and vers. of interface to use for replies */
|
||||
|
||||
} RPC_HDR_RB;
|
||||
|
||||
/*
|
||||
* The following length is 8 bytes RPC_HDR_BBA_LEN, 8 bytes internals
|
||||
* (with 3 bytes padding), + 2 x RPC_IFACE_LEN bytes for RPC_IFACE structs.
|
||||
*/
|
||||
|
||||
#define RPC_HDR_RB_LEN (RPC_HDR_BBA_LEN + 8 + (2*RPC_IFACE_LEN))
|
||||
|
||||
/* RPC_RESULTS - can only cope with one reason, right now... */
|
||||
typedef struct rpc_results_info
|
||||
{
|
||||
/* uint8[] # 4-byte alignment padding, against SMB header */
|
||||
|
||||
uint8 num_results; /* the number of results (0x01) */
|
||||
|
||||
/* uint8[] # 4-byte alignment padding, against SMB header */
|
||||
|
||||
uint16 result; /* result (0x00 = accept) */
|
||||
uint16 reason; /* reason (0x00 = no reason specified) */
|
||||
|
||||
} RPC_RESULTS;
|
||||
|
||||
/* RPC_HDR_BA */
|
||||
typedef struct rpc_hdr_ba_info
|
||||
{
|
||||
RPC_HDR_BBA bba;
|
||||
|
||||
RPC_ADDR_STR addr ; /* the secondary address string, as described earlier */
|
||||
RPC_RESULTS res ; /* results and reasons */
|
||||
RPC_IFACE transfer; /* the transfer syntax from the request */
|
||||
|
||||
} RPC_HDR_BA;
|
||||
|
||||
/* RPC_AUTH_VERIFIER */
|
||||
typedef struct rpc_auth_verif_info
|
||||
{
|
||||
fstring signature; /* "NTLMSSP" */
|
||||
uint32 msg_type; /* NTLMSSP_MESSAGE_TYPE (1,2,3) */
|
||||
|
||||
} RPC_AUTH_VERIFIER;
|
||||
|
||||
/* this is TEMPORARILY coded up as a specific structure */
|
||||
/* this structure comes after the bind request */
|
||||
/* RPC_AUTH_NTLMSSP_NEG */
|
||||
typedef struct rpc_auth_ntlmssp_neg_info
|
||||
{
|
||||
uint32 neg_flgs; /* 0x0000 b2b3 */
|
||||
|
||||
STRHDR hdr_myname; /* offset is against START of this structure */
|
||||
STRHDR hdr_domain; /* offset is against START of this structure */
|
||||
|
||||
fstring myname; /* calling workstation's name */
|
||||
fstring domain; /* calling workstations's domain */
|
||||
|
||||
} RPC_AUTH_NTLMSSP_NEG;
|
||||
|
||||
/* this is TEMPORARILY coded up as a specific structure */
|
||||
/* this structure comes after the bind acknowledgement */
|
||||
/* RPC_AUTH_NTLMSSP_CHAL */
|
||||
typedef struct rpc_auth_ntlmssp_chal_info
|
||||
{
|
||||
uint32 unknown_1; /* 0x0000 0000 */
|
||||
uint32 unknown_2; /* 0x0000 0028 */
|
||||
uint32 neg_flags; /* 0x0000 82b1 */
|
||||
|
||||
uint8 challenge[8]; /* ntlm challenge */
|
||||
uint8 reserved [8]; /* zeros */
|
||||
|
||||
} RPC_AUTH_NTLMSSP_CHAL;
|
||||
|
||||
|
||||
/* RPC_AUTH_NTLMSSP_RESP */
|
||||
typedef struct rpc_auth_ntlmssp_resp_info
|
||||
{
|
||||
STRHDR hdr_lm_resp; /* 24 byte response */
|
||||
STRHDR hdr_nt_resp; /* 24 byte response */
|
||||
STRHDR hdr_domain;
|
||||
STRHDR hdr_usr;
|
||||
STRHDR hdr_wks;
|
||||
STRHDR hdr_sess_key; /* NULL unless negotiated */
|
||||
uint32 neg_flags; /* 0x0000 82b1 */
|
||||
|
||||
fstring sess_key;
|
||||
fstring wks;
|
||||
fstring user;
|
||||
fstring domain;
|
||||
fstring nt_resp;
|
||||
fstring lm_resp;
|
||||
|
||||
} RPC_AUTH_NTLMSSP_RESP;
|
||||
|
||||
/* attached to the end of encrypted rpc requests and responses */
|
||||
/* RPC_AUTH_NTLMSSP_CHK */
|
||||
typedef struct rpc_auth_ntlmssp_chk_info
|
||||
{
|
||||
uint32 ver; /* 0x0000 0001 */
|
||||
uint32 reserved;
|
||||
uint32 crc32; /* checksum using 0xEDB8 8320 as a polynomial */
|
||||
uint32 seq_num;
|
||||
|
||||
} RPC_AUTH_NTLMSSP_CHK;
|
||||
|
||||
#define RPC_AUTH_NTLMSSP_CHK_LEN 16
|
||||
|
||||
#endif /* _DCE_RPC_H */
|
@ -1,327 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_LSA_H /* _RPC_LSA_H */
|
||||
#define _RPC_LSA_H
|
||||
|
||||
#include "rpc_misc.h"
|
||||
|
||||
enum SID_NAME_USE
|
||||
{
|
||||
SID_NAME_USER = 1, /* user */
|
||||
SID_NAME_DOM_GRP = 2, /* domain group */
|
||||
SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
|
||||
SID_NAME_ALIAS = 4, /* local group */
|
||||
SID_NAME_WKN_GRP = 5, /* well-known group */
|
||||
SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
|
||||
SID_NAME_INVALID = 7, /* invalid account */
|
||||
SID_NAME_UNKNOWN = 8 /* oops. */
|
||||
};
|
||||
|
||||
/* ntlsa pipe */
|
||||
#define LSA_CLOSE 0x00
|
||||
#define LSA_QUERYINFOPOLICY 0x07
|
||||
#define LSA_ENUMTRUSTDOM 0x0d
|
||||
#define LSA_LOOKUPNAMES 0x0e
|
||||
#define LSA_LOOKUPSIDS 0x0f
|
||||
#define LSA_OPENPOLICY 0x06
|
||||
#define LSA_OPENPOLICY2 0x2c
|
||||
#define LSA_OPENSECRET 0x1C
|
||||
|
||||
/* XXXX these are here to get a compile! */
|
||||
#define LSA_LOOKUPRIDS 0xFD
|
||||
|
||||
#define LSA_MAX_GROUPS 96
|
||||
#define LSA_MAX_SIDS 32
|
||||
|
||||
/* DOM_QUERY - info class 3 and 5 LSA Query response */
|
||||
typedef struct dom_query_info
|
||||
{
|
||||
uint16 uni_dom_max_len; /* domain name string length * 2 */
|
||||
uint16 uni_dom_str_len; /* domain name string length * 2 */
|
||||
uint32 buffer_dom_name; /* undocumented domain name string buffer pointer */
|
||||
uint32 buffer_dom_sid; /* undocumented domain SID string buffer pointer */
|
||||
UNISTR2 uni_domain_name; /* domain name (unicode string) */
|
||||
DOM_SID2 dom_sid; /* domain SID */
|
||||
|
||||
} DOM_QUERY;
|
||||
|
||||
/* level 5 is same as level 3. we hope. */
|
||||
typedef DOM_QUERY DOM_QUERY_3;
|
||||
typedef DOM_QUERY DOM_QUERY_5;
|
||||
|
||||
typedef struct seq_qos_info
|
||||
{
|
||||
uint32 len; /* 12 */
|
||||
uint16 sec_imp_level; /* 0x02 - impersonation level */
|
||||
uint8 sec_ctxt_mode; /* 0x01 - context tracking mode */
|
||||
uint8 effective_only; /* 0x00 - effective only */
|
||||
uint32 unknown; /* 0x2000 0000 - not known */
|
||||
|
||||
} LSA_SEC_QOS;
|
||||
|
||||
typedef struct obj_attr_info
|
||||
{
|
||||
uint32 len; /* 0x18 - length (in bytes) inc. the length field. */
|
||||
uint32 ptr_root_dir; /* 0 - root directory (pointer) */
|
||||
uint32 ptr_obj_name; /* 0 - object name (pointer) */
|
||||
uint32 attributes; /* 0 - attributes (undocumented) */
|
||||
uint32 ptr_sec_desc; /* 0 - security descriptior (pointer) */
|
||||
uint32 ptr_sec_qos; /* security quality of service */
|
||||
LSA_SEC_QOS *sec_qos;
|
||||
|
||||
} LSA_OBJ_ATTR;
|
||||
|
||||
/* LSA_Q_OPEN_POL - LSA Query Open Policy */
|
||||
typedef struct lsa_q_open_pol_info
|
||||
{
|
||||
uint32 ptr; /* undocumented buffer pointer */
|
||||
uint16 system_name; /* 0x5c - system name */
|
||||
LSA_OBJ_ATTR attr ; /* object attributes */
|
||||
|
||||
uint32 des_access; /* desired access attributes */
|
||||
|
||||
} LSA_Q_OPEN_POL;
|
||||
|
||||
/* LSA_R_OPEN_POL - response to LSA Open Policy */
|
||||
typedef struct lsa_r_open_pol_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_OPEN_POL;
|
||||
|
||||
/* LSA_Q_OPEN_POL2 - LSA Query Open Policy */
|
||||
typedef struct lsa_q_open_pol2_info
|
||||
{
|
||||
uint32 ptr; /* undocumented buffer pointer */
|
||||
UNISTR2 uni_server_name; /* server name, starting with two '\'s */
|
||||
LSA_OBJ_ATTR attr ; /* object attributes */
|
||||
|
||||
uint32 des_access; /* desired access attributes */
|
||||
|
||||
} LSA_Q_OPEN_POL2;
|
||||
|
||||
/* LSA_R_OPEN_POL2 - response to LSA Open Policy */
|
||||
typedef struct lsa_r_open_pol2_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_OPEN_POL2;
|
||||
|
||||
/* LSA_Q_QUERY_INFO - LSA query info policy */
|
||||
typedef struct lsa_query_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint16 info_class; /* info class */
|
||||
|
||||
} LSA_Q_QUERY_INFO;
|
||||
|
||||
/* LSA_R_QUERY_INFO - response to LSA query info policy */
|
||||
typedef struct lsa_r_query_info
|
||||
{
|
||||
uint32 undoc_buffer; /* undocumented buffer pointer */
|
||||
uint16 info_class; /* info class (same as info class in request) */
|
||||
|
||||
union
|
||||
{
|
||||
DOM_QUERY_3 id3;
|
||||
DOM_QUERY_5 id5;
|
||||
|
||||
} dom;
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_QUERY_INFO;
|
||||
|
||||
/* LSA_Q_ENUM_TRUST_DOM - LSA enumerate trusted domains */
|
||||
typedef struct lsa_enum_trust_dom_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 enum_context; /* enumeration context handle */
|
||||
uint32 preferred_len; /* preferred maximum length */
|
||||
|
||||
} LSA_Q_ENUM_TRUST_DOM;
|
||||
|
||||
/* LSA_R_ENUM_TRUST_DOM - response to LSA enumerate trusted domains */
|
||||
typedef struct lsa_r_enum_trust_dom_info
|
||||
{
|
||||
uint32 enum_context; /* enumeration context handle */
|
||||
uint32 num_domains; /* number of domains */
|
||||
uint32 ptr_enum_domains; /* buffer pointer to num domains */
|
||||
|
||||
/* this lot is only added if ptr_enum_domains is non-NULL */
|
||||
uint32 num_domains2; /* number of domains */
|
||||
UNIHDR2 hdr_domain_name;
|
||||
UNISTR2 uni_domain_name;
|
||||
DOM_SID2 other_domain_sid;
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_ENUM_TRUST_DOM;
|
||||
|
||||
/* LSA_Q_CLOSE */
|
||||
typedef struct lsa_q_close_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
} LSA_Q_CLOSE;
|
||||
|
||||
/* LSA_R_CLOSE */
|
||||
typedef struct lsa_r_close_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle. should be all zeros. */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_CLOSE;
|
||||
|
||||
|
||||
#define MAX_REF_DOMAINS 32
|
||||
|
||||
/* DOM_TRUST_HDR */
|
||||
typedef struct dom_trust_hdr
|
||||
{
|
||||
UNIHDR hdr_dom_name; /* referenced domain unicode string headers */
|
||||
uint32 ptr_dom_sid;
|
||||
|
||||
} DOM_TRUST_HDR;
|
||||
|
||||
/* DOM_TRUST_INFO */
|
||||
typedef struct dom_trust_info
|
||||
{
|
||||
UNISTR2 uni_dom_name; /* domain name unicode string */
|
||||
DOM_SID2 ref_dom ; /* referenced domain SID */
|
||||
|
||||
} DOM_TRUST_INFO;
|
||||
|
||||
/* DOM_R_REF */
|
||||
typedef struct dom_ref_info
|
||||
{
|
||||
uint32 num_ref_doms_1; /* num referenced domains */
|
||||
uint32 ptr_ref_dom; /* pointer to referenced domains */
|
||||
uint32 max_entries; /* 32 - max number of entries */
|
||||
uint32 num_ref_doms_2; /* num referenced domains */
|
||||
|
||||
DOM_TRUST_HDR hdr_ref_dom[MAX_REF_DOMAINS]; /* referenced domains */
|
||||
DOM_TRUST_INFO ref_dom [MAX_REF_DOMAINS]; /* referenced domains */
|
||||
|
||||
} DOM_R_REF;
|
||||
|
||||
/* the domain_idx points to a SID associated with the name */
|
||||
|
||||
/* LSA_TRANS_NAME - translated name */
|
||||
typedef struct lsa_trans_name_info
|
||||
{
|
||||
uint32 sid_name_use; /* value is 5 for a well-known group; 2 for a domain group; 1 for a user... */
|
||||
UNIHDR hdr_name;
|
||||
uint32 domain_idx; /* index into DOM_R_REF array of SIDs */
|
||||
|
||||
} LSA_TRANS_NAME;
|
||||
|
||||
#define MAX_LOOKUP_SIDS 30
|
||||
|
||||
/* LSA_TRANS_NAME_ENUM - LSA Translated Name Enumeration container */
|
||||
typedef struct lsa_trans_name_enum_info
|
||||
{
|
||||
uint32 num_entries;
|
||||
uint32 ptr_trans_names;
|
||||
uint32 num_entries2;
|
||||
|
||||
LSA_TRANS_NAME name [MAX_LOOKUP_SIDS]; /* translated names */
|
||||
UNISTR2 uni_name[MAX_LOOKUP_SIDS];
|
||||
|
||||
} LSA_TRANS_NAME_ENUM;
|
||||
|
||||
/* LSA_SID_ENUM - LSA SID enumeration container */
|
||||
typedef struct lsa_sid_enum_info
|
||||
{
|
||||
uint32 num_entries;
|
||||
uint32 ptr_sid_enum;
|
||||
uint32 num_entries2;
|
||||
|
||||
uint32 ptr_sid[MAX_LOOKUP_SIDS]; /* domain SID pointers to be looked up. */
|
||||
DOM_SID2 sid [MAX_LOOKUP_SIDS]; /* domain SIDs to be looked up. */
|
||||
|
||||
} LSA_SID_ENUM;
|
||||
|
||||
/* LSA_Q_LOOKUP_SIDS - LSA Lookup SIDs */
|
||||
typedef struct lsa_q_lookup_sids
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
LSA_SID_ENUM sids;
|
||||
LSA_TRANS_NAME_ENUM names;
|
||||
LOOKUP_LEVEL level;
|
||||
uint32 mapped_count;
|
||||
|
||||
} LSA_Q_LOOKUP_SIDS;
|
||||
|
||||
/* LSA_R_LOOKUP_SIDS - response to LSA Lookup SIDs */
|
||||
typedef struct lsa_r_lookup_sids
|
||||
{
|
||||
uint32 ptr_dom_ref;
|
||||
DOM_R_REF *dom_ref; /* domain reference info */
|
||||
|
||||
LSA_TRANS_NAME_ENUM *names;
|
||||
uint32 mapped_count;
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_LOOKUP_SIDS;
|
||||
|
||||
/* LSA_Q_LOOKUP_NAMES - LSA Lookup NAMEs */
|
||||
typedef struct lsa_q_lookup_names
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 num_entries;
|
||||
uint32 num_entries2;
|
||||
UNIHDR hdr_name[MAX_LOOKUP_SIDS]; /* name buffer pointers */
|
||||
UNISTR2 uni_name[MAX_LOOKUP_SIDS]; /* names to be looked up */
|
||||
|
||||
uint32 num_trans_entries;
|
||||
uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
|
||||
uint32 lookup_level;
|
||||
uint32 mapped_count;
|
||||
|
||||
} LSA_Q_LOOKUP_NAMES;
|
||||
|
||||
/* LSA_R_LOOKUP_NAMES - response to LSA Lookup NAMEs by name */
|
||||
typedef struct lsa_r_lookup_names
|
||||
{
|
||||
uint32 ptr_dom_ref;
|
||||
DOM_R_REF *dom_ref; /* domain reference info */
|
||||
|
||||
uint32 num_entries;
|
||||
uint32 ptr_entries;
|
||||
uint32 num_entries2;
|
||||
DOM_RID2 *dom_rid; /* domain RIDs being looked up */
|
||||
|
||||
uint32 mapped_count;
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} LSA_R_LOOKUP_NAMES;
|
||||
|
||||
#endif /* _RPC_LSA_H */
|
||||
|
@ -1,289 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_MISC_H /* _RPC_MISC_H */
|
||||
#define _RPC_MISC_H
|
||||
|
||||
|
||||
#include "rpc_dce.h"
|
||||
|
||||
/* well-known RIDs - Relative IDs */
|
||||
|
||||
/* RIDs - Well-known users ... */
|
||||
#define DOMAIN_USER_RID_ADMIN (0x000001F4L)
|
||||
#define DOMAIN_USER_RID_GUEST (0x000001F5L)
|
||||
|
||||
/* RIDs - well-known groups ... */
|
||||
#define DOMAIN_GROUP_RID_ADMINS (0x00000200L)
|
||||
#define DOMAIN_GROUP_RID_USERS (0x00000201L)
|
||||
#define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
|
||||
|
||||
/* RIDs - well-known aliases ... */
|
||||
#define BUILTIN_ALIAS_RID_ADMINS (0x00000220L)
|
||||
#define BUILTIN_ALIAS_RID_USERS (0x00000221L)
|
||||
#define BUILTIN_ALIAS_RID_GUESTS (0x00000222L)
|
||||
#define BUILTIN_ALIAS_RID_POWER_USERS (0x00000223L)
|
||||
|
||||
#define BUILTIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
|
||||
#define BUILTIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
|
||||
#define BUILTIN_ALIAS_RID_PRINT_OPS (0x00000226L)
|
||||
#define BUILTIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
|
||||
|
||||
#define BUILTIN_ALIAS_RID_REPLICATOR (0x00000228L)
|
||||
|
||||
/*
|
||||
* Masks for mappings between unix uid and gid types and
|
||||
* NT RIDS.
|
||||
*/
|
||||
|
||||
/* Take the bottom bit. */
|
||||
#define RID_TYPE_MASK 1
|
||||
#define RID_MULTIPLIER 2
|
||||
|
||||
/* The two common types. */
|
||||
#define USER_RID_TYPE 0
|
||||
#define GROUP_RID_TYPE 1
|
||||
|
||||
/* ENUM_HND */
|
||||
typedef struct enum_hnd_info
|
||||
{
|
||||
uint32 ptr_hnd; /* pointer to enumeration handle */
|
||||
uint32 handle; /* enumeration handle */
|
||||
|
||||
} ENUM_HND;
|
||||
|
||||
/* LOOKUP_LEVEL - switch value */
|
||||
typedef struct lookup_level_info
|
||||
{
|
||||
uint16 value;
|
||||
|
||||
} LOOKUP_LEVEL;
|
||||
|
||||
/* DOM_SID2 - security id */
|
||||
typedef struct sid_info_2
|
||||
{
|
||||
uint32 num_auths; /* length, bytes, including length of len :-) */
|
||||
|
||||
DOM_SID sid;
|
||||
|
||||
} DOM_SID2;
|
||||
|
||||
/* STRHDR - string header */
|
||||
typedef struct header_info
|
||||
{
|
||||
uint16 str_str_len;
|
||||
uint16 str_max_len;
|
||||
uint32 buffer; /* non-zero */
|
||||
|
||||
} STRHDR;
|
||||
|
||||
/* UNIHDR - unicode string header */
|
||||
typedef struct unihdr_info
|
||||
{
|
||||
uint16 uni_str_len;
|
||||
uint16 uni_max_len;
|
||||
uint32 buffer; /* usually has a value of 4 */
|
||||
|
||||
} UNIHDR;
|
||||
|
||||
/* UNIHDR2 - unicode string header and undocumented buffer */
|
||||
typedef struct unihdr2_info
|
||||
{
|
||||
UNIHDR unihdr;
|
||||
uint32 buffer; /* 32 bit buffer pointer */
|
||||
|
||||
} UNIHDR2;
|
||||
|
||||
/* clueless as to what maximum length should be */
|
||||
#define MAX_UNISTRLEN 256
|
||||
#define MAX_STRINGLEN 256
|
||||
#define MAX_BUFFERLEN 512
|
||||
|
||||
/* UNISTR - unicode string size and buffer */
|
||||
typedef struct unistr_info
|
||||
{
|
||||
/* unicode characters. ***MUST*** be little-endian. ***MUST*** be null-terminated */
|
||||
uint16 buffer[MAX_UNISTRLEN];
|
||||
} UNISTR;
|
||||
|
||||
/* BUFHDR - buffer header */
|
||||
typedef struct bufhdr_info
|
||||
{
|
||||
uint32 buf_max_len;
|
||||
uint32 buf_len;
|
||||
|
||||
} BUFHDR;
|
||||
|
||||
/* BUFFER2 - unicode string, size (in uint8 ascii chars) and buffer */
|
||||
/* pathetic. some stupid team of \PIPE\winreg writers got the concept */
|
||||
/* of a unicode string different from the other \PIPE\ writers */
|
||||
typedef struct buffer2_info
|
||||
{
|
||||
uint32 buf_max_len;
|
||||
uint32 undoc;
|
||||
uint32 buf_len;
|
||||
/* unicode characters. ***MUST*** be little-endian. **NOT** necessarily null-terminated */
|
||||
uint16 buffer[MAX_UNISTRLEN];
|
||||
|
||||
} BUFFER2;
|
||||
|
||||
/* BUFFER3 */
|
||||
typedef struct buffer3_info
|
||||
{
|
||||
uint32 buf_max_len;
|
||||
uint8 buffer[MAX_BUFFERLEN]; /* data */
|
||||
uint32 buf_len;
|
||||
|
||||
} BUFFER3;
|
||||
|
||||
/* UNISTR2 - unicode string size (in uint16 unicode chars) and buffer */
|
||||
typedef struct unistr2_info
|
||||
{
|
||||
uint32 uni_max_len;
|
||||
uint32 undoc;
|
||||
uint32 uni_str_len;
|
||||
/* unicode characters. ***MUST*** be little-endian. **NOT** necessarily null-terminated */
|
||||
uint16 buffer[MAX_UNISTRLEN];
|
||||
|
||||
} UNISTR2;
|
||||
|
||||
/* STRING2 - string size (in uint8 chars) and buffer */
|
||||
typedef struct string2_info
|
||||
{
|
||||
uint32 str_max_len;
|
||||
uint32 undoc;
|
||||
uint32 str_str_len;
|
||||
uint8 buffer[MAX_STRINGLEN]; /* uint8 characters. **NOT** necessarily null-terminated */
|
||||
|
||||
} STRING2;
|
||||
|
||||
/* UNISTR3 - XXXX not sure about this structure */
|
||||
typedef struct unistr3_info
|
||||
{
|
||||
uint32 uni_str_len;
|
||||
UNISTR str;
|
||||
|
||||
} UNISTR3;
|
||||
|
||||
|
||||
/* DOM_RID2 - domain RID structure for ntlsa pipe */
|
||||
typedef struct domrid2_info
|
||||
{
|
||||
uint8 type; /* value is SID_NAME_USE enum */
|
||||
uint32 rid;
|
||||
uint32 rid_idx; /* referenced domain index */
|
||||
|
||||
} DOM_RID2;
|
||||
|
||||
/* DOM_RID3 - domain RID structure for samr pipe */
|
||||
typedef struct domrid3_info
|
||||
{
|
||||
uint32 rid; /* domain-relative (to a SID) id */
|
||||
uint32 type1; /* value is 0x1 */
|
||||
uint32 ptr_type; /* undocumented pointer */
|
||||
uint32 type2; /* value is 0x1 */
|
||||
uint32 unk; /* value is 0x2 */
|
||||
|
||||
} DOM_RID3;
|
||||
|
||||
/* DOM_RID4 - rid + user attributes */
|
||||
typedef struct domrid4_info
|
||||
{
|
||||
uint32 unknown;
|
||||
uint16 attr;
|
||||
uint32 rid; /* user RID */
|
||||
|
||||
} DOM_RID4;
|
||||
|
||||
/* DOM_CLNT_SRV - client / server names */
|
||||
typedef struct clnt_srv_info
|
||||
{
|
||||
uint32 undoc_buffer; /* undocumented 32 bit buffer pointer */
|
||||
UNISTR2 uni_logon_srv; /* logon server name */
|
||||
uint32 undoc_buffer2; /* undocumented 32 bit buffer pointer */
|
||||
UNISTR2 uni_comp_name; /* client machine name */
|
||||
|
||||
} DOM_CLNT_SRV;
|
||||
|
||||
/* DOM_LOG_INFO - login info */
|
||||
typedef struct log_info
|
||||
{
|
||||
uint32 undoc_buffer; /* undocumented 32 bit buffer pointer */
|
||||
UNISTR2 uni_logon_srv; /* logon server name */
|
||||
UNISTR2 uni_acct_name; /* account name */
|
||||
uint16 sec_chan; /* secure channel type */
|
||||
UNISTR2 uni_comp_name; /* client machine name */
|
||||
|
||||
} DOM_LOG_INFO;
|
||||
|
||||
/* DOM_CLNT_INFO - client info */
|
||||
typedef struct clnt_info
|
||||
{
|
||||
DOM_LOG_INFO login;
|
||||
DOM_CRED cred;
|
||||
|
||||
} DOM_CLNT_INFO;
|
||||
|
||||
/* DOM_CLNT_INFO2 - client info */
|
||||
typedef struct clnt_info2
|
||||
{
|
||||
DOM_CLNT_SRV login;
|
||||
uint32 ptr_cred;
|
||||
DOM_CRED cred;
|
||||
|
||||
} DOM_CLNT_INFO2;
|
||||
|
||||
/* DOM_LOGON_ID - logon id */
|
||||
typedef struct logon_info
|
||||
{
|
||||
uint32 low;
|
||||
uint32 high;
|
||||
|
||||
} DOM_LOGON_ID;
|
||||
|
||||
/* OWF INFO */
|
||||
typedef struct owf_info
|
||||
{
|
||||
uint8 data[16];
|
||||
|
||||
} OWF_INFO;
|
||||
|
||||
|
||||
/* DOM_GID - group id + user attributes */
|
||||
typedef struct gid_info
|
||||
{
|
||||
uint32 g_rid; /* a group RID */
|
||||
uint32 attr;
|
||||
|
||||
} DOM_GID;
|
||||
|
||||
#define POL_HND_SIZE 20
|
||||
|
||||
/* POLICY_HND */
|
||||
typedef struct lsa_policy_info
|
||||
{
|
||||
uint8 data[POL_HND_SIZE]; /* policy handle */
|
||||
|
||||
} POLICY_HND;
|
||||
|
||||
#endif /* _RPC_MISC_H */
|
@ -1,403 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_NETLOGON_H /* _RPC_NETLOGON_H */
|
||||
#define _RPC_NETLOGON_H
|
||||
|
||||
|
||||
/* NETLOGON pipe */
|
||||
#define NET_REQCHAL 0x04
|
||||
#define NET_SRVPWSET 0x06
|
||||
#define NET_SAMLOGON 0x02
|
||||
#define NET_SAMLOGOFF 0x03
|
||||
#define NET_AUTH2 0x0f
|
||||
#define NET_LOGON_CTRL2 0x0e
|
||||
#define NET_TRUST_DOM_LIST 0x13
|
||||
|
||||
/* Secure Channel types. used in NetrServerAuthenticate negotiation */
|
||||
#define SEC_CHAN_WKSTA 2
|
||||
#define SEC_CHAN_DOMAIN 4
|
||||
|
||||
#if 0
|
||||
/* JRATEST.... */
|
||||
/* NET_USER_INFO_2 */
|
||||
typedef struct net_user_info_2
|
||||
{
|
||||
uint32 ptr_user_info;
|
||||
|
||||
NTTIME logon_time; /* logon time */
|
||||
NTTIME logoff_time; /* logoff time */
|
||||
NTTIME kickoff_time; /* kickoff time */
|
||||
NTTIME pass_last_set_time; /* password last set time */
|
||||
NTTIME pass_can_change_time; /* password can change time */
|
||||
NTTIME pass_must_change_time; /* password must change time */
|
||||
|
||||
....
|
||||
uint32 user_id; /* User ID */
|
||||
uint32 group_id; /* Group ID */
|
||||
....
|
||||
uint32 num_groups2; /* num groups */
|
||||
DOM_GID gids[LSA_MAX_GROUPS]; /* group info */
|
||||
|
||||
UNIHDR hdr_logon_srv; /* logon server unicode string header */
|
||||
UNISTR2 uni_logon_dom; /* logon domain unicode string */
|
||||
DOM_SID2 dom_sid;
|
||||
|
||||
} NET_USER_INFO_2;
|
||||
/* ! JRATEST.... */
|
||||
#endif
|
||||
|
||||
/* NET_USER_INFO_3 */
|
||||
typedef struct net_user_info_3
|
||||
{
|
||||
uint32 ptr_user_info;
|
||||
|
||||
NTTIME logon_time; /* logon time */
|
||||
NTTIME logoff_time; /* logoff time */
|
||||
NTTIME kickoff_time; /* kickoff time */
|
||||
NTTIME pass_last_set_time; /* password last set time */
|
||||
NTTIME pass_can_change_time; /* password can change time */
|
||||
NTTIME pass_must_change_time; /* password must change time */
|
||||
|
||||
UNIHDR hdr_user_name; /* username unicode string header */
|
||||
UNIHDR hdr_full_name; /* user's full name unicode string header */
|
||||
UNIHDR hdr_logon_script; /* logon script unicode string header */
|
||||
UNIHDR hdr_profile_path; /* profile path unicode string header */
|
||||
UNIHDR hdr_home_dir; /* home directory unicode string header */
|
||||
UNIHDR hdr_dir_drive; /* home directory drive unicode string header */
|
||||
|
||||
uint16 logon_count; /* logon count */
|
||||
uint16 bad_pw_count; /* bad password count */
|
||||
|
||||
uint32 user_id; /* User ID */
|
||||
uint32 group_id; /* Group ID */
|
||||
uint32 num_groups; /* num groups */
|
||||
uint32 buffer_groups; /* undocumented buffer pointer to groups. */
|
||||
uint32 user_flgs; /* user flags */
|
||||
|
||||
uint8 user_sess_key[16]; /* unused user session key */
|
||||
|
||||
UNIHDR hdr_logon_srv; /* logon server unicode string header */
|
||||
UNIHDR hdr_logon_dom; /* logon domain unicode string header */
|
||||
|
||||
uint32 buffer_dom_id; /* undocumented logon domain id pointer */
|
||||
uint8 padding[40]; /* unused padding bytes. expansion room */
|
||||
|
||||
uint32 num_other_sids; /* 0 - num_sids */
|
||||
uint32 buffer_other_sids; /* NULL - undocumented pointer to SIDs. */
|
||||
|
||||
UNISTR2 uni_user_name; /* username unicode string */
|
||||
UNISTR2 uni_full_name; /* user's full name unicode string */
|
||||
UNISTR2 uni_logon_script; /* logon script unicode string */
|
||||
UNISTR2 uni_profile_path; /* profile path unicode string */
|
||||
UNISTR2 uni_home_dir; /* home directory unicode string */
|
||||
UNISTR2 uni_dir_drive; /* home directory drive unicode string */
|
||||
|
||||
uint32 num_groups2; /* num groups */
|
||||
DOM_GID gids[LSA_MAX_GROUPS]; /* group info */
|
||||
|
||||
UNISTR2 uni_logon_srv; /* logon server unicode string */
|
||||
UNISTR2 uni_logon_dom; /* logon domain unicode string */
|
||||
|
||||
DOM_SID2 dom_sid; /* domain SID */
|
||||
DOM_SID2 other_sids[LSA_MAX_SIDS]; /* undocumented - domain SIDs */
|
||||
|
||||
} NET_USER_INFO_3;
|
||||
|
||||
|
||||
/********************************************************
|
||||
Logon Control Query
|
||||
|
||||
query_level 0x1 - pdc status
|
||||
query_level 0x3 - number of logon attempts.
|
||||
|
||||
********************************************************/
|
||||
/* NET_Q_LOGON_CTRL2 - LSA Netr Logon Control 2*/
|
||||
typedef struct net_q_logon_ctrl2_info
|
||||
{
|
||||
uint32 ptr; /* undocumented buffer pointer */
|
||||
UNISTR2 uni_server_name; /* server name, starting with two '\'s */
|
||||
|
||||
uint32 function_code; /* 0x1 */
|
||||
uint32 query_level; /* 0x1, 0x3 */
|
||||
uint32 switch_value; /* 0x1 */
|
||||
|
||||
} NET_Q_LOGON_CTRL2;
|
||||
|
||||
/* NETLOGON_INFO_1 - pdc status info, i presume */
|
||||
typedef struct netlogon_1_info
|
||||
{
|
||||
uint32 flags; /* 0x0 - undocumented */
|
||||
uint32 pdc_status; /* 0x0 - undocumented */
|
||||
|
||||
} NETLOGON_INFO_1;
|
||||
|
||||
/* NETLOGON_INFO_2 - pdc status info, plus trusted domain info */
|
||||
typedef struct netlogon_2_info
|
||||
{
|
||||
uint32 flags; /* 0x0 - undocumented */
|
||||
uint32 pdc_status; /* 0x0 - undocumented */
|
||||
uint32 ptr_trusted_dc_name; /* pointer to trusted domain controller name */
|
||||
uint32 tc_status; /* 0x051f - ERROR_NO_LOGON_SERVERS */
|
||||
UNISTR2 uni_trusted_dc_name; /* unicode string - trusted dc name */
|
||||
|
||||
} NETLOGON_INFO_2;
|
||||
|
||||
/* NETLOGON_INFO_3 - logon status info, i presume */
|
||||
typedef struct netlogon_3_info
|
||||
{
|
||||
uint32 flags; /* 0x0 - undocumented */
|
||||
uint32 logon_attempts; /* number of logon attempts */
|
||||
uint32 reserved_1; /* 0x0 - undocumented */
|
||||
uint32 reserved_2; /* 0x0 - undocumented */
|
||||
uint32 reserved_3; /* 0x0 - undocumented */
|
||||
uint32 reserved_4; /* 0x0 - undocumented */
|
||||
uint32 reserved_5; /* 0x0 - undocumented */
|
||||
|
||||
} NETLOGON_INFO_3;
|
||||
|
||||
/*******************************************************
|
||||
Logon Control Response
|
||||
|
||||
switch_value is same as query_level in request
|
||||
*******************************************************/
|
||||
|
||||
/* NET_R_LOGON_CTRL2 - response to LSA Logon Control2 */
|
||||
typedef struct net_r_logon_ctrl2_info
|
||||
{
|
||||
uint32 switch_value; /* 0x1, 0x3 */
|
||||
uint32 ptr;
|
||||
|
||||
union
|
||||
{
|
||||
NETLOGON_INFO_1 info1;
|
||||
NETLOGON_INFO_2 info2;
|
||||
NETLOGON_INFO_3 info3;
|
||||
|
||||
} logon;
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_LOGON_CTRL2;
|
||||
|
||||
/* NET_Q_TRUST_DOM_LIST - LSA Query Trusted Domains */
|
||||
typedef struct net_q_trust_dom_info
|
||||
{
|
||||
uint32 ptr; /* undocumented buffer pointer */
|
||||
UNISTR2 uni_server_name; /* server name, starting with two '\'s */
|
||||
|
||||
uint32 function_code; /* 0x31 */
|
||||
|
||||
} NET_Q_TRUST_DOM_LIST;
|
||||
|
||||
#define MAX_TRUST_DOMS 1
|
||||
|
||||
/* NET_R_TRUST_DOM_LIST - response to LSA Trusted Domains */
|
||||
typedef struct net_r_trust_dom_info
|
||||
{
|
||||
UNISTR2 uni_trust_dom_name[MAX_TRUST_DOMS];
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_TRUST_DOM_LIST;
|
||||
|
||||
|
||||
/* NEG_FLAGS */
|
||||
typedef struct neg_flags_info
|
||||
{
|
||||
uint32 neg_flags; /* negotiated flags */
|
||||
|
||||
} NEG_FLAGS;
|
||||
|
||||
|
||||
/* NET_Q_REQ_CHAL */
|
||||
typedef struct net_q_req_chal_info
|
||||
{
|
||||
uint32 undoc_buffer; /* undocumented buffer pointer */
|
||||
UNISTR2 uni_logon_srv; /* logon server unicode string */
|
||||
UNISTR2 uni_logon_clnt; /* logon client unicode string */
|
||||
DOM_CHAL clnt_chal; /* client challenge */
|
||||
|
||||
} NET_Q_REQ_CHAL;
|
||||
|
||||
|
||||
/* NET_R_REQ_CHAL */
|
||||
typedef struct net_r_req_chal_info
|
||||
{
|
||||
DOM_CHAL srv_chal; /* server challenge */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_REQ_CHAL;
|
||||
|
||||
|
||||
|
||||
/* NET_Q_AUTH_2 */
|
||||
typedef struct net_q_auth2_info
|
||||
{
|
||||
DOM_LOG_INFO clnt_id; /* client identification info */
|
||||
DOM_CHAL clnt_chal; /* client-calculated credentials */
|
||||
|
||||
NEG_FLAGS clnt_flgs; /* usually 0x0000 01ff */
|
||||
|
||||
} NET_Q_AUTH_2;
|
||||
|
||||
|
||||
/* NET_R_AUTH_2 */
|
||||
typedef struct net_r_auth2_info
|
||||
{
|
||||
DOM_CHAL srv_chal; /* server-calculated credentials */
|
||||
NEG_FLAGS srv_flgs; /* usually 0x0000 01ff */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_AUTH_2;
|
||||
|
||||
|
||||
/* NET_Q_SRV_PWSET */
|
||||
typedef struct net_q_srv_pwset_info
|
||||
{
|
||||
DOM_CLNT_INFO clnt_id; /* client identification/authentication info */
|
||||
uint8 pwd[16]; /* new password - undocumented. */
|
||||
|
||||
} NET_Q_SRV_PWSET;
|
||||
|
||||
/* NET_R_SRV_PWSET */
|
||||
typedef struct net_r_srv_pwset_info
|
||||
{
|
||||
DOM_CRED srv_cred; /* server-calculated credentials */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_SRV_PWSET;
|
||||
|
||||
/* NET_ID_INFO_2 */
|
||||
typedef struct net_network_info_2
|
||||
{
|
||||
uint32 ptr_id_info2; /* pointer to id_info_2 */
|
||||
UNIHDR hdr_domain_name; /* domain name unicode header */
|
||||
uint32 param_ctrl; /* param control (0x2) */
|
||||
DOM_LOGON_ID logon_id; /* logon ID */
|
||||
UNIHDR hdr_user_name; /* user name unicode header */
|
||||
UNIHDR hdr_wksta_name; /* workstation name unicode header */
|
||||
uint8 lm_chal[8]; /* lan manager 8 byte challenge */
|
||||
STRHDR hdr_nt_chal_resp; /* nt challenge response */
|
||||
STRHDR hdr_lm_chal_resp; /* lm challenge response */
|
||||
|
||||
UNISTR2 uni_domain_name; /* domain name unicode string */
|
||||
UNISTR2 uni_user_name; /* user name unicode string */
|
||||
UNISTR2 uni_wksta_name; /* workgroup name unicode string */
|
||||
STRING2 nt_chal_resp; /* nt challenge response */
|
||||
STRING2 lm_chal_resp; /* lm challenge response */
|
||||
|
||||
} NET_ID_INFO_2;
|
||||
|
||||
/* NET_ID_INFO_1 */
|
||||
typedef struct id_info_1
|
||||
{
|
||||
uint32 ptr_id_info1; /* pointer to id_info_1 */
|
||||
UNIHDR hdr_domain_name; /* domain name unicode header */
|
||||
uint32 param_ctrl; /* param control */
|
||||
DOM_LOGON_ID logon_id; /* logon ID */
|
||||
UNIHDR hdr_user_name; /* user name unicode header */
|
||||
UNIHDR hdr_wksta_name; /* workstation name unicode header */
|
||||
OWF_INFO lm_owf; /* LM OWF Password */
|
||||
OWF_INFO nt_owf; /* NT OWF Password */
|
||||
UNISTR2 uni_domain_name; /* domain name unicode string */
|
||||
UNISTR2 uni_user_name; /* user name unicode string */
|
||||
UNISTR2 uni_wksta_name; /* workgroup name unicode string */
|
||||
|
||||
} NET_ID_INFO_1;
|
||||
|
||||
#define INTERACTIVE_LOGON_TYPE 1
|
||||
#define NET_LOGON_TYPE 2
|
||||
|
||||
/* NET_ID_INFO_CTR */
|
||||
typedef struct net_id_info_ctr_info
|
||||
{
|
||||
uint16 switch_value;
|
||||
|
||||
union
|
||||
{
|
||||
NET_ID_INFO_1 id1; /* auth-level 1 - interactive user login */
|
||||
NET_ID_INFO_2 id2; /* auth-level 2 - workstation referred login */
|
||||
|
||||
} auth;
|
||||
|
||||
} NET_ID_INFO_CTR;
|
||||
|
||||
/* SAM_INFO - sam logon/off id structure */
|
||||
typedef struct sam_info
|
||||
{
|
||||
DOM_CLNT_INFO2 client;
|
||||
uint32 ptr_rtn_cred; /* pointer to return credentials */
|
||||
DOM_CRED rtn_cred; /* return credentials */
|
||||
uint16 logon_level;
|
||||
NET_ID_INFO_CTR *ctr;
|
||||
|
||||
} DOM_SAM_INFO;
|
||||
|
||||
/* NET_Q_SAM_LOGON */
|
||||
typedef struct net_q_sam_logon_info
|
||||
{
|
||||
DOM_SAM_INFO sam_id;
|
||||
uint16 validation_level;
|
||||
|
||||
} NET_Q_SAM_LOGON;
|
||||
|
||||
/* NET_R_SAM_LOGON */
|
||||
typedef struct net_r_sam_logon_info
|
||||
{
|
||||
uint32 buffer_creds; /* undocumented buffer pointer */
|
||||
DOM_CRED srv_creds; /* server credentials. server time stamp appears to be ignored. */
|
||||
|
||||
uint16 switch_value; /* 3 - indicates type of USER INFO */
|
||||
NET_USER_INFO_3 *user;
|
||||
|
||||
uint32 auth_resp; /* 1 - Authoritative response; 0 - Non-Auth? */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_SAM_LOGON;
|
||||
|
||||
|
||||
/* NET_Q_SAM_LOGOFF */
|
||||
typedef struct net_q_sam_logoff_info
|
||||
{
|
||||
DOM_SAM_INFO sam_id;
|
||||
|
||||
} NET_Q_SAM_LOGOFF;
|
||||
|
||||
/* NET_R_SAM_LOGOFF */
|
||||
typedef struct net_r_sam_logoff_info
|
||||
{
|
||||
uint32 buffer_creds; /* undocumented buffer pointer */
|
||||
DOM_CRED srv_creds; /* server credentials. server time stamp appears to be ignored. */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} NET_R_SAM_LOGOFF;
|
||||
|
||||
|
||||
#endif /* _RPC_NETLOGON_H */
|
||||
|
@ -1,466 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_REG_H /* _RPC_REG_H */
|
||||
#define _RPC_REG_H
|
||||
|
||||
|
||||
/* winreg pipe defines */
|
||||
#define REG_OPEN_HKLM 0x02
|
||||
#define REG_OPEN_HKU 0x04
|
||||
#define REG_FLUSH_KEY 0x0B
|
||||
#define REG_UNK_1A 0x1a
|
||||
#define REG_QUERY_KEY 0x10
|
||||
#define REG_ENUM_KEY 0x09
|
||||
#define REG_CREATE_KEY 0x06
|
||||
#define REG_DELETE_KEY 0x07
|
||||
#define REG_DELETE_VALUE 0x08
|
||||
#define REG_CREATE_VALUE 0x16
|
||||
#define REG_GET_KEY_SEC 0x0c
|
||||
#define REG_SET_KEY_SEC 0x15
|
||||
#define REG_ENUM_VALUE 0x0a
|
||||
#define REG_OPEN_ENTRY 0x0f
|
||||
#define REG_INFO 0x11
|
||||
#define REG_CLOSE 0x05
|
||||
|
||||
#define HKEY_LOCAL_MACHINE 0x80000000
|
||||
#define HKEY_USERS 0x80000003
|
||||
|
||||
/* REG_Q_OPEN_HKLM */
|
||||
typedef struct q_reg_open_policy_info
|
||||
{
|
||||
uint32 ptr;
|
||||
uint16 unknown_0; /* 0xE084 - 16 bit unknown */
|
||||
uint16 unknown_1; /* random. changes */
|
||||
uint32 level; /* 0x0000 0002 - 32 bit unknown */
|
||||
|
||||
} REG_Q_OPEN_HKLM ;
|
||||
|
||||
/* REG_R_OPEN_HKLM */
|
||||
typedef struct r_reg_open_policy_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_OPEN_HKLM;
|
||||
|
||||
|
||||
/* REG_Q_OPEN_HKU */
|
||||
typedef struct q_reg_open_unk4_info
|
||||
{
|
||||
uint32 ptr;
|
||||
uint16 unknown_0; /* 0xE084 - 16 bit unknown */
|
||||
uint16 unknown_1; /* random. changes */
|
||||
uint32 level; /* 0x0000 0002 - 32 bit unknown */
|
||||
|
||||
} REG_Q_OPEN_HKU;
|
||||
|
||||
/* REG_R_OPEN_HKU */
|
||||
typedef struct r_reg_open_unk4_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_OPEN_HKU;
|
||||
|
||||
|
||||
/* REG_Q_FLUSH_KEY */
|
||||
typedef struct q_reg_open_flush_key_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
} REG_Q_FLUSH_KEY;
|
||||
|
||||
/* REG_R_FLUSH_KEY */
|
||||
typedef struct r_reg_open_flush_key_info
|
||||
{
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_FLUSH_KEY;
|
||||
|
||||
|
||||
/* REG_Q_SET_KEY_SEC */
|
||||
typedef struct q_reg_set_key_sec_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
uint32 sec_info; /* xxxx_SECURITY_INFORMATION */
|
||||
|
||||
uint32 ptr; /* pointer */
|
||||
BUFHDR hdr_sec; /* header for security data */
|
||||
SEC_DESC_BUF *data; /* security data */
|
||||
|
||||
} REG_Q_SET_KEY_SEC;
|
||||
|
||||
/* REG_R_SET_KEY_SEC */
|
||||
typedef struct r_reg_set_key_sec_info
|
||||
{
|
||||
uint32 status;
|
||||
|
||||
} REG_R_SET_KEY_SEC;
|
||||
|
||||
|
||||
/* REG_Q_GET_KEY_SEC */
|
||||
typedef struct q_reg_get_key_sec_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
uint32 sec_info; /* xxxx_SECURITY_INFORMATION */
|
||||
|
||||
uint32 ptr; /* pointer */
|
||||
BUFHDR hdr_sec; /* header for security data */
|
||||
SEC_DESC_BUF *data; /* security data */
|
||||
|
||||
} REG_Q_GET_KEY_SEC;
|
||||
|
||||
/* REG_R_GET_KEY_SEC */
|
||||
typedef struct r_reg_get_key_sec_info
|
||||
{
|
||||
uint32 sec_info; /* xxxx_SECURITY_INFORMATION */
|
||||
|
||||
uint32 ptr; /* pointer */
|
||||
BUFHDR hdr_sec; /* header for security data */
|
||||
SEC_DESC_BUF *data; /* security data */
|
||||
|
||||
uint32 status;
|
||||
|
||||
} REG_R_GET_KEY_SEC;
|
||||
|
||||
/* REG_Q_CREATE_VALUE */
|
||||
typedef struct q_reg_create_value_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
UNIHDR hdr_name; /* name of value */
|
||||
UNISTR2 uni_name;
|
||||
|
||||
uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */
|
||||
|
||||
BUFFER3 *buf_value; /* value, in byte buffer */
|
||||
|
||||
} REG_Q_CREATE_VALUE;
|
||||
|
||||
/* REG_R_CREATE_VALUE */
|
||||
typedef struct r_reg_create_value_info
|
||||
{
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_CREATE_VALUE;
|
||||
|
||||
/* REG_Q_ENUM_VALUE */
|
||||
typedef struct q_reg_query_value_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
uint32 val_index; /* index */
|
||||
|
||||
UNIHDR hdr_name; /* name of value */
|
||||
UNISTR2 uni_name;
|
||||
|
||||
uint32 ptr_type; /* pointer */
|
||||
uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */
|
||||
|
||||
uint32 ptr_value; /* pointer */
|
||||
BUFFER2 buf_value; /* value, in byte buffer */
|
||||
|
||||
uint32 ptr1; /* pointer */
|
||||
uint32 len_value1; /* */
|
||||
|
||||
uint32 ptr2; /* pointer */
|
||||
uint32 len_value2; /* */
|
||||
|
||||
} REG_Q_ENUM_VALUE;
|
||||
|
||||
/* REG_R_ENUM_VALUE */
|
||||
typedef struct r_reg_enum_value_info
|
||||
{
|
||||
UNIHDR hdr_name; /* name of value */
|
||||
UNISTR2 uni_name;
|
||||
|
||||
uint32 ptr_type; /* pointer */
|
||||
uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */
|
||||
|
||||
uint32 ptr_value; /* pointer */
|
||||
BUFFER2 *buf_value; /* value, in byte buffer */
|
||||
|
||||
uint32 ptr1; /* pointer */
|
||||
uint32 len_value1; /* */
|
||||
|
||||
uint32 ptr2; /* pointer */
|
||||
uint32 len_value2; /* */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_ENUM_VALUE;
|
||||
|
||||
/* REG_Q_CREATE_KEY */
|
||||
typedef struct q_reg_create_key_info
|
||||
{
|
||||
POLICY_HND pnt_pol; /* parent key policy handle */
|
||||
|
||||
UNIHDR hdr_name;
|
||||
UNISTR2 uni_name;
|
||||
|
||||
UNIHDR hdr_class;
|
||||
UNISTR2 uni_class;
|
||||
|
||||
uint32 reserved; /* 0x0000 0000 */
|
||||
SEC_ACCESS sam_access; /* access rights flags, see rpc_secdes.h */
|
||||
|
||||
uint32 ptr1;
|
||||
uint32 sec_info; /* xxxx_SECURITY_INFORMATION */
|
||||
|
||||
uint32 ptr2; /* pointer */
|
||||
BUFHDR hdr_sec; /* header for security data */
|
||||
uint32 ptr3; /* pointer */
|
||||
SEC_DESC_BUF *data;
|
||||
|
||||
uint32 unknown_2; /* 0x0000 0000 */
|
||||
|
||||
} REG_Q_CREATE_KEY;
|
||||
|
||||
/* REG_R_CREATE_KEY */
|
||||
typedef struct r_reg_create_key_info
|
||||
{
|
||||
POLICY_HND key_pol; /* policy handle */
|
||||
uint32 unknown; /* 0x0000 0000 */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_CREATE_KEY;
|
||||
|
||||
/* REG_Q_DELETE_KEY */
|
||||
typedef struct q_reg_delete_key_info
|
||||
{
|
||||
POLICY_HND pnt_pol; /* parent key policy handle */
|
||||
|
||||
UNIHDR hdr_name;
|
||||
UNISTR2 uni_name;
|
||||
} REG_Q_DELETE_KEY;
|
||||
|
||||
/* REG_R_DELETE_KEY */
|
||||
typedef struct r_reg_delete_key_info
|
||||
{
|
||||
POLICY_HND key_pol; /* policy handle */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_DELETE_KEY;
|
||||
|
||||
/* REG_Q_DELETE_VALUE */
|
||||
typedef struct q_reg_delete_val_info
|
||||
{
|
||||
POLICY_HND pnt_pol; /* parent key policy handle */
|
||||
|
||||
UNIHDR hdr_name;
|
||||
UNISTR2 uni_name;
|
||||
|
||||
} REG_Q_DELETE_VALUE;
|
||||
|
||||
/* REG_R_DELETE_VALUE */
|
||||
typedef struct r_reg_delete_val_info
|
||||
{
|
||||
POLICY_HND key_pol; /* policy handle */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_DELETE_VALUE;
|
||||
|
||||
/* REG_Q_QUERY_KEY */
|
||||
typedef struct q_reg_query_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
UNIHDR hdr_class;
|
||||
UNISTR2 uni_class;
|
||||
|
||||
} REG_Q_QUERY_KEY;
|
||||
|
||||
/* REG_R_QUERY_KEY */
|
||||
typedef struct r_reg_query_key_info
|
||||
{
|
||||
UNIHDR hdr_class;
|
||||
UNISTR2 uni_class;
|
||||
|
||||
uint32 num_subkeys;
|
||||
uint32 max_subkeylen;
|
||||
uint32 max_subkeysize; /* 0x0000 0000 */
|
||||
uint32 num_values;
|
||||
uint32 max_valnamelen;
|
||||
uint32 max_valbufsize;
|
||||
uint32 sec_desc; /* 0x0000 0078 */
|
||||
NTTIME mod_time; /* modified time */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_QUERY_KEY;
|
||||
|
||||
|
||||
/* REG_Q_UNK_1A */
|
||||
typedef struct q_reg_unk_1a_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
} REG_Q_UNK_1A;
|
||||
|
||||
/* REG_R_UNK_1A */
|
||||
typedef struct r_reg_unk_1a_info
|
||||
{
|
||||
uint32 unknown; /* 0x0500 0000 */
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_UNK_1A;
|
||||
|
||||
|
||||
/* REG_Q_CLOSE */
|
||||
typedef struct reg_q_close_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
} REG_Q_CLOSE;
|
||||
|
||||
/* REG_R_CLOSE */
|
||||
typedef struct reg_r_close_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle. should be all zeros. */
|
||||
|
||||
uint32 status; /* return code */
|
||||
|
||||
} REG_R_CLOSE;
|
||||
|
||||
|
||||
/* REG_Q_ENUM_KEY */
|
||||
typedef struct q_reg_enum_value_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
uint32 key_index;
|
||||
|
||||
uint16 key_name_len; /* 0x0000 */
|
||||
uint16 unknown_1; /* 0x0414 */
|
||||
|
||||
uint32 ptr1; /* pointer */
|
||||
uint32 unknown_2; /* 0x0000 020A */
|
||||
uint8 pad1[8]; /* padding - zeros */
|
||||
|
||||
uint32 ptr2; /* pointer */
|
||||
uint8 pad2[8]; /* padding - zeros */
|
||||
|
||||
uint32 ptr3; /* pointer */
|
||||
NTTIME time; /* current time? */
|
||||
|
||||
} REG_Q_ENUM_KEY;
|
||||
|
||||
/* REG_R_ENUM_KEY */
|
||||
typedef struct r_reg_enum_key_info
|
||||
{
|
||||
uint16 key_name_len; /* number of bytes in key name */
|
||||
uint16 unknown_1; /* 0x0414 - matches with query unknown_1 */
|
||||
|
||||
uint32 ptr1; /* pointer */
|
||||
uint32 unknown_2; /* 0x0000 020A */
|
||||
uint32 unknown_3; /* 0x0000 0000 */
|
||||
|
||||
UNISTR3 key_name;
|
||||
|
||||
uint32 ptr2; /* pointer */
|
||||
uint8 pad2[8]; /* padding - zeros */
|
||||
|
||||
uint32 ptr3; /* pointer */
|
||||
NTTIME time; /* current time? */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_ENUM_KEY;
|
||||
|
||||
|
||||
/* REG_Q_INFO */
|
||||
typedef struct q_reg_info_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
UNIHDR hdr_type; /* unicode product type header */
|
||||
UNISTR2 uni_type; /* unicode product type - "ProductType" */
|
||||
|
||||
uint32 ptr1; /* pointer */
|
||||
NTTIME time; /* current time? */
|
||||
uint8 major_version1; /* 0x4 - os major version? */
|
||||
uint8 minor_version1; /* 0x1 - os minor version? */
|
||||
uint8 pad1[10]; /* padding - zeros */
|
||||
|
||||
uint32 ptr2; /* pointer */
|
||||
uint8 major_version2; /* 0x4 - os major version? */
|
||||
uint8 minor_version2; /* 0x1 - os minor version? */
|
||||
uint8 pad2[2]; /* padding - zeros */
|
||||
|
||||
uint32 ptr3; /* pointer */
|
||||
uint32 unknown; /* 0x0000 0000 */
|
||||
|
||||
} REG_Q_INFO;
|
||||
|
||||
/* REG_R_INFO */
|
||||
typedef struct r_reg_info_info
|
||||
{
|
||||
uint32 ptr1; /* buffer pointer */
|
||||
uint32 level; /* 0x1 - info level? */
|
||||
|
||||
uint32 ptr_type; /* pointer to o/s type */
|
||||
BUFFER2 uni_type; /* unicode string o/s type - "LanmanNT" */
|
||||
|
||||
uint32 ptr2; /* pointer to unknown_0 */
|
||||
uint32 unknown_0; /* 0x12 */
|
||||
|
||||
uint32 ptr3; /* pointer to unknown_1 */
|
||||
uint32 unknown_1; /* 0x12 */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_INFO;
|
||||
|
||||
|
||||
/* REG_Q_OPEN_ENTRY */
|
||||
typedef struct q_reg_open_entry_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
UNIHDR hdr_name; /* unicode registry string header */
|
||||
UNISTR2 uni_name; /* unicode registry string name */
|
||||
|
||||
uint32 unknown_0; /* 32 bit unknown - 0x0000 0000 */
|
||||
uint32 unknown_1; /* 32 bit unknown - 0x0200 0000 */
|
||||
|
||||
} REG_Q_OPEN_ENTRY;
|
||||
|
||||
|
||||
|
||||
/* REG_R_OPEN_ENTRY */
|
||||
typedef struct r_reg_open_entry_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
uint32 status; /* return status */
|
||||
|
||||
} REG_R_OPEN_ENTRY;
|
||||
|
||||
|
||||
|
||||
#endif /* _RPC_REG_H */
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,130 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_SECDES_H /* _RPC_SECDES_H */
|
||||
#define _RPC_SECDES_H
|
||||
|
||||
#define SEC_RIGHTS_QUERY_VALUE 0x00000001
|
||||
#define SEC_RIGHTS_SET_VALUE 0x00000002
|
||||
#define SEC_RIGHTS_CREATE_SUBKEY 0x00000004
|
||||
#define SEC_RIGHTS_ENUM_SUBKEYS 0x00000008
|
||||
#define SEC_RIGHTS_NOTIFY 0x00000010
|
||||
#define SEC_RIGHTS_CREATE_LINK 0x00000020
|
||||
#define SEC_RIGHTS_DELETE 0x00010000
|
||||
#define SEC_RIGHTS_READ_CONTROL 0x00020000
|
||||
#define SEC_RIGHTS_WRITE_DAC 0x00040000
|
||||
#define SEC_RIGHTS_WRITE_OWNER 0x00080000
|
||||
|
||||
#define SEC_RIGHTS_READ 0x00020019
|
||||
#define SEC_RIGHTS_FULL_CONTROL 0x000f003f
|
||||
|
||||
|
||||
#define SEC_ACE_TYPE_ACCESS_ALLOWED 0x0
|
||||
#define SEC_ACE_TYPE_ACCESS_DENIED 0x1
|
||||
#define SEC_ACE_TYPE_SYSTEM_AUDIT 0x2
|
||||
#define SEC_ACE_TYPE_SYSTEM_ALARM 0x3
|
||||
|
||||
#define SEC_ACE_FLAG_OBJECT_INHERIT 0x1
|
||||
#define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2
|
||||
#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
|
||||
#define SEC_ACE_FLAG_INHERIT_ONLY 0x8
|
||||
#define SEC_ACE_FLAG_VALID_INHERIT 0xf
|
||||
#define SEC_ACE_FLAG_SUCCESSFUL_ACCESS 0x40
|
||||
#define SEC_ACE_FLAG_FAILED_ACCESS 0x80
|
||||
|
||||
#define SEC_DESC_OWNER_DEFAULTED 0x0001
|
||||
#define SEC_DESC_GROUP_DEFAULTED 0x0002
|
||||
#define SEC_DESC_DACL_PRESENT 0x0004
|
||||
#define SEC_DESC_DACL_DEFAULTED 0x0008
|
||||
#define SEC_DESC_SACL_PRESENT 0x0010
|
||||
#define SEC_DESC_SACL_DEFAULTED 0x0020
|
||||
#define SEC_DESC_SELF_RELATIVE 0x8000
|
||||
|
||||
/* security information */
|
||||
|
||||
#define OWNER_SECURITY_INFORMATION 0x00000001
|
||||
#define GROUP_SECURITY_INFORMATION 0x00000002
|
||||
#define DACL_SECURITY_INFORMATION 0x00000004
|
||||
#define SACL_SECURITY_INFORMATION 0x00000008
|
||||
|
||||
|
||||
|
||||
/* SEC_ACCESS */
|
||||
typedef struct security_info_info
|
||||
{
|
||||
uint32 mask;
|
||||
|
||||
} SEC_ACCESS;
|
||||
|
||||
/* SEC_ACE */
|
||||
typedef struct security_ace_info
|
||||
{
|
||||
uint8 type; /* xxxx_xxxx_ACE_TYPE - e.g allowed / denied etc */
|
||||
uint8 flags; /* xxxx_INHERIT_xxxx - e.g OBJECT_INHERIT_ACE */
|
||||
uint16 size;
|
||||
|
||||
SEC_ACCESS info;
|
||||
DOM_SID sid;
|
||||
|
||||
} SEC_ACE;
|
||||
|
||||
/* SEC_ACL */
|
||||
typedef struct security_acl_info
|
||||
{
|
||||
uint16 revision; /* 0x0002 */
|
||||
uint16 size; /* size in bytes of the entire ACL structure */
|
||||
uint32 num_aces; /* number of Access Control Entries */
|
||||
SEC_ACE *ace_list;
|
||||
|
||||
} SEC_ACL;
|
||||
|
||||
/* SEC_DESC */
|
||||
typedef struct security_descriptor_info
|
||||
{
|
||||
uint16 revision; /* 0x0001 */
|
||||
uint16 type; /* SEC_DESC_xxxx flags */
|
||||
|
||||
uint32 off_owner_sid; /* offset to owner sid */
|
||||
uint32 off_grp_sid ; /* offset to group sid */
|
||||
uint32 off_sacl ; /* offset to system list of permissions */
|
||||
uint32 off_dacl ; /* offset to list of permissions */
|
||||
|
||||
SEC_ACL *dacl; /* user ACL */
|
||||
SEC_ACL *sacl; /* system ACL */
|
||||
DOM_SID *owner_sid;
|
||||
DOM_SID *grp_sid;
|
||||
|
||||
} SEC_DESC;
|
||||
|
||||
/* SEC_DESC_BUF */
|
||||
typedef struct sec_desc_buf_info
|
||||
{
|
||||
uint32 max_len;
|
||||
uint32 undoc;
|
||||
uint32 len;
|
||||
|
||||
SEC_DESC *sec;
|
||||
|
||||
} SEC_DESC_BUF;
|
||||
|
||||
#endif /* _RPC_SECDES_H */
|
@ -1,569 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_SRVSVC_H /* _RPC_SRVSVC_H */
|
||||
#define _RPC_SRVSVC_H
|
||||
|
||||
|
||||
/* srvsvc pipe */
|
||||
#define SRV_NETCONNENUM 0x08
|
||||
#define SRV_NETFILEENUM 0x09
|
||||
#define SRV_NETSESSENUM 0x0c
|
||||
#define SRV_NETSHAREENUM 0x0f
|
||||
#define SRV_NET_SRV_GET_INFO 0x15
|
||||
#define SRV_NET_SRV_SET_INFO 0x16
|
||||
#define SRV_NET_REMOTE_TOD 0x1c
|
||||
|
||||
/* SESS_INFO_0 (pointers to level 0 session info strings) */
|
||||
typedef struct ptr_sess_info0
|
||||
{
|
||||
uint32 ptr_name; /* pointer to name. */
|
||||
|
||||
} SESS_INFO_0;
|
||||
|
||||
/* SESS_INFO_0_STR (level 0 session info strings) */
|
||||
typedef struct str_sess_info0
|
||||
{
|
||||
UNISTR2 uni_name; /* unicode string of name */
|
||||
|
||||
} SESS_INFO_0_STR;
|
||||
|
||||
/* oops - this is going to take up a *massive* amount of stack. */
|
||||
/* the UNISTR2s already have 1024 uint16 chars in them... */
|
||||
#define MAX_SESS_ENTRIES 32
|
||||
|
||||
/* SRV_SESS_INFO_0 */
|
||||
typedef struct srv_sess_info_0_info
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_sess_info; /* Buffer */
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
SESS_INFO_0 info_0 [MAX_SESS_ENTRIES]; /* session entry pointers */
|
||||
SESS_INFO_0_STR info_0_str[MAX_SESS_ENTRIES]; /* session entry strings */
|
||||
|
||||
} SRV_SESS_INFO_0;
|
||||
|
||||
/* SESS_INFO_1 (pointers to level 1 session info strings) */
|
||||
typedef struct ptr_sess_info1
|
||||
{
|
||||
uint32 ptr_name; /* pointer to name. */
|
||||
uint32 ptr_user; /* pointer to user name. */
|
||||
|
||||
uint32 num_opens;
|
||||
uint32 open_time;
|
||||
uint32 idle_time;
|
||||
uint32 user_flags;
|
||||
|
||||
} SESS_INFO_1;
|
||||
|
||||
/* SESS_INFO_1_STR (level 1 session info strings) */
|
||||
typedef struct str_sess_info1
|
||||
{
|
||||
UNISTR2 uni_name; /* unicode string of name */
|
||||
UNISTR2 uni_user; /* unicode string of user */
|
||||
|
||||
} SESS_INFO_1_STR;
|
||||
|
||||
/* SRV_SESS_INFO_1 */
|
||||
typedef struct srv_sess_info_1_info
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_sess_info; /* Buffer */
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
SESS_INFO_1 info_1 [MAX_SESS_ENTRIES]; /* session entry pointers */
|
||||
SESS_INFO_1_STR info_1_str[MAX_SESS_ENTRIES]; /* session entry strings */
|
||||
|
||||
} SRV_SESS_INFO_1;
|
||||
|
||||
/* SRV_SESS_INFO_CTR */
|
||||
typedef struct srv_sess_info_ctr_info
|
||||
{
|
||||
uint32 switch_value; /* switch value */
|
||||
uint32 ptr_sess_ctr; /* pointer to sess info union */
|
||||
union
|
||||
{
|
||||
SRV_SESS_INFO_0 info0; /* session info level 0 */
|
||||
SRV_SESS_INFO_1 info1; /* session info level 1 */
|
||||
|
||||
} sess;
|
||||
|
||||
} SRV_SESS_INFO_CTR;
|
||||
|
||||
|
||||
/* SRV_Q_NET_SESS_ENUM */
|
||||
typedef struct q_net_sess_enum_info
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer (to server name?) */
|
||||
UNISTR2 uni_srv_name; /* server name */
|
||||
|
||||
uint32 ptr_qual_name; /* pointer (to qualifier name) */
|
||||
UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
|
||||
|
||||
uint32 sess_level; /* session level */
|
||||
|
||||
SRV_SESS_INFO_CTR *ctr;
|
||||
|
||||
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
} SRV_Q_NET_SESS_ENUM;
|
||||
|
||||
/* SRV_R_NET_SESS_ENUM */
|
||||
typedef struct r_net_sess_enum_info
|
||||
{
|
||||
uint32 sess_level; /* share level */
|
||||
|
||||
SRV_SESS_INFO_CTR *ctr;
|
||||
|
||||
uint32 total_entries; /* total number of entries */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_SESS_ENUM;
|
||||
|
||||
/* CONN_INFO_0 (pointers to level 0 connection info strings) */
|
||||
typedef struct ptr_conn_info0
|
||||
{
|
||||
uint32 id; /* connection id. */
|
||||
|
||||
} CONN_INFO_0;
|
||||
|
||||
/* oops - this is going to take up a *massive* amount of stack. */
|
||||
/* the UNISTR2s already have 1024 uint16 chars in them... */
|
||||
#define MAX_CONN_ENTRIES 32
|
||||
|
||||
/* SRV_CONN_INFO_0 */
|
||||
typedef struct srv_conn_info_0_info
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_conn_info; /* Buffer */
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
CONN_INFO_0 info_0 [MAX_CONN_ENTRIES]; /* connection entry pointers */
|
||||
|
||||
} SRV_CONN_INFO_0;
|
||||
|
||||
/* CONN_INFO_1 (pointers to level 1 connection info strings) */
|
||||
typedef struct ptr_conn_info1
|
||||
{
|
||||
uint32 id; /* connection id */
|
||||
uint32 type; /* 0x3 */
|
||||
uint32 num_opens;
|
||||
uint32 num_users;
|
||||
uint32 open_time;
|
||||
|
||||
uint32 ptr_usr_name; /* pointer to user name. */
|
||||
uint32 ptr_net_name; /* pointer to network name (e.g IPC$). */
|
||||
|
||||
} CONN_INFO_1;
|
||||
|
||||
/* CONN_INFO_1_STR (level 1 connection info strings) */
|
||||
typedef struct str_conn_info1
|
||||
{
|
||||
UNISTR2 uni_usr_name; /* unicode string of user */
|
||||
UNISTR2 uni_net_name; /* unicode string of name */
|
||||
|
||||
} CONN_INFO_1_STR;
|
||||
|
||||
/* SRV_CONN_INFO_1 */
|
||||
typedef struct srv_conn_info_1_info
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_conn_info; /* Buffer */
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
CONN_INFO_1 info_1 [MAX_CONN_ENTRIES]; /* connection entry pointers */
|
||||
CONN_INFO_1_STR info_1_str[MAX_CONN_ENTRIES]; /* connection entry strings */
|
||||
|
||||
} SRV_CONN_INFO_1;
|
||||
|
||||
/* SRV_CONN_INFO_CTR */
|
||||
typedef struct srv_conn_info_ctr_info
|
||||
{
|
||||
uint32 switch_value; /* switch value */
|
||||
uint32 ptr_conn_ctr; /* pointer to conn info union */
|
||||
union
|
||||
{
|
||||
SRV_CONN_INFO_0 info0; /* connection info level 0 */
|
||||
SRV_CONN_INFO_1 info1; /* connection info level 1 */
|
||||
|
||||
} conn;
|
||||
|
||||
} SRV_CONN_INFO_CTR;
|
||||
|
||||
|
||||
/* SRV_Q_NET_CONN_ENUM */
|
||||
typedef struct q_net_conn_enum_info
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer (to server name) */
|
||||
UNISTR2 uni_srv_name; /* server name "\\server" */
|
||||
|
||||
uint32 ptr_qual_name; /* pointer (to qualifier name) */
|
||||
UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
|
||||
|
||||
uint32 conn_level; /* connection level */
|
||||
|
||||
SRV_CONN_INFO_CTR *ctr;
|
||||
|
||||
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
} SRV_Q_NET_CONN_ENUM;
|
||||
|
||||
/* SRV_R_NET_CONN_ENUM */
|
||||
typedef struct r_net_conn_enum_info
|
||||
{
|
||||
uint32 conn_level; /* share level */
|
||||
|
||||
SRV_CONN_INFO_CTR *ctr;
|
||||
|
||||
uint32 total_entries; /* total number of entries */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_CONN_ENUM;
|
||||
|
||||
/* SH_INFO_1 (pointers to level 1 share info strings) */
|
||||
typedef struct ptr_share_info1
|
||||
{
|
||||
uint32 ptr_netname; /* pointer to net name. */
|
||||
uint32 type; /* ipc, print, disk ... */
|
||||
uint32 ptr_remark; /* pointer to comment. */
|
||||
|
||||
} SH_INFO_1;
|
||||
|
||||
/* SH_INFO_1_STR (level 1 share info strings) */
|
||||
typedef struct str_share_info1
|
||||
{
|
||||
UNISTR2 uni_netname; /* unicode string of net name */
|
||||
UNISTR2 uni_remark; /* unicode string of comment */
|
||||
|
||||
} SH_INFO_1_STR;
|
||||
|
||||
/* SRV_SHARE_INFO_1 */
|
||||
typedef struct share_info_1_info
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_share_info; /* Buffer */
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
SH_INFO_1 *info_1; /* share entry pointers */
|
||||
SH_INFO_1_STR *info_1_str; /* share entry strings */
|
||||
|
||||
} SRV_SHARE_INFO_1;
|
||||
|
||||
/* SH_INFO_2 (pointers to level 2 share info strings) */
|
||||
typedef struct ptr_share_info2
|
||||
{
|
||||
uint32 ptr_netname; /* pointer to net name. */
|
||||
uint32 type; /* ipc, print, disk ... */
|
||||
uint32 ptr_remark; /* pointer to comment. */
|
||||
uint32 perms; /* permissions */
|
||||
uint32 max_uses; /* maximum uses */
|
||||
uint32 num_uses; /* current uses */
|
||||
uint32 ptr_path; /* pointer to path name */
|
||||
uint32 ptr_passwd; /* pointer to password */
|
||||
|
||||
} SH_INFO_2;
|
||||
|
||||
/* SH_INFO_2_STR (level 2 share info strings) */
|
||||
typedef struct str_share_info2
|
||||
{
|
||||
UNISTR2 uni_netname; /* unicode string of net name (e.g NETLOGON) */
|
||||
UNISTR2 uni_remark; /* unicode string of comment (e.g "Logon server share") */
|
||||
UNISTR2 uni_path; /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */
|
||||
UNISTR2 uni_passwd; /* unicode string of password - presumably for share level security (e.g NULL) */
|
||||
|
||||
} SH_INFO_2_STR;
|
||||
|
||||
/* SRV_SHARE_INFO_2 */
|
||||
typedef struct share_info_2_info
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_share_info; /* Buffer */
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
SH_INFO_2 *info_2; /* share entry pointers */
|
||||
SH_INFO_2_STR *info_2_str; /* share entry strings */
|
||||
|
||||
} SRV_SHARE_INFO_2;
|
||||
|
||||
/* SRV_SHARE_INFO_CTR */
|
||||
typedef struct srv_share_info_1_info
|
||||
{
|
||||
uint32 switch_value; /* switch value */
|
||||
uint32 ptr_share_ctr; /* pointer to share info union */
|
||||
union {
|
||||
SRV_SHARE_INFO_1 info1; /* share info level 1 */
|
||||
SRV_SHARE_INFO_2 info2; /* share info level 2 */
|
||||
} share;
|
||||
|
||||
} SRV_SHARE_INFO_CTR;
|
||||
|
||||
/* SRV_Q_NET_SHARE_ENUM */
|
||||
typedef struct q_net_share_enum_info
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer (to server name?) */
|
||||
UNISTR2 uni_srv_name; /* server name */
|
||||
|
||||
uint32 share_level; /* share level */
|
||||
|
||||
SRV_SHARE_INFO_CTR ctr; /* share info container */
|
||||
|
||||
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
|
||||
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
} SRV_Q_NET_SHARE_ENUM;
|
||||
|
||||
|
||||
/* SRV_R_NET_SHARE_ENUM */
|
||||
typedef struct r_net_share_enum_info
|
||||
{
|
||||
uint32 share_level; /* share level */
|
||||
SRV_SHARE_INFO_CTR ctr; /* share info container */
|
||||
|
||||
uint32 total_entries; /* total number of entries */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_SHARE_ENUM;
|
||||
|
||||
/* FILE_INFO_3 (level 3 file info strings) */
|
||||
typedef struct file_info3_info
|
||||
{
|
||||
uint32 id; /* file index */
|
||||
uint32 perms; /* file permissions. don't know what format */
|
||||
uint32 num_locks; /* file locks */
|
||||
uint32 ptr_path_name; /* file name */
|
||||
uint32 ptr_user_name; /* file owner */
|
||||
|
||||
} FILE_INFO_3;
|
||||
|
||||
/* FILE_INFO_3_STR (level 3 file info strings) */
|
||||
typedef struct str_file_info3_info
|
||||
{
|
||||
UNISTR2 uni_path_name; /* unicode string of file name */
|
||||
UNISTR2 uni_user_name; /* unicode string of file owner. */
|
||||
|
||||
} FILE_INFO_3_STR;
|
||||
|
||||
/* oops - this is going to take up a *massive* amount of stack. */
|
||||
/* the UNISTR2s already have 1024 uint16 chars in them... */
|
||||
#define MAX_FILE_ENTRIES 32
|
||||
|
||||
/* SRV_FILE_INFO_3 */
|
||||
typedef struct srv_file_info_3
|
||||
{
|
||||
uint32 num_entries_read; /* EntriesRead */
|
||||
uint32 ptr_file_info; /* Buffer */
|
||||
|
||||
uint32 num_entries_read2; /* EntriesRead */
|
||||
|
||||
FILE_INFO_3 info_3 [MAX_FILE_ENTRIES]; /* file entry details */
|
||||
FILE_INFO_3_STR info_3_str[MAX_FILE_ENTRIES]; /* file entry strings */
|
||||
|
||||
} SRV_FILE_INFO_3;
|
||||
|
||||
/* SRV_FILE_INFO_CTR */
|
||||
typedef struct srv_file_info_3_info
|
||||
{
|
||||
uint32 switch_value; /* switch value */
|
||||
uint32 ptr_file_ctr; /* pointer to file info union */
|
||||
union
|
||||
{
|
||||
SRV_FILE_INFO_3 info3; /* file info with 0 entries */
|
||||
|
||||
} file;
|
||||
|
||||
} SRV_FILE_INFO_CTR;
|
||||
|
||||
|
||||
/* SRV_Q_NET_FILE_ENUM */
|
||||
typedef struct q_net_file_enum_info
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer (to server name?) */
|
||||
UNISTR2 uni_srv_name; /* server name */
|
||||
|
||||
uint32 ptr_qual_name; /* pointer (to qualifier name) */
|
||||
UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
|
||||
|
||||
uint32 file_level; /* file level */
|
||||
|
||||
SRV_FILE_INFO_CTR *ctr;
|
||||
|
||||
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
} SRV_Q_NET_FILE_ENUM;
|
||||
|
||||
|
||||
/* SRV_R_NET_FILE_ENUM */
|
||||
typedef struct r_net_file_enum_info
|
||||
{
|
||||
uint32 file_level; /* file level */
|
||||
|
||||
SRV_FILE_INFO_CTR *ctr;
|
||||
|
||||
uint32 total_entries; /* total number of files */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_FILE_ENUM;
|
||||
|
||||
/* SRV_INFO_101 */
|
||||
typedef struct srv_info_101_info
|
||||
{
|
||||
uint32 platform_id; /* 0x500 */
|
||||
uint32 ptr_name; /* pointer to server name */
|
||||
uint32 ver_major; /* 0x4 */
|
||||
uint32 ver_minor; /* 0x2 */
|
||||
uint32 srv_type; /* browse etc type */
|
||||
uint32 ptr_comment; /* pointer to server comment */
|
||||
|
||||
UNISTR2 uni_name; /* server name "server" */
|
||||
UNISTR2 uni_comment; /* server comment "samba x.x.x blah" */
|
||||
|
||||
} SRV_INFO_101;
|
||||
|
||||
/* SRV_INFO_102 */
|
||||
typedef struct srv_info_102_info
|
||||
{
|
||||
uint32 platform_id; /* 0x500 */
|
||||
uint32 ptr_name; /* pointer to server name */
|
||||
uint32 ver_major; /* 0x4 */
|
||||
uint32 ver_minor; /* 0x2 */
|
||||
uint32 srv_type; /* browse etc type */
|
||||
uint32 ptr_comment; /* pointer to server comment */
|
||||
uint32 users; /* 0xffff ffff*/
|
||||
uint32 disc; /* 0xf */
|
||||
uint32 hidden; /* 0x0 */
|
||||
uint32 announce; /* 240 */
|
||||
uint32 ann_delta; /* 3000 */
|
||||
uint32 licenses; /* 0 */
|
||||
uint32 ptr_usr_path; /* pointer to user path */
|
||||
|
||||
UNISTR2 uni_name; /* server name "server" */
|
||||
UNISTR2 uni_comment; /* server comment "samba x.x.x blah" */
|
||||
UNISTR2 uni_usr_path; /* "c:\" (eh?) */
|
||||
|
||||
} SRV_INFO_102;
|
||||
|
||||
|
||||
/* SRV_INFO_CTR */
|
||||
typedef struct srv_info_ctr_info
|
||||
{
|
||||
uint32 switch_value; /* switch value */
|
||||
uint32 ptr_srv_ctr; /* pointer to server info */
|
||||
union
|
||||
{
|
||||
SRV_INFO_102 sv102; /* server info level 102 */
|
||||
SRV_INFO_101 sv101; /* server info level 101 */
|
||||
|
||||
} srv;
|
||||
|
||||
} SRV_INFO_CTR;
|
||||
|
||||
/* SRV_Q_NET_SRV_GET_INFO */
|
||||
typedef struct q_net_srv_get_info
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name; /* "\\server" */
|
||||
uint32 switch_value;
|
||||
|
||||
} SRV_Q_NET_SRV_GET_INFO;
|
||||
|
||||
/* SRV_R_NET_SRV_GET_INFO */
|
||||
typedef struct r_net_srv_get_info
|
||||
{
|
||||
SRV_INFO_CTR *ctr;
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_SRV_GET_INFO;
|
||||
|
||||
/* SRV_Q_NET_SRV_SET_INFO */
|
||||
typedef struct q_net_srv_set_info
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name; /* "\\server" */
|
||||
uint32 switch_value;
|
||||
|
||||
SRV_INFO_CTR *ctr;
|
||||
|
||||
} SRV_Q_NET_SRV_SET_INFO;
|
||||
|
||||
|
||||
/* SRV_R_NET_SRV_SET_INFO */
|
||||
typedef struct r_net_srv_set_info
|
||||
{
|
||||
uint32 switch_value; /* switch value */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_SRV_SET_INFO;
|
||||
|
||||
/* SRV_Q_NET_REMOTE_TOD */
|
||||
typedef struct q_net_remote_tod
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name; /* "\\server" */
|
||||
|
||||
} SRV_Q_NET_REMOTE_TOD;
|
||||
|
||||
/* TIME_OF_DAY_INFO */
|
||||
typedef struct time_of_day_info
|
||||
{
|
||||
uint32 elapsedt;
|
||||
uint32 msecs;
|
||||
uint32 hours;
|
||||
uint32 mins;
|
||||
uint32 secs;
|
||||
uint32 hunds;
|
||||
uint32 zone;
|
||||
uint32 tintervals;
|
||||
uint32 day;
|
||||
uint32 month;
|
||||
uint32 year;
|
||||
uint32 weekday;
|
||||
|
||||
} TIME_OF_DAY_INFO;
|
||||
|
||||
/* SRV_R_NET_REMOTE_TOD */
|
||||
typedef struct r_net_remote_tod
|
||||
{
|
||||
uint32 ptr_srv_tod; /* pointer to TOD */
|
||||
TIME_OF_DAY_INFO *tod;
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} SRV_R_NET_REMOTE_TOD;
|
||||
|
||||
|
||||
#endif /* _RPC_SRVSVC_H */
|
@ -1,73 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
|
||||
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_WKS_H /* _RPC_WKS_H */
|
||||
#define _RPC_WKS_H
|
||||
|
||||
|
||||
/* wkssvc pipe */
|
||||
#define WKS_QUERY_INFO 0x00
|
||||
|
||||
|
||||
/* WKS_Q_QUERY_INFO - probably a capabilities request */
|
||||
typedef struct q_wks_query_info_info
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer (to server name?) */
|
||||
UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
|
||||
|
||||
uint16 switch_value; /* info level 100 (0x64) */
|
||||
|
||||
} WKS_Q_QUERY_INFO;
|
||||
|
||||
|
||||
/* WKS_INFO_100 - level 100 info */
|
||||
typedef struct wks_info_100_info
|
||||
{
|
||||
uint32 platform_id; /* 0x0000 01f4 - unknown */
|
||||
uint32 ptr_compname; /* pointer to server name */
|
||||
uint32 ptr_lan_grp ; /* pointer to domain name */
|
||||
uint32 ver_major; /* 4 - unknown */
|
||||
uint32 ver_minor; /* 0 - unknown */
|
||||
|
||||
UNISTR2 uni_compname; /* unicode server name */
|
||||
UNISTR2 uni_lan_grp ; /* unicode domain name */
|
||||
|
||||
} WKS_INFO_100;
|
||||
|
||||
|
||||
/* WKS_R_QUERY_INFO - probably a capabilities request */
|
||||
typedef struct r_wks_query_info_info
|
||||
{
|
||||
uint16 switch_value; /* 100 (0x64) - switch value */
|
||||
|
||||
/* for now, only level 100 is supported. this should be an enum container */
|
||||
uint32 ptr_1; /* pointer 1 */
|
||||
WKS_INFO_100 *wks100; /* workstation info level 100 */
|
||||
|
||||
uint32 status; /* return status */
|
||||
|
||||
} WKS_R_QUERY_INFO;
|
||||
|
||||
|
||||
#endif /* _RPC_WKS_H */
|
||||
|
@ -1,124 +0,0 @@
|
||||
/*
|
||||
Unix SMB/Netbios implementation.
|
||||
Version 1.9.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1998
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1998
|
||||
Copyright (C) Jeremy Allison 1998
|
||||
|
||||
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 _RPCCLIENT_H
|
||||
#define _RPCCLIENT_H
|
||||
|
||||
struct tar_client_info
|
||||
{
|
||||
int blocksize;
|
||||
BOOL inc;
|
||||
BOOL reset;
|
||||
BOOL excl;
|
||||
char type;
|
||||
int attrib;
|
||||
char **cliplist;
|
||||
int clipn;
|
||||
int tp;
|
||||
int num_files;
|
||||
int buf_size;
|
||||
int bytes_written;
|
||||
char *buf;
|
||||
int handle;
|
||||
int print_mode;
|
||||
char *file_mode;
|
||||
};
|
||||
|
||||
struct nt_client_info
|
||||
{
|
||||
/************* \PIPE\NETLOGON stuff ******************/
|
||||
|
||||
fstring mach_acct;
|
||||
|
||||
uint8 sess_key[16];
|
||||
DOM_CRED clnt_cred;
|
||||
DOM_CRED rtn_cred;
|
||||
|
||||
NET_ID_INFO_CTR ctr;
|
||||
NET_USER_INFO_3 user_info3;
|
||||
|
||||
/************** \PIPE\winreg stuff ********************/
|
||||
|
||||
POLICY_HND reg_pol_connect;
|
||||
|
||||
/************** \PIPE\lsarpc stuff ********************/
|
||||
|
||||
POLICY_HND lsa_info_pol;
|
||||
|
||||
/* domain member */
|
||||
DOM_SID level3_sid;
|
||||
DOM_SID level5_sid;
|
||||
|
||||
/* domain controller */
|
||||
fstring level3_dom;
|
||||
fstring level5_dom;
|
||||
|
||||
/************** \PIPE\samr stuff ********************/
|
||||
|
||||
POLICY_HND samr_pol_connect;
|
||||
POLICY_HND samr_pol_open_domain;
|
||||
POLICY_HND samr_pol_open_user;
|
||||
|
||||
struct acct_info *sam;
|
||||
int num_sam_entries;
|
||||
};
|
||||
|
||||
struct client_info
|
||||
{
|
||||
struct in_addr dest_ip;
|
||||
fstring dest_host;
|
||||
fstring query_host;
|
||||
uint8 name_type;
|
||||
|
||||
fstring myhostname;
|
||||
fstring mach_acct;
|
||||
|
||||
pstring cur_dir;
|
||||
pstring base_dir;
|
||||
pstring file_sel;
|
||||
|
||||
fstring service;
|
||||
fstring share;
|
||||
fstring svc_type;
|
||||
|
||||
time_t newer_than;
|
||||
int archive_level;
|
||||
int dir_total;
|
||||
int put_total_time_ms;
|
||||
int put_total_size;
|
||||
int get_total_time_ms;
|
||||
int get_total_size;
|
||||
int print_mode;
|
||||
BOOL translation;
|
||||
BOOL recurse_dir;
|
||||
BOOL prompt;
|
||||
BOOL lowercase;
|
||||
BOOL abort_mget;
|
||||
|
||||
struct tar_client_info tar;
|
||||
struct nt_client_info dom;
|
||||
};
|
||||
|
||||
enum action_type {ACTION_HEADER, ACTION_ENUMERATE, ACTION_FOOTER};
|
||||
|
||||
#endif /* _RPCCLIENT_H */
|
@ -1698,8 +1698,6 @@ extern int unix_ERR_code;
|
||||
__FILE__, __LINE__)), smb_panic("assert failed")))
|
||||
#define SMB_ASSERT_ARRAY(a,n) SMB_ASSERT((sizeof(a)/sizeof((a)[0])) >= (n))
|
||||
|
||||
#include "ntdomain.h"
|
||||
|
||||
/* A netbios name structure. */
|
||||
struct nmb_name {
|
||||
char name[17];
|
||||
@ -1708,7 +1706,6 @@ struct nmb_name {
|
||||
};
|
||||
|
||||
#include "client.h"
|
||||
#include "rpcclient.h"
|
||||
|
||||
/*
|
||||
* Size of new password account encoding string. DO NOT CHANGE.
|
||||
|
@ -25,174 +25,6 @@
|
||||
#define MAXUNI 1024
|
||||
#endif
|
||||
|
||||
/*******************************************************************
|
||||
write a string in (little-endian) unicoode format
|
||||
********************************************************************/
|
||||
|
||||
int PutUniCode(char *dst,char *src)
|
||||
{
|
||||
int ret = 0;
|
||||
while (*src) {
|
||||
SSVAL(dst,ret,(*src) & 0xFF);
|
||||
ret += 2;
|
||||
src++;
|
||||
}
|
||||
SSVAL(dst,ret,0);
|
||||
ret += 2;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
skip past some unicode strings in a buffer
|
||||
********************************************************************/
|
||||
|
||||
char *skip_unicode_string(char *buf,int n)
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
while (*buf)
|
||||
buf += 2;
|
||||
buf += 2;
|
||||
}
|
||||
return(buf);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Return a ascii version of a little-endian unicode string.
|
||||
Hack alert: uses fixed buffer(s) and only handles ascii strings
|
||||
********************************************************************/
|
||||
|
||||
char *unistrn2(uint16 *src, int len)
|
||||
{
|
||||
static char lbufs[8][MAXUNI];
|
||||
static int nexti;
|
||||
char *lbuf = lbufs[nexti];
|
||||
char *p;
|
||||
|
||||
nexti = (nexti+1)%8;
|
||||
|
||||
for (p = lbuf; *src && p-lbuf < MAXUNI-2 && len > 0; len--, src++)
|
||||
{
|
||||
*p++ = (SVAL(src,0) & 0xff);
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
return lbuf;
|
||||
}
|
||||
|
||||
static char lbufs[8][MAXUNI];
|
||||
static int nexti;
|
||||
|
||||
/*******************************************************************
|
||||
Return a ascii version of a little-endian unicode string.
|
||||
Hack alert: uses fixed buffer(s) and only handles ascii strings
|
||||
********************************************************************/
|
||||
|
||||
char *unistr2(uint16 *src)
|
||||
{
|
||||
char *lbuf = lbufs[nexti];
|
||||
char *p;
|
||||
|
||||
nexti = (nexti+1)%8;
|
||||
|
||||
for (p = lbuf; *src && p-lbuf < MAXUNI-2; p++, src++)
|
||||
{
|
||||
*p = (SVAL(src,0) & 0xff);
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
return lbuf;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Return a ascii version of a little-endian unicode string
|
||||
********************************************************************/
|
||||
|
||||
char *unistr2_to_str(UNISTR2 *str)
|
||||
{
|
||||
char *lbuf = lbufs[nexti];
|
||||
char *p;
|
||||
uint16 *src = str->buffer;
|
||||
int max_size = MIN(sizeof(str->buffer)-2, str->uni_str_len);
|
||||
|
||||
nexti = (nexti+1)%8;
|
||||
|
||||
for (p = lbuf; *src && p-lbuf < max_size; p++, src++)
|
||||
{
|
||||
*p = (SVAL(src,0) & 0xff);
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
return lbuf;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Return a number stored in a buffer
|
||||
********************************************************************/
|
||||
|
||||
uint32 buffer2_to_uint32(BUFFER2 *str)
|
||||
{
|
||||
if (str->buf_len == 4)
|
||||
{
|
||||
return IVAL(str->buffer, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Return a ascii version of a NOTunicode string
|
||||
********************************************************************/
|
||||
|
||||
char *buffer2_to_str(BUFFER2 *str)
|
||||
{
|
||||
char *lbuf = lbufs[nexti];
|
||||
char *p;
|
||||
uint16 *src = str->buffer;
|
||||
int max_size = MIN(sizeof(str->buffer)-2, str->buf_len/2);
|
||||
|
||||
nexti = (nexti+1)%8;
|
||||
|
||||
for (p = lbuf; *src && p-lbuf < max_size; p++, src++)
|
||||
{
|
||||
*p = (SVAL(src,0) & 0xff);
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
return lbuf;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Return a ascii version of a NOTunicode string
|
||||
********************************************************************/
|
||||
|
||||
char *buffer2_to_multistr(BUFFER2 *str)
|
||||
{
|
||||
char *lbuf = lbufs[nexti];
|
||||
char *p;
|
||||
uint16 *src = str->buffer;
|
||||
int max_size = MIN(sizeof(str->buffer)-2, str->buf_len/2);
|
||||
|
||||
nexti = (nexti+1)%8;
|
||||
|
||||
for (p = lbuf; p-lbuf < max_size; p++, src++)
|
||||
{
|
||||
if (*src == 0)
|
||||
{
|
||||
*p = ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
*p = (SVAL(src,0) & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
return lbuf;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
create a null-terminated unicode string from a null-terminated ascii string.
|
||||
return number of unicode chars copied, excluding the null character.
|
||||
@ -220,43 +52,3 @@ int struni2(char *dst, const char *src)
|
||||
return len;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Return a ascii version of a little-endian unicode string.
|
||||
Hack alert: uses fixed buffer(s) and only handles ascii strings
|
||||
********************************************************************/
|
||||
|
||||
char *unistr(char *buf)
|
||||
{
|
||||
char *lbuf = lbufs[nexti];
|
||||
char *p;
|
||||
|
||||
nexti = (nexti+1)%8;
|
||||
|
||||
for (p = lbuf; *buf && p-lbuf < MAXUNI-2; p++, buf += 2)
|
||||
{
|
||||
*p = (SVAL(buf,0) & 0xff);
|
||||
}
|
||||
*p = 0;
|
||||
return lbuf;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
strcpy for unicode strings. returns length (in num of wide chars)
|
||||
********************************************************************/
|
||||
|
||||
int unistrcpy(char *dst, char *src)
|
||||
{
|
||||
int num_wchars = 0;
|
||||
|
||||
while (*src)
|
||||
{
|
||||
*dst++ = *src++;
|
||||
*dst++ = *src++;
|
||||
num_wchars++;
|
||||
}
|
||||
*dst++ = 0;
|
||||
*dst++ = 0;
|
||||
|
||||
return num_wchars;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user