mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
got rid of a bunch of unused header files (now replaced with IDL
generated headers)
(This used to be commit 7f2ac326f9
)
This commit is contained in:
parent
2bb7ff5915
commit
e01b018359
@ -33,334 +33,6 @@
|
||||
|
||||
#include "talloc.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 allocated size of the buffer. */
|
||||
uint32 grow_size; /* size requested via prs_grow() calls */
|
||||
char *data_p; /* The buffer itself. */
|
||||
TALLOC_CTX *mem_ctx; /* When unmarshalling, use this.... */
|
||||
} 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)
|
||||
|
||||
#define RPC_BIG_ENDIAN 1
|
||||
#define RPC_LITTLE_ENDIAN 0
|
||||
|
||||
#define RPC_PARSE_ALIGN 4
|
||||
|
||||
typedef struct _output_data {
|
||||
/*
|
||||
* 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;
|
||||
} output_data;
|
||||
|
||||
typedef struct _input_data {
|
||||
/*
|
||||
* This is the current incoming pdu. The data here
|
||||
* is collected via multiple writes until a complete
|
||||
* pdu is seen, then the data is copied into the in_data
|
||||
* structure. The maximum size of this is 0x1630 (MAX_PDU_FRAG_LEN).
|
||||
*/
|
||||
unsigned char current_in_pdu[MAX_PDU_FRAG_LEN];
|
||||
|
||||
/*
|
||||
* The amount of data needed to complete the in_pdu.
|
||||
* If this is zero, then we are at the start of a new
|
||||
* pdu.
|
||||
*/
|
||||
uint32 pdu_needed_len;
|
||||
|
||||
/*
|
||||
* The amount of data received so far in the in_pdu.
|
||||
* If this is zero, then we are at the start of a new
|
||||
* pdu.
|
||||
*/
|
||||
uint32 pdu_received_len;
|
||||
|
||||
/*
|
||||
* This is the collection of input data with all
|
||||
* the rpc headers and auth footers removed.
|
||||
* The maximum length of this (1Mb) is strictly enforced.
|
||||
*/
|
||||
prs_struct data;
|
||||
} input_data;
|
||||
|
||||
/*
|
||||
* Handle database - stored per pipe.
|
||||
*/
|
||||
|
||||
struct policy
|
||||
{
|
||||
struct policy *next, *prev;
|
||||
|
||||
POLICY_HND pol_hnd;
|
||||
|
||||
void *data_ptr;
|
||||
void (*free_fn)(void *);
|
||||
|
||||
};
|
||||
|
||||
struct handle_list {
|
||||
struct policy *Policy; /* List of policies. */
|
||||
size_t count; /* Current number of handles. */
|
||||
size_t pipe_ref_count; /* Number of pipe handles referring to this list. */
|
||||
};
|
||||
|
||||
/* Domain controller authentication protocol info */
|
||||
struct dcinfo
|
||||
{
|
||||
DOM_CHAL clnt_chal; /* Initial challenge received from client */
|
||||
DOM_CHAL srv_chal; /* Initial server challenge */
|
||||
DOM_CRED clnt_cred; /* Last client credential */
|
||||
DOM_CRED srv_cred; /* Last server credential */
|
||||
|
||||
uchar sess_key[8]; /* Session key */
|
||||
uchar md4pw[16]; /* md4(machine password) */
|
||||
|
||||
fstring mach_acct; /* Machine name we've authenticated. */
|
||||
|
||||
fstring remote_machine; /* Machine name we've authenticated. */
|
||||
|
||||
BOOL challenge_sent;
|
||||
BOOL got_session_key;
|
||||
BOOL authenticated;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* DCE/RPC-specific samba-internal-specific handling of data on
|
||||
* NamedPipes.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct pipes_struct
|
||||
{
|
||||
struct pipes_struct *next, *prev;
|
||||
|
||||
struct tcon_context *conn;
|
||||
uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
|
||||
|
||||
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;
|
||||
struct dcinfo dc; /* Keeps the creds data. */
|
||||
|
||||
/*
|
||||
* Windows user info.
|
||||
*/
|
||||
fstring user_name;
|
||||
fstring domain;
|
||||
fstring wks;
|
||||
|
||||
/*
|
||||
* Unix user name and credentials.
|
||||
*/
|
||||
|
||||
fstring pipe_user_name;
|
||||
struct current_user pipe_user;
|
||||
|
||||
uint8 session_key[16];
|
||||
|
||||
/*
|
||||
* Set to true when an RPC bind has been done on this pipe.
|
||||
*/
|
||||
|
||||
BOOL pipe_bound;
|
||||
|
||||
/*
|
||||
* Set to true when we should return fault PDU's for everything.
|
||||
*/
|
||||
|
||||
BOOL fault_state;
|
||||
|
||||
/*
|
||||
* Set to true when we should return fault PDU's for a bad handle.
|
||||
*/
|
||||
|
||||
BOOL bad_handle_fault_state;
|
||||
|
||||
/*
|
||||
* Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
|
||||
*/
|
||||
|
||||
BOOL endian;
|
||||
|
||||
/*
|
||||
* Struct to deal with multiple pdu inputs.
|
||||
*/
|
||||
|
||||
input_data in_data;
|
||||
|
||||
/*
|
||||
* Struct to deal with multiple pdu outputs.
|
||||
*/
|
||||
|
||||
output_data out_data;
|
||||
|
||||
/* talloc context to use when allocating memory on this pipe. */
|
||||
TALLOC_CTX *mem_ctx;
|
||||
|
||||
/* handle database to use on this pipe. */
|
||||
struct handle_list *pipe_handles;
|
||||
|
||||
} pipes_struct;
|
||||
|
||||
typedef struct smb_np_struct
|
||||
{
|
||||
struct smb_np_struct *next, *prev;
|
||||
int pnum;
|
||||
struct tcon_context *conn;
|
||||
uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
|
||||
BOOL open; /* open connection */
|
||||
uint16 device_state;
|
||||
uint16 priority;
|
||||
fstring name;
|
||||
|
||||
/* When replying to an SMBtrans, this is the maximum amount of
|
||||
data that can be sent in the initial reply. */
|
||||
int max_trans_reply;
|
||||
|
||||
/*
|
||||
* NamedPipe state information.
|
||||
*
|
||||
* (e.g. typecast a np_struct, above).
|
||||
*/
|
||||
void *np_state;
|
||||
|
||||
/*
|
||||
* NamedPipe functions, to be called to perform
|
||||
* Named Pipe transactions on request from an
|
||||
* SMB client.
|
||||
*/
|
||||
|
||||
/* call to create a named pipe connection.
|
||||
* returns: state information representing the connection.
|
||||
* is stored in np_state, above.
|
||||
*/
|
||||
void * (*namedpipe_create)(char *pipe_name,
|
||||
struct tcon_context *conn, uint16 vuid);
|
||||
|
||||
/* call to perform a write / read namedpipe transaction.
|
||||
* TransactNamedPipe is weird: it returns whether there
|
||||
* is more data outstanding to be read, and the
|
||||
* caller is expected to take note and follow up with
|
||||
* read requests.
|
||||
*/
|
||||
ssize_t (*namedpipe_transact)(void *np_state,
|
||||
char *data, int len,
|
||||
char *rdata, int rlen,
|
||||
BOOL *pipe_outstanding);
|
||||
|
||||
/* call to perform a write namedpipe operation
|
||||
*/
|
||||
ssize_t (*namedpipe_write)(void * np_state,
|
||||
char *data, size_t n);
|
||||
|
||||
/* call to perform a read namedpipe operation.
|
||||
*
|
||||
* NOTE: the only reason that the pipe_outstanding
|
||||
* argument is here is because samba does not use
|
||||
* the namedpipe_transact function yet: instead,
|
||||
* it performs the same as what namedpipe_transact
|
||||
* does - a write, followed by a read.
|
||||
*
|
||||
* when samba is modified to use namedpipe_transact,
|
||||
* the pipe_outstanding argument may be removed.
|
||||
*/
|
||||
ssize_t (*namedpipe_read)(void * np_state,
|
||||
char *data, size_t max_len,
|
||||
BOOL *pipe_outstanding);
|
||||
|
||||
/* call to close a namedpipe.
|
||||
* function is expected to perform all cleanups
|
||||
* necessary, free all memory etc.
|
||||
*
|
||||
* returns True if cleanup was successful (not that
|
||||
* we particularly care).
|
||||
*/
|
||||
BOOL (*namedpipe_close)(void * np_state);
|
||||
|
||||
} smb_np_struct;
|
||||
|
||||
struct api_struct
|
||||
{
|
||||
const char *name;
|
||||
uint8 opnum;
|
||||
BOOL (*fn) (pipes_struct *);
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 rid;
|
||||
const char *name;
|
||||
|
||||
} rid_name;
|
||||
|
||||
struct acct_info
|
||||
{
|
||||
fstring acct_name; /* account name */
|
||||
fstring acct_desc; /* account name */
|
||||
uint32 rid; /* domain-relative RID */
|
||||
};
|
||||
|
||||
/*
|
||||
* higher order functions for use with msrpc client code
|
||||
*/
|
||||
|
||||
#define PRINT_INFO_FN(fn)\
|
||||
void (*fn)(const char*, uint32, uint32, void *const *const)
|
||||
#define JOB_INFO_FN(fn)\
|
||||
void (*fn)(const char*, const char*, uint32, uint32, void *const *const)
|
||||
|
||||
/* end higher order functions */
|
||||
|
||||
|
||||
/* security descriptor structures */
|
||||
#include "rpc_secdes.h"
|
||||
@ -368,12 +40,5 @@ struct acct_info
|
||||
/* 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"
|
||||
#include "rpc_spoolss.h"
|
||||
#include "rpc_dfs.h"
|
||||
#include "rpc_ds.h"
|
||||
|
||||
#endif /* _NT_DOMAIN_H */
|
||||
|
@ -1,80 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1999
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1999
|
||||
|
||||
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_BRS_H /* _RPC_BRS_H */
|
||||
#define _RPC_BRS_H
|
||||
|
||||
|
||||
/* brssvc pipe */
|
||||
#define BRS_QUERY_INFO 0x02
|
||||
|
||||
|
||||
/* BRS_Q_QUERY_INFO - probably a capabilities request */
|
||||
typedef struct q_brs_query_info_info
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer (to server name?) */
|
||||
UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
|
||||
|
||||
uint16 switch_value1; /* info level 100 (0x64) */
|
||||
/* align */
|
||||
uint16 switch_value2; /* info level 100 (0x64) */
|
||||
|
||||
uint32 ptr;
|
||||
uint32 pad1;
|
||||
uint32 pad2;
|
||||
|
||||
} BRS_Q_QUERY_INFO;
|
||||
|
||||
|
||||
/* BRS_INFO_100 - level 100 info */
|
||||
typedef struct brs_info_100_info
|
||||
{
|
||||
uint32 pad1;
|
||||
uint32 ptr2;
|
||||
uint32 pad2;
|
||||
uint32 pad3;
|
||||
|
||||
} BRS_INFO_100;
|
||||
|
||||
|
||||
/* BRS_R_QUERY_INFO - probably a capabilities request */
|
||||
typedef struct r_brs_query_info_info
|
||||
{
|
||||
uint16 switch_value1; /* 100 (0x64) - switch value */
|
||||
/* align */
|
||||
uint16 switch_value2; /* info level 100 (0x64) */
|
||||
|
||||
/* for now, only level 100 is supported. this should be an enum container */
|
||||
uint32 ptr_1; /* pointer 1 */
|
||||
|
||||
union
|
||||
{
|
||||
BRS_INFO_100 *brs100; /* browser info level 100 */
|
||||
void *id;
|
||||
|
||||
} info;
|
||||
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} BRS_R_QUERY_INFO;
|
||||
|
||||
#endif /* _RPC_BRS_H */
|
||||
|
@ -1,197 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Samba parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996 - 2000
|
||||
Copyright (C) Shirish Kalele 2000
|
||||
|
||||
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_DFS_H
|
||||
#define _RPC_DFS_H
|
||||
|
||||
/* NETDFS pipe: calls */
|
||||
#define DFS_EXIST 0x00
|
||||
#define DFS_ADD 0x01
|
||||
#define DFS_REMOVE 0x02
|
||||
#define DFS_GET_INFO 0x04
|
||||
#define DFS_ENUM 0x05
|
||||
|
||||
/* dfsadd flags */
|
||||
#define DFSFLAG_ADD_VOLUME 0x00000001
|
||||
#define DFSFLAG_RESTORE_VOLUME 0x00000002
|
||||
|
||||
typedef struct dfs_q_dfs_exist
|
||||
{
|
||||
uint32 dummy;
|
||||
}
|
||||
DFS_Q_DFS_EXIST;
|
||||
|
||||
/* status == 1 if dfs exists. */
|
||||
typedef struct dfs_r_dfs_exist
|
||||
{
|
||||
uint32 status; /* Not a WERROR or NTSTATUS code */
|
||||
}
|
||||
DFS_R_DFS_EXIST;
|
||||
|
||||
typedef struct dfs_q_dfs_add
|
||||
{
|
||||
uint32 ptr_DfsEntryPath;
|
||||
UNISTR2 DfsEntryPath;
|
||||
uint32 ptr_ServerName;
|
||||
UNISTR2 ServerName;
|
||||
uint32 ptr_ShareName;
|
||||
UNISTR2 ShareName;
|
||||
uint32 ptr_Comment;
|
||||
UNISTR2 Comment;
|
||||
uint32 Flags;
|
||||
}
|
||||
DFS_Q_DFS_ADD;
|
||||
|
||||
typedef struct dfs_r_dfs_add
|
||||
{
|
||||
WERROR status;
|
||||
}
|
||||
DFS_R_DFS_ADD;
|
||||
|
||||
/********************************************/
|
||||
typedef struct dfs_q_dfs_remove
|
||||
{
|
||||
UNISTR2 DfsEntryPath;
|
||||
uint32 ptr_ServerName;
|
||||
UNISTR2 ServerName;
|
||||
uint32 ptr_ShareName;
|
||||
UNISTR2 ShareName;
|
||||
}
|
||||
DFS_Q_DFS_REMOVE;
|
||||
|
||||
typedef struct dfs_r_dfs_remove
|
||||
{
|
||||
WERROR status;
|
||||
}
|
||||
DFS_R_DFS_REMOVE;
|
||||
|
||||
/********************************************/
|
||||
typedef struct dfs_info_1
|
||||
{
|
||||
uint32 ptr_entrypath;
|
||||
UNISTR2 entrypath;
|
||||
}
|
||||
DFS_INFO_1;
|
||||
|
||||
typedef struct dfs_info_2
|
||||
{
|
||||
uint32 ptr_entrypath;
|
||||
UNISTR2 entrypath;
|
||||
uint32 ptr_comment;
|
||||
UNISTR2 comment;
|
||||
uint32 state;
|
||||
uint32 num_storages;
|
||||
}
|
||||
DFS_INFO_2;
|
||||
|
||||
typedef struct dfs_storage_info
|
||||
{
|
||||
uint32 state;
|
||||
uint32 ptr_servername;
|
||||
UNISTR2 servername;
|
||||
uint32 ptr_sharename;
|
||||
UNISTR2 sharename;
|
||||
}
|
||||
DFS_STORAGE_INFO;
|
||||
|
||||
typedef struct dfs_info_3
|
||||
{
|
||||
uint32 ptr_entrypath;
|
||||
UNISTR2 entrypath;
|
||||
uint32 ptr_comment;
|
||||
UNISTR2 comment;
|
||||
uint32 state;
|
||||
uint32 num_storages;
|
||||
uint32 ptr_storages;
|
||||
uint32 num_storage_infos;
|
||||
DFS_STORAGE_INFO* storages;
|
||||
}
|
||||
DFS_INFO_3;
|
||||
|
||||
typedef struct dfs_info_ctr
|
||||
{
|
||||
|
||||
uint32 switch_value;
|
||||
uint32 num_entries;
|
||||
uint32 ptr_dfs_ctr; /* pointer to dfs info union */
|
||||
union
|
||||
{
|
||||
DFS_INFO_1 *info1;
|
||||
DFS_INFO_2 *info2;
|
||||
DFS_INFO_3 *info3;
|
||||
} dfs;
|
||||
}
|
||||
DFS_INFO_CTR;
|
||||
|
||||
typedef struct dfs_q_dfs_get_info
|
||||
{
|
||||
UNISTR2 uni_path;
|
||||
|
||||
uint32 ptr_server;
|
||||
UNISTR2 uni_server;
|
||||
|
||||
uint32 ptr_share;
|
||||
UNISTR2 uni_share;
|
||||
|
||||
uint32 level;
|
||||
}
|
||||
DFS_Q_DFS_GET_INFO;
|
||||
|
||||
typedef struct dfs_r_dfs_get_info
|
||||
{
|
||||
uint32 level;
|
||||
uint32 ptr_ctr;
|
||||
DFS_INFO_CTR ctr;
|
||||
WERROR status;
|
||||
}
|
||||
DFS_R_DFS_GET_INFO;
|
||||
|
||||
typedef struct dfs_q_dfs_enum
|
||||
{
|
||||
uint32 level;
|
||||
uint32 maxpreflen;
|
||||
uint32 ptr_buffer;
|
||||
uint32 level2;
|
||||
uint32 ptr_num_entries;
|
||||
uint32 num_entries;
|
||||
uint32 ptr_num_entries2;
|
||||
uint32 num_entries2;
|
||||
ENUM_HND reshnd;
|
||||
}
|
||||
DFS_Q_DFS_ENUM;
|
||||
|
||||
typedef struct dfs_r_dfs_enum
|
||||
{
|
||||
DFS_INFO_CTR *ctr;
|
||||
uint32 ptr_buffer;
|
||||
uint32 level;
|
||||
uint32 level2;
|
||||
uint32 ptr_num_entries;
|
||||
uint32 num_entries;
|
||||
uint32 ptr_num_entries2;
|
||||
uint32 num_entries2;
|
||||
ENUM_HND reshnd;
|
||||
WERROR status;
|
||||
}
|
||||
DFS_R_DFS_ENUM;
|
||||
|
||||
#endif
|
@ -1,91 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Gerald Carter 2002
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _RPC_DS_H /* _RPC_LSA_H */
|
||||
#define _RPC_DS_H
|
||||
|
||||
#include "rpc_misc.h"
|
||||
|
||||
|
||||
/* Opcodes available on PIPE_LSARPC_DS */
|
||||
|
||||
#define DS_GETPRIMDOMINFO 0x00
|
||||
|
||||
|
||||
/* macros for RPC's */
|
||||
|
||||
#define DSROLE_PRIMARY_DS_RUNNING 0x00000001
|
||||
#define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002
|
||||
#define DSROLE_UPGRADE_IN_PROGRESS 0x00000004
|
||||
#define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 machine_role;
|
||||
uint16 unknown; /* 0x6173 -- maybe just alignment? */
|
||||
|
||||
uint32 flags;
|
||||
|
||||
uint32 netbios_ptr;
|
||||
uint32 dnsname_ptr;
|
||||
uint32 forestname_ptr;
|
||||
|
||||
GUID domain_guid;
|
||||
|
||||
UNISTR2 netbios_domain;
|
||||
/* these 2 might be reversed in order. I can't tell from
|
||||
my tests as both values are the same --jerry */
|
||||
UNISTR2 dns_domain;
|
||||
UNISTR2 forest_domain;
|
||||
} DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DSROLE_PRIMARY_DOMAIN_INFO_BASIC *basic;
|
||||
} DS_DOMINFO_CTR;
|
||||
|
||||
/* info levels for ds_getprimdominfo() */
|
||||
|
||||
#define DsRolePrimaryDomainInfoBasic 1
|
||||
|
||||
|
||||
/* DS_Q_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() request */
|
||||
typedef struct
|
||||
{
|
||||
uint16 level;
|
||||
} DS_Q_GETPRIMDOMINFO;
|
||||
|
||||
/* DS_R_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() response */
|
||||
typedef struct
|
||||
{
|
||||
uint32 ptr;
|
||||
|
||||
uint16 level;
|
||||
uint16 unknown0; /* 0x455c -- maybe just alignment? */
|
||||
|
||||
DS_DOMINFO_CTR info;
|
||||
|
||||
NTSTATUS status;
|
||||
} DS_R_GETPRIMDOMINFO;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* _RPC_DS_H */
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Elrond 2000
|
||||
|
||||
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_PARSE_H
|
||||
#define _RPC_PARSE_H
|
||||
|
||||
/* different dce/rpc pipes */
|
||||
#include "rpc_reg.h"
|
||||
#include "rpc_brs.h"
|
||||
|
||||
#endif /* _RPC_PARSE_H */
|
@ -1,644 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997.
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997.
|
||||
Copyright (C) Paul Ashton 1997.
|
||||
Copyright (C) Gerald Carter 2002.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _RPC_REG_H /* _RPC_REG_H */
|
||||
#define _RPC_REG_H
|
||||
|
||||
|
||||
/* winreg pipe defines
|
||||
NOT IMPLEMENTED !!
|
||||
#define _REG_UNK_01 0x01
|
||||
#define _REG_UNK_03 0x03
|
||||
#define REG_CREATE_KEY 0x06
|
||||
#define REG_DELETE_KEY 0x07
|
||||
#define REG_DELETE_VALUE 0x08
|
||||
#define REG_FLUSH_KEY 0x0b
|
||||
#define REG_GET_KEY_SEC 0x0c
|
||||
#define _REG_UNK_0D 0x0d
|
||||
#define _REG_UNK_0E 0x0e
|
||||
#define _REG_UNK_12 0x12
|
||||
#define _REG_UNK_13 0x13
|
||||
#define REG_SET_KEY_SEC 0x15
|
||||
#define REG_CREATE_VALUE 0x16
|
||||
#define _REG_UNK_17 0x17
|
||||
*/
|
||||
|
||||
/* Implemented */
|
||||
#define REG_OPEN_HKCR 0x00
|
||||
#define REG_OPEN_HKLM 0x02
|
||||
#define REG_OPEN_HKU 0x04
|
||||
#define REG_CLOSE 0x05
|
||||
#define REG_ENUM_KEY 0x09
|
||||
#define REG_ENUM_VALUE 0x0a
|
||||
#define REG_OPEN_ENTRY 0x0f
|
||||
#define REG_QUERY_KEY 0x10
|
||||
#define REG_INFO 0x11
|
||||
#define REG_SHUTDOWN 0x18
|
||||
#define REG_ABORT_SHUTDOWN 0x19
|
||||
#define REG_SAVE_KEY 0x14 /* no idea what the real name is */
|
||||
#define REG_UNKNOWN_1A 0x1a
|
||||
|
||||
|
||||
#define HKEY_CLASSES_ROOT 0x80000000
|
||||
#define HKEY_CURRENT_USER 0x80000001
|
||||
#define HKEY_LOCAL_MACHINE 0x80000002
|
||||
#define HKEY_USERS 0x80000003
|
||||
|
||||
#define KEY_HKLM "HKLM"
|
||||
#define KEY_HKU "HKU"
|
||||
#define KEY_HKCR "HKCR"
|
||||
#define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print"
|
||||
#define KEY_TREE_ROOT ""
|
||||
|
||||
/* Registry data types */
|
||||
|
||||
#define REG_NONE 0
|
||||
#define REG_SZ 1
|
||||
#define REG_EXPAND_SZ 2
|
||||
#define REG_BINARY 3
|
||||
#define REG_DWORD 4
|
||||
#define REG_DWORD_LE 4 /* DWORD, little endian */
|
||||
#define REG_DWORD_BE 5 /* DWORD, big endian */
|
||||
#define REG_LINK 6
|
||||
#define REG_MULTI_SZ 7
|
||||
#define REG_RESOURCE_LIST 8
|
||||
#define REG_FULL_RESOURCE_DESCRIPTOR 9
|
||||
#define REG_RESOURCE_REQUIREMENTS_LIST 10
|
||||
|
||||
/* structure to contain registry values */
|
||||
|
||||
typedef struct {
|
||||
fstring valuename;
|
||||
uint16 type;
|
||||
uint32 size; /* in bytes */
|
||||
uint8 *data_p;
|
||||
} REGISTRY_VALUE;
|
||||
|
||||
/* container for regostry values */
|
||||
|
||||
typedef struct {
|
||||
TALLOC_CTX *ctx;
|
||||
uint32 num_values;
|
||||
REGISTRY_VALUE **values;
|
||||
} REGVAL_CTR;
|
||||
|
||||
/* container for registry subkey names */
|
||||
|
||||
typedef struct {
|
||||
TALLOC_CTX *ctx;
|
||||
uint32 num_subkeys;
|
||||
char **subkeys;
|
||||
} REGSUBKEY_CTR;
|
||||
|
||||
|
||||
/*
|
||||
* container for function pointers to enumeration routines
|
||||
* for vitural registry view
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* functions for enumerating subkeys and values */
|
||||
int (*subkey_fn)( char *key, REGSUBKEY_CTR *subkeys);
|
||||
int (*value_fn) ( char *key, REGVAL_CTR *val );
|
||||
BOOL (*store_subkeys_fn)( char *key, REGSUBKEY_CTR *subkeys );
|
||||
BOOL (*store_values_fn)( char *key, REGVAL_CTR *val );
|
||||
} REGISTRY_OPS;
|
||||
|
||||
typedef struct {
|
||||
const char *keyname; /* full path to name of key */
|
||||
REGISTRY_OPS *ops; /* registry function hooks */
|
||||
} REGISTRY_HOOK;
|
||||
|
||||
|
||||
|
||||
/* structure to store the registry handles */
|
||||
|
||||
typedef struct _RegistryKey {
|
||||
|
||||
struct _RegistryKey *prev, *next;
|
||||
|
||||
POLICY_HND hnd;
|
||||
pstring name; /* full name of registry key */
|
||||
REGISTRY_HOOK *hook;
|
||||
|
||||
} REGISTRY_KEY;
|
||||
|
||||
|
||||
/* REG_Q_OPEN_HKCR */
|
||||
typedef struct q_reg_open_hkcr_info
|
||||
{
|
||||
uint32 ptr;
|
||||
uint16 unknown_0; /* 0x5428 - 16 bit unknown */
|
||||
uint16 unknown_1; /* random. changes */
|
||||
uint32 level; /* 0x0000 0002 - 32 bit unknown */
|
||||
|
||||
} REG_Q_OPEN_HKCR ;
|
||||
|
||||
/* REG_R_OPEN_HKCR */
|
||||
typedef struct r_reg_open_hkcr_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_OPEN_HKCR;
|
||||
|
||||
|
||||
/* REG_Q_OPEN_HKLM */
|
||||
typedef struct q_reg_open_hklm_info
|
||||
{
|
||||
uint32 ptr;
|
||||
uint16 unknown_0; /* 0xE084 - 16 bit unknown */
|
||||
uint16 unknown_1; /* random. changes */
|
||||
uint32 access_mask;
|
||||
|
||||
}
|
||||
REG_Q_OPEN_HKLM;
|
||||
|
||||
/* REG_R_OPEN_HKLM */
|
||||
typedef struct r_reg_open_hklm_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
}
|
||||
REG_R_OPEN_HKLM;
|
||||
|
||||
|
||||
/* REG_Q_OPEN_HKU */
|
||||
typedef struct q_reg_open_hku_info
|
||||
{
|
||||
uint32 ptr;
|
||||
uint16 unknown_0;
|
||||
uint16 unknown_1;
|
||||
uint32 access_mask;
|
||||
|
||||
} REG_Q_OPEN_HKU;
|
||||
|
||||
/* REG_R_OPEN_HKU */
|
||||
typedef struct r_reg_open_hku_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
NTSTATUS 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
|
||||
{
|
||||
NTSTATUS 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
|
||||
{
|
||||
NTSTATUS 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 */
|
||||
|
||||
NTSTATUS 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
|
||||
{
|
||||
NTSTATUS 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; /* */
|
||||
|
||||
NTSTATUS 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 */
|
||||
|
||||
NTSTATUS 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 */
|
||||
|
||||
NTSTATUS 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 */
|
||||
|
||||
NTSTATUS 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 reserved; /* 0x0000 0000 - according to MSDN (max_subkeysize?) */
|
||||
uint32 num_values;
|
||||
uint32 max_valnamelen;
|
||||
uint32 max_valbufsize;
|
||||
uint32 sec_desc; /* 0x0000 0078 */
|
||||
NTTIME mod_time; /* modified time */
|
||||
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_QUERY_KEY;
|
||||
|
||||
|
||||
/* REG_Q_UNKNOWN_1A */
|
||||
typedef struct q_reg_unk_1a_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
} REG_Q_UNKNOWN_1A;
|
||||
|
||||
/* REG_R_UNKNOWN_1A */
|
||||
typedef struct r_reg_unk_1a_info
|
||||
{
|
||||
uint32 unknown; /* 0x0500 0000 */
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_UNKNOWN_1A;
|
||||
|
||||
|
||||
/* REG_Q_UNKNOWN_1A */
|
||||
typedef struct q_reg_unknown_14
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
|
||||
UNIHDR hdr_file; /* unicode product type header */
|
||||
UNISTR2 uni_file; /* local filename to save key as from regedt32.exe */
|
||||
/* e.g. "c:\temp\test.dat" */
|
||||
|
||||
uint32 unknown; /* 0x0000 0000 */
|
||||
|
||||
} REG_Q_SAVE_KEY;
|
||||
|
||||
|
||||
/* REG_R_UNKNOWN_1A */
|
||||
typedef struct r_reg_unknown_14
|
||||
{
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_SAVE_KEY;
|
||||
|
||||
|
||||
|
||||
/* 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. */
|
||||
|
||||
NTSTATUS 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? */
|
||||
|
||||
NTSTATUS 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 ptr_reserved; /* pointer */
|
||||
|
||||
uint32 ptr_buf; /* the next three fields follow if ptr_buf != 0 */
|
||||
uint32 ptr_bufsize;
|
||||
uint32 bufsize;
|
||||
uint32 buf_unk;
|
||||
|
||||
uint32 unk1;
|
||||
uint32 ptr_buflen;
|
||||
uint32 buflen;
|
||||
|
||||
uint32 ptr_buflen2;
|
||||
uint32 buflen2;
|
||||
|
||||
} REG_Q_INFO;
|
||||
|
||||
/* REG_R_INFO */
|
||||
typedef struct r_reg_info_info
|
||||
{
|
||||
uint32 ptr_type; /* key type pointer */
|
||||
uint32 type; /* key datatype */
|
||||
|
||||
uint32 ptr_uni_val; /* key value pointer */
|
||||
BUFFER2 uni_val; /* key value */
|
||||
|
||||
uint32 ptr_max_len;
|
||||
uint32 buf_max_len;
|
||||
|
||||
uint32 ptr_len;
|
||||
uint32 buf_len;
|
||||
|
||||
NTSTATUS 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 access_desired;
|
||||
|
||||
} REG_Q_OPEN_ENTRY;
|
||||
|
||||
|
||||
|
||||
/* REG_R_OPEN_ENTRY */
|
||||
typedef struct r_reg_open_entry_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle */
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_OPEN_ENTRY;
|
||||
|
||||
/* REG_Q_SHUTDOWN */
|
||||
typedef struct q_reg_shutdown_info
|
||||
{
|
||||
uint32 ptr_0;
|
||||
uint32 ptr_1;
|
||||
uint32 ptr_2;
|
||||
UNIHDR hdr_msg; /* shutdown message */
|
||||
UNISTR2 uni_msg; /* seconds */
|
||||
uint32 timeout; /* seconds */
|
||||
uint8 force; /* boolean: force shutdown */
|
||||
uint8 reboot; /* boolean: reboot on shutdown */
|
||||
|
||||
} REG_Q_SHUTDOWN;
|
||||
|
||||
/* REG_R_SHUTDOWN */
|
||||
typedef struct r_reg_shutdown_info
|
||||
{
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_SHUTDOWN;
|
||||
|
||||
/* REG_Q_ABORT_SHUTDOWN */
|
||||
typedef struct q_reg_abort_shutdown_info
|
||||
{
|
||||
uint32 ptr_server;
|
||||
uint16 server;
|
||||
|
||||
} REG_Q_ABORT_SHUTDOWN;
|
||||
|
||||
/* REG_R_ABORT_SHUTDOWN */
|
||||
typedef struct r_reg_abort_shutdown_info
|
||||
{
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} REG_R_ABORT_SHUTDOWN;
|
||||
|
||||
|
||||
#endif /* _RPC_REG_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,948 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup
|
||||
Copyright (C) Andrew Tridgell 1992-1997
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
|
||||
Copyright (C) Paul Ashton 1997
|
||||
Copyright (C) Nigel Williams 2001
|
||||
|
||||
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_NET_CONN_ENUM 0x08
|
||||
#define SRV_NET_FILE_ENUM 0x09
|
||||
#define SRV_NET_FILE_CLOSE 0x0b
|
||||
#define SRV_NET_SESS_ENUM 0x0c
|
||||
#define SRV_NET_SHARE_ADD 0x0e
|
||||
#define SRV_NET_SHARE_ENUM_ALL 0x0f
|
||||
#define SRV_NET_SHARE_GET_INFO 0x10
|
||||
#define SRV_NET_SHARE_SET_INFO 0x11
|
||||
#define SRV_NET_SHARE_DEL 0x12
|
||||
#define SRV_NET_SHARE_DEL_STICKY 0x13
|
||||
#define SRV_NET_SRV_GET_INFO 0x15
|
||||
#define SRV_NET_SRV_SET_INFO 0x16
|
||||
#define SRV_NET_DISK_ENUM 0x17
|
||||
#define SRV_NET_REMOTE_TOD 0x1c
|
||||
#define SRV_NET_NAME_VALIDATE 0x21
|
||||
#define SRV_NET_SHARE_ENUM 0x24
|
||||
#define SRV_NET_FILE_QUERY_SECDESC 0x27
|
||||
#define SRV_NET_FILE_SET_SECDESC 0x28
|
||||
|
||||
#define MAX_SERVER_DISK_ENTRIES 15
|
||||
|
||||
typedef struct disk_info {
|
||||
uint32 unknown;
|
||||
UNISTR3 disk_name;
|
||||
} DISK_INFO;
|
||||
|
||||
typedef struct disk_enum_container {
|
||||
uint32 level;
|
||||
uint32 entries_read;
|
||||
uint32 unknown;
|
||||
uint32 disk_info_ptr;
|
||||
DISK_INFO *disk_info;
|
||||
} DISK_ENUM_CONTAINER;
|
||||
|
||||
typedef struct net_srv_disk_enum {
|
||||
uint32 ptr_srv_name; /* pointer (to server name?) */
|
||||
UNISTR2 uni_srv_name; /* server name */
|
||||
|
||||
DISK_ENUM_CONTAINER disk_enum_ctr;
|
||||
|
||||
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
|
||||
uint32 total_entries; /* total number of entries */
|
||||
ENUM_HND enum_hnd;
|
||||
WERROR status; /* return status */
|
||||
} SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
|
||||
|
||||
typedef struct net_name_validate {
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
UNISTR2 uni_name; /*name to validate*/
|
||||
uint32 type;
|
||||
uint32 flags;
|
||||
WERROR status;
|
||||
} SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE;
|
||||
|
||||
/* 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 ptr_user_name; /* pointer (to user name */
|
||||
UNISTR2 uni_user_name; /* user name */
|
||||
|
||||
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;
|
||||
|
||||
WERROR 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;
|
||||
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_CONN_ENUM;
|
||||
|
||||
/* SH_INFO_0 */
|
||||
typedef struct ptr_share_info0
|
||||
{
|
||||
uint32 ptr_netname; /* pointer to net name. */
|
||||
} SH_INFO_0;
|
||||
|
||||
/* SH_INFO_0_STR (level 0 share info strings) */
|
||||
typedef struct str_share_info0
|
||||
{
|
||||
SH_INFO_0 *ptrs;
|
||||
|
||||
UNISTR2 uni_netname; /* unicode string of net name */
|
||||
|
||||
} SH_INFO_0_STR;
|
||||
|
||||
/* SRV_SHARE_INFO_0 */
|
||||
typedef struct share_info_0_info
|
||||
{
|
||||
SH_INFO_0 info_0;
|
||||
SH_INFO_0_STR info_0_str;
|
||||
|
||||
} SRV_SHARE_INFO_0;
|
||||
|
||||
/* 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
|
||||
{
|
||||
SH_INFO_1 *ptrs;
|
||||
|
||||
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
|
||||
{
|
||||
SH_INFO_1 info_1;
|
||||
SH_INFO_1_STR info_1_str;
|
||||
|
||||
} 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
|
||||
{
|
||||
SH_INFO_2 *ptrs;
|
||||
|
||||
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
|
||||
{
|
||||
SH_INFO_2 info_2;
|
||||
SH_INFO_2_STR info_2_str;
|
||||
|
||||
} SRV_SHARE_INFO_2;
|
||||
|
||||
typedef struct ptr_share_info501
|
||||
{
|
||||
uint32 ptr_netname; /* pointer to net name */
|
||||
uint32 type; /* ipc, print, disk */
|
||||
uint32 ptr_remark; /* pointer to comment */
|
||||
uint32 csc_policy; /* client-side offline caching policy << 4 */
|
||||
} SH_INFO_501;
|
||||
|
||||
typedef struct str_share_info501
|
||||
{
|
||||
UNISTR2 uni_netname; /* unicode string of net name */
|
||||
UNISTR2 uni_remark; /* unicode string of comment */
|
||||
} SH_INFO_501_STR;
|
||||
|
||||
/* SRV_SHARE_INFO_501 */
|
||||
typedef struct share_info_501_info
|
||||
{
|
||||
SH_INFO_501 info_501;
|
||||
SH_INFO_501_STR info_501_str;
|
||||
} SRV_SHARE_INFO_501;
|
||||
|
||||
/* SH_INFO_502 (pointers to level 502 share info strings) */
|
||||
typedef struct ptr_share_info502
|
||||
{
|
||||
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 */
|
||||
uint32 reserved; /* this holds the space taken by the sd in the rpc packet */
|
||||
uint32 reserved_offset; /* required for _post operation when marshalling */
|
||||
uint32 sd_size; /* size of security descriptor */
|
||||
uint32 ptr_sd; /* pointer to security descriptor */
|
||||
|
||||
} SH_INFO_502;
|
||||
|
||||
/* SH_INFO_502_STR (level 502 share info strings) */
|
||||
typedef struct str_share_info502
|
||||
{
|
||||
SH_INFO_502 *ptrs;
|
||||
|
||||
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) */
|
||||
|
||||
uint32 reserved;
|
||||
uint32 sd_size;
|
||||
SEC_DESC *sd;
|
||||
|
||||
} SH_INFO_502_STR;
|
||||
|
||||
/* SRV_SHARE_INFO_502 */
|
||||
typedef struct share_info_502_info
|
||||
{
|
||||
SH_INFO_502 info_502;
|
||||
SH_INFO_502_STR info_502_str;
|
||||
|
||||
} SRV_SHARE_INFO_502;
|
||||
|
||||
typedef struct ptr_share_info1004
|
||||
{
|
||||
uint32 ptr_remark;
|
||||
|
||||
} SH_INFO_1004;
|
||||
|
||||
typedef struct str_share_info1004
|
||||
{
|
||||
SH_INFO_1004 *ptrs;
|
||||
|
||||
UNISTR2 uni_remark;
|
||||
|
||||
} SH_INFO_1004_STR;
|
||||
|
||||
typedef struct ptr_info_1004_info
|
||||
{
|
||||
SH_INFO_1004 info_1004;
|
||||
SH_INFO_1004_STR info_1004_str;
|
||||
} SRV_SHARE_INFO_1004;
|
||||
|
||||
typedef struct share_info_1005_info
|
||||
{
|
||||
uint32 dfs_root_flag;
|
||||
} SRV_SHARE_INFO_1005;
|
||||
|
||||
typedef struct share_info_1006_info
|
||||
{
|
||||
uint32 max_uses;
|
||||
} SRV_SHARE_INFO_1006;
|
||||
|
||||
typedef struct ptr_share_info1007
|
||||
{
|
||||
uint32 flags;
|
||||
uint32 ptr_AlternateDirectoryName;
|
||||
|
||||
} SH_INFO_1007;
|
||||
|
||||
typedef struct str_share_info1007
|
||||
{
|
||||
SH_INFO_1007 *ptrs;
|
||||
|
||||
UNISTR2 uni_AlternateDirectoryName;
|
||||
|
||||
} SH_INFO_1007_STR;
|
||||
|
||||
typedef struct ptr_info_1007_info
|
||||
{
|
||||
SH_INFO_1007 info_1007;
|
||||
SH_INFO_1007_STR info_1007_str;
|
||||
} SRV_SHARE_INFO_1007;
|
||||
|
||||
/* SRV_SHARE_INFO_1501 */
|
||||
typedef struct share_info_1501_info
|
||||
{
|
||||
SEC_DESC_BUF *sdb;
|
||||
} SRV_SHARE_INFO_1501;
|
||||
|
||||
/* SRV_SHARE_INFO_CTR */
|
||||
typedef struct srv_share_info_ctr_info
|
||||
{
|
||||
uint32 info_level;
|
||||
uint32 switch_value;
|
||||
uint32 ptr_share_info;
|
||||
|
||||
uint32 num_entries;
|
||||
uint32 ptr_entries;
|
||||
uint32 num_entries2;
|
||||
|
||||
union {
|
||||
SRV_SHARE_INFO_0 *info0;
|
||||
SRV_SHARE_INFO_1 *info1; /* share info level 1 */
|
||||
SRV_SHARE_INFO_2 *info2; /* share info level 2 */
|
||||
SRV_SHARE_INFO_501 *info501; /* share info level 501 */
|
||||
SRV_SHARE_INFO_502 *info502; /* share info level 502 */
|
||||
SRV_SHARE_INFO_1004 *info1004;
|
||||
SRV_SHARE_INFO_1005 *info1005;
|
||||
SRV_SHARE_INFO_1006 *info1006;
|
||||
SRV_SHARE_INFO_1007 *info1007;
|
||||
SRV_SHARE_INFO_1501 *info1501;
|
||||
void *info;
|
||||
|
||||
} 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 */
|
||||
|
||||
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
|
||||
{
|
||||
SRV_SHARE_INFO_CTR ctr; /* share info container */
|
||||
|
||||
uint32 total_entries; /* total number of entries */
|
||||
ENUM_HND enum_hnd;
|
||||
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_SHARE_ENUM;
|
||||
|
||||
|
||||
/* SRV_Q_NET_SHARE_GET_INFO */
|
||||
typedef struct q_net_share_get_info_info
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
|
||||
UNISTR2 uni_share_name;
|
||||
uint32 info_level;
|
||||
|
||||
} SRV_Q_NET_SHARE_GET_INFO;
|
||||
|
||||
/* SRV_SHARE_INFO */
|
||||
typedef struct srv_share_info {
|
||||
uint32 switch_value;
|
||||
uint32 ptr_share_ctr;
|
||||
|
||||
union {
|
||||
SRV_SHARE_INFO_0 info0;
|
||||
SRV_SHARE_INFO_1 info1;
|
||||
SRV_SHARE_INFO_2 info2;
|
||||
SRV_SHARE_INFO_501 info501;
|
||||
SRV_SHARE_INFO_502 info502;
|
||||
SRV_SHARE_INFO_1004 info1004;
|
||||
SRV_SHARE_INFO_1005 info1005;
|
||||
SRV_SHARE_INFO_1006 info1006;
|
||||
SRV_SHARE_INFO_1007 info1007;
|
||||
SRV_SHARE_INFO_1501 info1501;
|
||||
} share;
|
||||
} SRV_SHARE_INFO;
|
||||
|
||||
/* SRV_R_NET_SHARE_GET_INFO */
|
||||
typedef struct r_net_share_get_info_info
|
||||
{
|
||||
SRV_SHARE_INFO info;
|
||||
WERROR status;
|
||||
|
||||
} SRV_R_NET_SHARE_GET_INFO;
|
||||
|
||||
/* SRV_Q_NET_SHARE_SET_INFO */
|
||||
typedef struct q_net_share_set_info_info
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
|
||||
UNISTR2 uni_share_name;
|
||||
uint32 info_level;
|
||||
|
||||
SRV_SHARE_INFO info;
|
||||
|
||||
uint32 ptr_parm_error;
|
||||
uint32 parm_error;
|
||||
|
||||
} SRV_Q_NET_SHARE_SET_INFO;
|
||||
|
||||
/* SRV_R_NET_SHARE_SET_INFO */
|
||||
typedef struct r_net_share_set_info
|
||||
{
|
||||
uint32 ptr_parm_error;
|
||||
uint32 parm_error;
|
||||
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_SHARE_SET_INFO;
|
||||
|
||||
/* SRV_Q_NET_SHARE_ADD */
|
||||
typedef struct q_net_share_add
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
|
||||
uint32 info_level;
|
||||
|
||||
SRV_SHARE_INFO info;
|
||||
|
||||
uint32 ptr_err_index; /* pointer to error index */
|
||||
uint32 err_index; /* index in info to field in error */
|
||||
|
||||
} SRV_Q_NET_SHARE_ADD;
|
||||
|
||||
/* SRV_R_NET_SHARE_ADD */
|
||||
typedef struct r_net_share_add
|
||||
{
|
||||
|
||||
uint32 ptr_parm_error;
|
||||
uint32 parm_error;
|
||||
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_SHARE_ADD;
|
||||
|
||||
/* SRV_Q_NET_SHARE_DEL */
|
||||
typedef struct q_net_share_del
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
UNISTR2 uni_share_name;
|
||||
uint32 reserved;
|
||||
|
||||
} SRV_Q_NET_SHARE_DEL;
|
||||
|
||||
/* SRV_R_NET_SHARE_DEL */
|
||||
typedef struct r_net_share_del
|
||||
{
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_SHARE_DEL;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* 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; /* file entry details */
|
||||
FILE_INFO_3_STR info_3_str; /* 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_info; /* pointer to file info union */
|
||||
|
||||
uint32 num_entries;
|
||||
uint32 ptr_entries;
|
||||
uint32 num_entries2;
|
||||
union
|
||||
{
|
||||
SRV_FILE_INFO_3 *info3;
|
||||
} 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 ptr_user_name; /* pointer (to user name) */
|
||||
UNISTR2 uni_user_name; /* user name */
|
||||
|
||||
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;
|
||||
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_FILE_ENUM;
|
||||
|
||||
/* SRV_Q_NET_FILE_CLOSE */
|
||||
typedef struct q_net_file_close
|
||||
{
|
||||
uint32 ptr_srv_name; /* pointer to server name */
|
||||
UNISTR2 uni_srv_name; /* server name */
|
||||
|
||||
uint32 file_id;
|
||||
} SRV_Q_NET_FILE_CLOSE;
|
||||
|
||||
/* SRV_R_NET_FILE_CLOSE */
|
||||
typedef struct r_net_file_close
|
||||
{
|
||||
WERROR status; /* return status */
|
||||
} SRV_R_NET_FILE_CLOSE;
|
||||
|
||||
/* SRV_INFO_100 */
|
||||
typedef struct srv_info_100_info
|
||||
{
|
||||
uint32 platform_id; /* 0x500 */
|
||||
uint32 ptr_name; /* pointer to server name */
|
||||
|
||||
UNISTR2 uni_name; /* server name "server" */
|
||||
|
||||
} SRV_INFO_100;
|
||||
|
||||
/* 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_INFO_100 sv100; /* server info level 100 */
|
||||
|
||||
} 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;
|
||||
|
||||
WERROR 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 */
|
||||
|
||||
WERROR 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;
|
||||
|
||||
WERROR status; /* return status */
|
||||
|
||||
} SRV_R_NET_REMOTE_TOD;
|
||||
|
||||
/* SRV_Q_NET_FILE_QUERY_SECDESC */
|
||||
typedef struct q_net_file_query_secdesc
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
uint32 ptr_qual_name;
|
||||
UNISTR2 uni_qual_name;
|
||||
UNISTR2 uni_file_name;
|
||||
uint32 unknown1;
|
||||
uint32 unknown2;
|
||||
uint32 unknown3;
|
||||
} SRV_Q_NET_FILE_QUERY_SECDESC;
|
||||
|
||||
/* SRV_R_NET_FILE_QUERY_SECDESC */
|
||||
typedef struct r_net_file_query_secdesc
|
||||
{
|
||||
uint32 ptr_response;
|
||||
uint32 size_response;
|
||||
uint32 ptr_secdesc;
|
||||
uint32 size_secdesc;
|
||||
SEC_DESC *sec_desc;
|
||||
WERROR status;
|
||||
} SRV_R_NET_FILE_QUERY_SECDESC;
|
||||
|
||||
/* SRV_Q_NET_FILE_SET_SECDESC */
|
||||
typedef struct q_net_file_set_secdesc
|
||||
{
|
||||
uint32 ptr_srv_name;
|
||||
UNISTR2 uni_srv_name;
|
||||
uint32 ptr_qual_name;
|
||||
UNISTR2 uni_qual_name;
|
||||
UNISTR2 uni_file_name;
|
||||
uint32 sec_info;
|
||||
uint32 size_set;
|
||||
uint32 ptr_secdesc;
|
||||
uint32 size_secdesc;
|
||||
SEC_DESC *sec_desc;
|
||||
} SRV_Q_NET_FILE_SET_SECDESC;
|
||||
|
||||
/* SRV_R_NET_FILE_SET_SECDESC */
|
||||
typedef struct r_net_file_set_secdesc
|
||||
{
|
||||
WERROR status;
|
||||
} SRV_R_NET_FILE_SET_SECDESC;
|
||||
|
||||
#endif /* _RPC_SRVSVC_H */
|
@ -1,72 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
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 */
|
||||
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} WKS_R_QUERY_INFO;
|
||||
|
||||
|
||||
#endif /* _RPC_WKS_H */
|
||||
|
@ -1257,7 +1257,6 @@ struct pwd_info
|
||||
#include "rpc_creds.h"
|
||||
#include "rpc_misc.h"
|
||||
#include "rpc_secdes.h"
|
||||
#include "nt_printing.h"
|
||||
|
||||
typedef struct user_struct
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user