summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/ntdomain.h335
-rw-r--r--source4/include/rpc_brs.h80
-rw-r--r--source4/include/rpc_dfs.h197
-rw-r--r--source4/include/rpc_ds.h91
-rw-r--r--source4/include/rpc_parse.h30
-rw-r--r--source4/include/rpc_reg.h644
-rw-r--r--source4/include/rpc_samr.h1867
-rwxr-xr-xsource4/include/rpc_spoolss.h2228
-rw-r--r--source4/include/rpc_srvsvc.h948
-rw-r--r--source4/include/rpc_wkssvc.h72
-rw-r--r--source4/include/smb.h1
11 files changed, 0 insertions, 6493 deletions
diff --git a/source4/include/ntdomain.h b/source4/include/ntdomain.h
index 62608b2d09..021ab115ab 100644
--- a/source4/include/ntdomain.h
+++ b/source4/include/ntdomain.h
@@ -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 */
diff --git a/source4/include/rpc_brs.h b/source4/include/rpc_brs.h
deleted file mode 100644
index cd0928d470..0000000000
--- a/source4/include/rpc_brs.h
+++ /dev/null
@@ -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 */
-
diff --git a/source4/include/rpc_dfs.h b/source4/include/rpc_dfs.h
deleted file mode 100644
index 39316a5d54..0000000000
--- a/source4/include/rpc_dfs.h
+++ /dev/null
@@ -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
diff --git a/source4/include/rpc_ds.h b/source4/include/rpc_ds.h
deleted file mode 100644
index c01d10554e..0000000000
--- a/source4/include/rpc_ds.h
+++ /dev/null
@@ -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 */
diff --git a/source4/include/rpc_parse.h b/source4/include/rpc_parse.h
deleted file mode 100644
index 73fbcb2b1b..0000000000
--- a/source4/include/rpc_parse.h
+++ /dev/null
@@ -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 */
diff --git a/source4/include/rpc_reg.h b/source4/include/rpc_reg.h
deleted file mode 100644
index 46ec88283d..0000000000
--- a/source4/include/rpc_reg.h
+++ /dev/null
@@ -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 */
-
diff --git a/source4/include/rpc_samr.h b/source4/include/rpc_samr.h
deleted file mode 100644
index e1fa9c06bc..0000000000
--- a/source4/include/rpc_samr.h
+++ /dev/null
@@ -1,1867 +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) Paul Ashton 1997-2000
- Copyright (C) Jean François Micouleau 1998-2001
- Copyright (C) Anthony Liguori 2002
- Copyright (C) Jim McDonough 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_SAMR_H /* _RPC_SAMR_H */
-#define _RPC_SAMR_H
-
-#include "rpc_misc.h"
-
-/*******************************************************************
- the following information comes from a QuickView on samsrv.dll,
- and gives an idea of exactly what is needed:
-
-x SamrAddMemberToAlias
-x SamrAddMemberToGroup
-SamrAddMultipleMembersToAlias
-x SamrChangePasswordUser
-x SamrCloseHandle
-x SamrConnect
-x SamrCreateAliasInDomain
-x SamrCreateGroupInDomain
-x SamrCreateUserInDomain
-? SamrDeleteAlias
-SamrDeleteGroup
-x SamrDeleteUser
-x SamrEnumerateAliasesInDomain
-SamrEnumerateDomainsInSamServer
-x SamrEnumerateGroupsInDomain
-x SamrEnumerateUsersInDomain
-SamrGetUserDomainPasswordInformation
-SamrLookupDomainInSamServer
-? SamrLookupIdsInDomain
-x SamrLookupNamesInDomain
-x SamrOpenAlias
-x SamrOpenDomain
-x SamrOpenGroup
-x SamrOpenUser
-x SamrQueryDisplayInformation
-x SamrQueryInformationAlias
-SamrQueryInformationDomain
-? SamrQueryInformationUser
-x SamrQuerySecurityObject
-SamrRemoveMemberFromAlias
-SamrRemoveMemberFromForiegnDomain
-SamrRemoveMemberFromGroup
-SamrRemoveMultipleMembersFromAlias
-x SamrSetInformationAlias
-SamrSetInformationDomain
-x SamrSetInformationGroup
-x SamrSetInformationUser
-SamrSetMemberAttributesOfGroup
-SamrSetSecurityObject
-SamrShutdownSamServer
-SamrTestPrivateFunctionsDomain
-SamrTestPrivateFunctionsUser
-
-********************************************************************/
-
-#define SAMR_CONNECT_ANON 0x00
-#define SAMR_CLOSE_HND 0x01
-#define SAMR_SET_SEC_OBJECT 0x02
-#define SAMR_QUERY_SEC_OBJECT 0x03
-
-#define SAMR_UNKNOWN_4 0x04 /* profile info? */
-#define SAMR_LOOKUP_DOMAIN 0x05
-#define SAMR_ENUM_DOMAINS 0x06
-#define SAMR_OPEN_DOMAIN 0x07
-#define SAMR_QUERY_DOMAIN_INFO 0x08
-#define SAMR_SET_DOMAIN_INFO 0x09
-
-#define SAMR_CREATE_DOM_GROUP 0x0a
-#define SAMR_ENUM_DOM_GROUPS 0x0b
-#define SAMR_ENUM_DOM_USERS 0x0d
-#define SAMR_CREATE_DOM_ALIAS 0x0e
-#define SAMR_ENUM_DOM_ALIASES 0x0f
-#define SAMR_QUERY_USERALIASES 0x10
-
-#define SAMR_LOOKUP_NAMES 0x11
-#define SAMR_LOOKUP_RIDS 0x12
-
-#define SAMR_OPEN_GROUP 0x13
-#define SAMR_QUERY_GROUPINFO 0x14
-#define SAMR_SET_GROUPINFO 0x15
-#define SAMR_ADD_GROUPMEM 0x16
-#define SAMR_DELETE_DOM_GROUP 0x17
-#define SAMR_DEL_GROUPMEM 0x18
-#define SAMR_QUERY_GROUPMEM 0x19
-#define SAMR_UNKNOWN_1A 0x1a
-
-#define SAMR_OPEN_ALIAS 0x1b
-#define SAMR_QUERY_ALIASINFO 0x1c
-#define SAMR_SET_ALIASINFO 0x1d
-#define SAMR_DELETE_DOM_ALIAS 0x1e
-#define SAMR_ADD_ALIASMEM 0x1f
-#define SAMR_DEL_ALIASMEM 0x20
-#define SAMR_QUERY_ALIASMEM 0x21
-
-#define SAMR_OPEN_USER 0x22
-#define SAMR_DELETE_DOM_USER 0x23
-#define SAMR_QUERY_USERINFO 0x24
-#define SAMR_SET_USERINFO2 0x25
-#define SAMR_QUERY_USERGROUPS 0x27
-
-#define SAMR_QUERY_DISPINFO 0x28
-#define SAMR_UNKNOWN_29 0x29
-#define SAMR_UNKNOWN_2a 0x2a
-#define SAMR_UNKNOWN_2b 0x2b
-#define SAMR_GET_USRDOM_PWINFO 0x2c
-#define SAMR_UNKNOWN_2D 0x2d
-#define SAMR_UNKNOWN_2E 0x2e /* looks like an alias for SAMR_QUERY_DOMAIN_INFO */
-#define SAMR_UNKNOWN_2f 0x2f
-#define SAMR_QUERY_DISPINFO3 0x30 /* Alias for SAMR_QUERY_DISPINFO
- with info level 3 */
-#define SAMR_UNKNOWN_31 0x31
-#define SAMR_CREATE_USER 0x32
-#define SAMR_QUERY_DISPINFO4 0x33 /* Alias for SAMR_QUERY_DISPINFO
- with info level 4 */
-#define SAMR_ADDMULTI_ALIASMEM 0x34
-
-#define SAMR_UNKNOWN_35 0x35
-#define SAMR_UNKNOWN_36 0x36
-#define SAMR_CHGPASSWD_USER 0x37
-#define SAMR_GET_DOM_PWINFO 0x38
-#define SAMR_CONNECT 0x39
-#define SAMR_SET_USERINFO 0x3A
-#define SAMR_CONNECT4 0x3E
-
-
-typedef struct _DISP_USER_INFO {
- SAM_ACCOUNT *sam;
-} DISP_USER_INFO;
-
-typedef struct _DISP_GROUP_INFO {
- DOMAIN_GRP *grp;
-} DISP_GROUP_INFO;
-
-
-typedef struct logon_hours_info
-{
- uint32 len; /* normally 21 bytes */
- uint8 hours[32];
-
-} LOGON_HRS;
-
-/* SAM_USER_INFO_23 */
-typedef struct sam_user_info_23
-{
- /* TIMES MAY NOT IN RIGHT ORDER!!!! */
- 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; /* NULL - user name unicode string header */
- UNIHDR hdr_full_name; /* user's full name unicode string header */
- UNIHDR hdr_home_dir; /* home directory unicode string header */
- UNIHDR hdr_dir_drive; /* home drive unicode string header */
- UNIHDR hdr_logon_script; /* logon script unicode string header */
- UNIHDR hdr_profile_path; /* profile path unicode string header */
- UNIHDR hdr_acct_desc ; /* user description */
- UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
- UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
- UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
-
- uint8 lm_pwd[16]; /* lm user passwords */
- uint8 nt_pwd[16]; /* nt user passwords */
-
- uint32 user_rid; /* Primary User ID */
- uint32 group_rid; /* Primary Group ID */
-
- uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
-
- uint32 unknown_3; /* 0x09f8 27fa */
-
- uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
- /* uint8 pad[2] */
- uint32 ptr_logon_hrs; /* pointer to logon hours */
-
- uint32 unknown_5; /* 0x0001 0000 */
-
- uint8 padding1[6];
-
- uint8 passmustchange; /* 0x00 must change = 0x01 */
-
- uint8 padding2;
-
- uint8 pass[516];
-
- UNISTR2 uni_user_name; /* NULL - username unicode string */
- UNISTR2 uni_full_name; /* user's full name unicode string */
- UNISTR2 uni_home_dir; /* home directory unicode string */
- UNISTR2 uni_dir_drive; /* home directory drive unicode string */
- UNISTR2 uni_logon_script; /* logon script unicode string */
- UNISTR2 uni_profile_path; /* profile path unicode string */
- UNISTR2 uni_acct_desc ; /* user description unicode string */
- UNISTR2 uni_workstations; /* login from workstations unicode string */
- UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
- UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
-
- uint32 unknown_6; /* 0x0000 04ec */
- uint32 padding4;
-
- LOGON_HRS logon_hrs;
-
-} SAM_USER_INFO_23;
-
-/* SAM_USER_INFO_24 */
-typedef struct sam_user_info_24
-{
- uint8 pass[516];
- uint16 pw_len;
-} SAM_USER_INFO_24;
-
-/*
- * NB. This structure is *definately* incorrect. It's my best guess
- * currently for W2K SP2. The password field is encrypted in a different
- * way than normal... And there are definately other problems. JRA.
- */
-
-/* SAM_USER_INFO_25 */
-typedef struct sam_user_info_25
-{
- /* TIMES MAY NOT IN RIGHT ORDER!!!! */
- 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; /* NULL - user name unicode string header */
- UNIHDR hdr_full_name; /* user's full name unicode string header */
- UNIHDR hdr_home_dir; /* home directory unicode string header */
- UNIHDR hdr_dir_drive; /* home drive unicode string header */
- UNIHDR hdr_logon_script; /* logon script unicode string header */
- UNIHDR hdr_profile_path; /* profile path unicode string header */
- UNIHDR hdr_acct_desc ; /* user description */
- UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
- UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
- UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
-
- uint8 lm_pwd[16]; /* lm user passwords */
- uint8 nt_pwd[16]; /* nt user passwords */
-
- uint32 user_rid; /* Primary User ID */
- uint32 group_rid; /* Primary Group ID */
-
- uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
-
- uint32 unknown_6[6];
-
- uint8 pass[532];
-
- UNISTR2 uni_user_name; /* NULL - username unicode string */
- UNISTR2 uni_full_name; /* user's full name unicode string */
- UNISTR2 uni_home_dir; /* home directory unicode string */
- UNISTR2 uni_dir_drive; /* home directory drive unicode string */
- UNISTR2 uni_logon_script; /* logon script unicode string */
- UNISTR2 uni_profile_path; /* profile path unicode string */
- UNISTR2 uni_acct_desc ; /* user description unicode string */
- UNISTR2 uni_workstations; /* login from workstations unicode string */
- UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
- UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
-} SAM_USER_INFO_25;
-
-
-/* SAM_USER_INFO_21 */
-typedef struct sam_user_info_21
-{
- 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_home_dir; /* home directory unicode string header */
- UNIHDR hdr_dir_drive; /* home drive unicode string header */
- UNIHDR hdr_logon_script; /* logon script unicode string header */
- UNIHDR hdr_profile_path; /* profile path unicode string header */
- UNIHDR hdr_acct_desc ; /* user description */
- UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
- UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
- UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
-
- uint8 lm_pwd[16]; /* lm user passwords */
- uint8 nt_pwd[16]; /* nt user passwords */
-
- uint32 user_rid; /* Primary User ID */
- uint32 group_rid; /* Primary Group ID */
-
- uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
-
- uint32 unknown_3; /* 0x00ff ffff */
-
- uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
- /* uint8 pad[2] */
- uint32 ptr_logon_hrs; /* unknown pointer */
-
- uint32 unknown_5; /* 0x0002 0000 */
-
- uint8 padding1[6];
-
- uint8 passmustchange; /* 0x00 must change = 0x01 */
-
- uint8 padding2;
-
- UNISTR2 uni_user_name; /* username unicode string */
- UNISTR2 uni_full_name; /* user's full name unicode string */
- UNISTR2 uni_home_dir; /* home directory unicode string */
- UNISTR2 uni_dir_drive; /* home directory drive unicode string */
- UNISTR2 uni_logon_script; /* logon script unicode string */
- UNISTR2 uni_profile_path; /* profile path unicode string */
- UNISTR2 uni_acct_desc ; /* user description unicode string */
- UNISTR2 uni_workstations; /* login from workstations unicode string */
- UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
- UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
-
- uint32 unknown_6; /* 0x0000 04ec */
- uint32 padding4;
-
- LOGON_HRS logon_hrs;
-
-} SAM_USER_INFO_21;
-
-#define PASS_MUST_CHANGE_AT_NEXT_LOGON 0x01
-#define PASS_DONT_CHANGE_AT_NEXT_LOGON 0x00
-
-/* SAM_USER_INFO_20 */
-typedef struct sam_user_info_20
-{
- UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
-
- UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
-
-} SAM_USER_INFO_20;
-
-/* SAM_USER_INFO_12 */
-typedef struct sam_user_info_12
-{
- uint8 lm_pwd[16]; /* lm user passwords */
- uint8 nt_pwd[16]; /* nt user passwords */
-
- uint8 lm_pwd_active;
- uint8 nt_pwd_active;
-
-} SAM_USER_INFO_12;
-
-/* SAM_USER_INFO_11 */
-typedef struct sam_user_info_11
-{
- uint8 padding_0[16]; /* 0 - padding 16 bytes */
- NTTIME expiry; /* expiry time or something? */
- uint8 padding_1[24]; /* 0 - padding 24 bytes */
-
- UNIHDR hdr_mach_acct; /* unicode header for machine account */
- uint32 padding_2; /* 0 - padding 4 bytes */
-
- uint32 ptr_1; /* pointer */
- uint8 padding_3[32]; /* 0 - padding 32 bytes */
- uint32 padding_4; /* 0 - padding 4 bytes */
-
- uint32 ptr_2; /* pointer */
- uint32 padding_5; /* 0 - padding 4 bytes */
-
- uint32 ptr_3; /* pointer */
- uint8 padding_6[32]; /* 0 - padding 32 bytes */
-
- uint32 rid_user; /* user RID */
- uint32 rid_group; /* group RID */
-
- uint16 acct_ctrl; /* 0080 - ACB_XXXX */
- uint16 unknown_3; /* 16 bit padding */
-
- uint16 unknown_4; /* 0x003f - 16 bit unknown */
- uint16 unknown_5; /* 0x003c - 16 bit unknown */
-
- uint8 padding_7[16]; /* 0 - padding 16 bytes */
- uint32 padding_8; /* 0 - padding 4 bytes */
-
- UNISTR2 uni_mach_acct; /* unicode string for machine account */
-
- uint8 padding_9[48]; /* 0 - padding 48 bytes */
-
-} SAM_USER_INFO_11;
-
-
-/* SAM_USER_INFO_10 */
-typedef struct sam_user_info_10
-{
- uint32 acb_info;
-
-} SAM_USER_INFO_10;
-
-
-
-/* SAMR_Q_CLOSE_HND - probably a policy handle close */
-typedef struct q_samr_close_hnd_info
-{
- POLICY_HND pol; /* policy handle */
-
-} SAMR_Q_CLOSE_HND;
-
-
-/* SAMR_R_CLOSE_HND - probably a policy handle close */
-typedef struct r_samr_close_hnd_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_CLOSE_HND;
-
-
-/****************************************************************************
-SAMR_Q_GET_USRDOM_PWINFO - a "set user info" occurs just after this
-*****************************************************************************/
-
-/* SAMR_Q_GET_USRDOM_PWINFO */
-typedef struct q_samr_usrdom_pwinfo_info
-{
- POLICY_HND user_pol; /* policy handle */
-
-} SAMR_Q_GET_USRDOM_PWINFO;
-
-
-/****************************************************************************
-SAMR_R_GET_USRDOM_PWINFO - a "set user info" occurs just after this
-*****************************************************************************/
-
-/* SAMR_R_GET_USRDOM_PWINFO */
-typedef struct r_samr_usrdom_pwinfo_info
-{
- uint16 unknown_0; /* 0000 */
- uint16 unknown_1; /* 0x0016 or 0x0015 */
- uint32 unknown_2; /* 0x0000 0000 */
- NTSTATUS status;
-
-} SAMR_R_GET_USRDOM_PWINFO;
-
-/****************************************************************************
-SAMR_Q_SET_SEC_OBJ - info level 4.
-*****************************************************************************/
-
-/* SAMR_Q_SET_SEC_OBJ - */
-typedef struct q_samr_set_sec_obj_info
-{
- POLICY_HND pol; /* policy handle */
- uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
- SEC_DESC_BUF *buf;
-
-} SAMR_Q_SET_SEC_OBJ;
-
-/* SAMR_R_SET_SEC_OBJ - */
-typedef struct r_samr_set_sec_obj_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_SET_SEC_OBJ;
-
-
-/****************************************************************************
-SAMR_Q_QUERY_SEC_OBJ - info level 4. returns SIDs.
-*****************************************************************************/
-
-/* SAMR_Q_QUERY_SEC_OBJ - probably get domain info... */
-typedef struct q_samr_query_sec_obj_info
-{
- POLICY_HND user_pol; /* policy handle */
- uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
-
-} SAMR_Q_QUERY_SEC_OBJ;
-
-/* SAMR_R_QUERY_SEC_OBJ - probably an open */
-typedef struct r_samr_query_sec_obj_info
-{
- uint32 ptr;
- SEC_DESC_BUF *buf;
-
- NTSTATUS status; /* return status */
-
-} SAMR_R_QUERY_SEC_OBJ;
-
-
-/****************************************************************************
-SAMR_Q_QUERY_DOMAIN_INFO - probably a query on domain group info.
-*****************************************************************************/
-
-/* SAMR_Q_QUERY_DOMAIN_INFO - */
-typedef struct q_samr_query_domain_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint16 switch_value; /* 0x0002, 0x0001 */
-
-} SAMR_Q_QUERY_DOMAIN_INFO;
-
-typedef struct sam_unknown_info_3_info
-{
- NTTIME logout;
- /* 0x8000 0000 */ /* DON'T forcibly disconnect remote users from server when logon hours expire*/
-
- /* 0x0000 0000 */ /* forcibly disconnect remote users from server when logon hours expire*/
-
-} SAM_UNK_INFO_3;
-
-typedef struct sam_unknown_info_6_info
-{
- uint32 unknown_0; /* 0x0000 0000 */
-
- uint32 ptr_0; /* pointer to unknown structure */
- uint8 padding[12]; /* 12 bytes zeros */
-
-} SAM_UNK_INFO_6;
-
-typedef struct sam_unknown_info_7_info
-{
- uint16 unknown_0; /* 0x0003 */
-
-} SAM_UNK_INFO_7;
-
-typedef struct sam_unknown_info_12_inf
-{
- NTTIME duration;
- NTTIME reset_count;
- uint16 bad_attempt_lockout;
-
-} SAM_UNK_INFO_12;
-
-typedef struct sam_unknown_info_5_inf
-{
- UNIHDR hdr_server; /* server name unicode header */
- UNISTR2 uni_server; /* server name unicode string */
-
-} SAM_UNK_INFO_5;
-
-typedef struct sam_unknown_info_2_inf
-{
- uint32 unknown_0; /* 0x0000 0000 */
- uint32 unknown_1; /* 0x8000 0000 */
- uint32 unknown_2; /* 0x0000 0000 */
-
- uint32 ptr_0; /* pointer to unknown structure */
- UNIHDR hdr_domain; /* domain name unicode header */
- UNIHDR hdr_server; /* server name unicode header */
-
- /* put all the data in here, at the moment, including what the above
- pointer is referring to
- */
-
- uint32 seq_num; /* some sort of incrementing sequence number? */
- uint32 unknown_3; /* 0x0000 0000 */
-
- uint32 unknown_4; /* 0x0000 0001 */
- uint32 unknown_5; /* 0x0000 0003 */
- uint32 unknown_6; /* 0x0000 0001 */
- uint32 num_domain_usrs; /* number of users in domain */
- uint32 num_domain_grps; /* number of domain groups in domain */
- uint32 num_local_grps; /* number of local groups in domain */
-
- uint8 padding[12]; /* 12 bytes zeros */
-
- UNISTR2 uni_domain; /* domain name unicode string */
- UNISTR2 uni_server; /* server name unicode string */
-
-} SAM_UNK_INFO_2;
-
-typedef struct sam_unknown_info_1_inf
-{
- uint16 min_length_password;
- uint16 password_history;
- uint32 flag;
- NTTIME expire;
- NTTIME min_passwordage;
-
-} SAM_UNK_INFO_1;
-
-
-typedef struct sam_unknown_ctr_info
-{
- union
- {
- SAM_UNK_INFO_1 inf1;
- SAM_UNK_INFO_2 inf2;
- SAM_UNK_INFO_3 inf3;
- SAM_UNK_INFO_5 inf5;
- SAM_UNK_INFO_6 inf6;
- SAM_UNK_INFO_7 inf7;
- SAM_UNK_INFO_12 inf12;
-
- } info;
-
-} SAM_UNK_CTR;
-
-
-/* SAMR_R_QUERY_DOMAIN_INFO - */
-typedef struct r_samr_query_domain_info
-{
- uint32 ptr_0;
- uint16 switch_value; /* same as in query */
-
- SAM_UNK_CTR *ctr;
-
- NTSTATUS status; /* return status */
-
-} SAMR_R_QUERY_DOMAIN_INFO;
-
-
-/* SAMR_Q_LOOKUP_DOMAIN - obtain SID for a local domain */
-typedef struct q_samr_lookup_domain_info
-{
- POLICY_HND connect_pol;
-
- UNIHDR hdr_domain;
- UNISTR2 uni_domain;
-
-} SAMR_Q_LOOKUP_DOMAIN;
-
-
-/* SAMR_R_LOOKUP_DOMAIN */
-typedef struct r_samr_lookup_domain_info
-{
- uint32 ptr_sid;
- DOM_SID2 dom_sid;
-
- NTSTATUS status;
-
-} SAMR_R_LOOKUP_DOMAIN;
-
-
-/****************************************************************************
-SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
-
-0x0000 03f1 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
-0x0000 0200 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
-*****************************************************************************/
-
-/* SAMR_Q_OPEN_DOMAIN */
-typedef struct q_samr_open_domain_info
-{
- POLICY_HND pol; /* policy handle */
- uint32 flags; /* 0x2000 0000; 0x0000 0211; 0x0000 0280; 0x0000 0200 - flags? */
- DOM_SID2 dom_sid; /* domain SID */
-
-} SAMR_Q_OPEN_DOMAIN;
-
-
-/* SAMR_R_OPEN_DOMAIN - probably an open */
-typedef struct r_samr_open_domain_info
-{
- POLICY_HND domain_pol; /* policy handle associated with the SID */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_DOMAIN;
-
-#define MAX_SAM_ENTRIES_W2K 0x400
-#define MAX_SAM_ENTRIES_W95 50
-/* The following should be the greater of the preceeding two. */
-#define MAX_SAM_ENTRIES MAX_SAM_ENTRIES_W2K
-
-typedef struct samr_entry_info
-{
- uint32 rid;
- UNIHDR hdr_name;
-
-} SAM_ENTRY;
-
-
-/* SAMR_Q_ENUM_DOMAINS - SAM rids and names */
-typedef struct q_samr_enum_domains_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 start_idx; /* enumeration handle */
- uint32 max_size; /* 0x0000 ffff */
-
-} SAMR_Q_ENUM_DOMAINS;
-
-/* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
-typedef struct r_samr_enum_domains_info
-{
- uint32 next_idx; /* next starting index required for enum */
- uint32 ptr_entries1;
-
- uint32 num_entries2;
- uint32 ptr_entries2;
-
- uint32 num_entries3;
-
- SAM_ENTRY *sam;
- UNISTR2 *uni_dom_name;
-
- uint32 num_entries4;
-
- NTSTATUS status;
-
-} SAMR_R_ENUM_DOMAINS;
-
-/* SAMR_Q_ENUM_DOM_USERS - SAM rids and names */
-typedef struct q_samr_enum_dom_users_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 start_idx; /* number of values (0 indicates unlimited?) */
- uint16 acb_mask; /* 0x0000 indicates all */
- uint16 unknown_1; /* 0x0000 */
-
- uint32 max_size; /* 0x0000 ffff */
-
-} SAMR_Q_ENUM_DOM_USERS;
-
-
-/* SAMR_R_ENUM_DOM_USERS - SAM rids and names */
-typedef struct r_samr_enum_dom_users_info
-{
- uint32 next_idx; /* next starting index required for enum */
- uint32 ptr_entries1;
-
- uint32 num_entries2;
- uint32 ptr_entries2;
-
- uint32 num_entries3;
-
- SAM_ENTRY *sam;
- UNISTR2 *uni_acct_name;
-
- uint32 num_entries4;
-
- NTSTATUS status;
-
-} SAMR_R_ENUM_DOM_USERS;
-
-
-/* SAMR_Q_ENUM_DOM_GROUPS - SAM rids and names */
-typedef struct q_samr_enum_dom_groups_info
-{
- POLICY_HND pol; /* policy handle */
-
- /* this is possibly an enumeration context handle... */
- uint32 start_idx; /* 0x0000 0000 */
-
- uint32 max_size; /* 0x0000 ffff */
-
-} SAMR_Q_ENUM_DOM_GROUPS;
-
-
-/* SAMR_R_ENUM_DOM_GROUPS - SAM rids and names */
-typedef struct r_samr_enum_dom_groups_info
-{
- uint32 next_idx;
- uint32 ptr_entries1;
-
- uint32 num_entries2;
- uint32 ptr_entries2;
-
- uint32 num_entries3;
-
- SAM_ENTRY *sam;
- UNISTR2 *uni_grp_name;
-
- uint32 num_entries4;
-
- NTSTATUS status;
-
-} SAMR_R_ENUM_DOM_GROUPS;
-
-
-/* SAMR_Q_ENUM_DOM_ALIASES - SAM rids and names */
-typedef struct q_samr_enum_dom_aliases_info
-{
- POLICY_HND pol; /* policy handle */
-
- /* this is possibly an enumeration context handle... */
- uint32 start_idx; /* 0x0000 0000 */
-
- uint32 max_size; /* 0x0000 ffff */
-
-} SAMR_Q_ENUM_DOM_ALIASES;
-
-
-/* SAMR_R_ENUM_DOM_ALIASES - SAM rids and names */
-typedef struct r_samr_enum_dom_aliases_info
-{
- uint32 next_idx;
- uint32 ptr_entries1;
-
- uint32 num_entries2;
- uint32 ptr_entries2;
-
- uint32 num_entries3;
-
- SAM_ENTRY *sam;
- UNISTR2 *uni_grp_name;
-
- uint32 num_entries4;
-
- NTSTATUS status;
-
-} SAMR_R_ENUM_DOM_ALIASES;
-
-
-/* -- Level 1 Display Info - User Information -- */
-
-typedef struct samr_entry_info1
-{
- uint32 user_idx;
-
- uint32 rid_user;
- uint16 acb_info;
-
- UNIHDR hdr_acct_name;
- UNIHDR hdr_user_name;
- UNIHDR hdr_user_desc;
-
-} SAM_ENTRY1;
-
-typedef struct samr_str_entry_info1
-{
- UNISTR2 uni_acct_name;
- UNISTR2 uni_full_name;
- UNISTR2 uni_acct_desc;
-
-} SAM_STR1;
-
-typedef struct sam_entry_info_1
-{
- SAM_ENTRY1 *sam;
- SAM_STR1 *str;
-
-} SAM_DISPINFO_1;
-
-
-/* -- Level 2 Display Info - Trust Account Information -- */
-
-typedef struct samr_entry_info2
-{
- uint32 user_idx;
-
- uint32 rid_user;
- uint16 acb_info;
-
- UNIHDR hdr_srv_name;
- UNIHDR hdr_srv_desc;
-
-} SAM_ENTRY2;
-
-typedef struct samr_str_entry_info2
-{
- UNISTR2 uni_srv_name;
- UNISTR2 uni_srv_desc;
-
-} SAM_STR2;
-
-typedef struct sam_entry_info_2
-{
- SAM_ENTRY2 *sam;
- SAM_STR2 *str;
-
-} SAM_DISPINFO_2;
-
-
-/* -- Level 3 Display Info - Domain Group Information -- */
-
-typedef struct samr_entry_info3
-{
- uint32 grp_idx;
-
- uint32 rid_grp;
- uint32 attr; /* SE_GROUP_xxx, usually 7 */
-
- UNIHDR hdr_grp_name;
- UNIHDR hdr_grp_desc;
-
-} SAM_ENTRY3;
-
-typedef struct samr_str_entry_info3
-{
- UNISTR2 uni_grp_name;
- UNISTR2 uni_grp_desc;
-
-} SAM_STR3;
-
-typedef struct sam_entry_info_3
-{
- SAM_ENTRY3 *sam;
- SAM_STR3 *str;
-
-} SAM_DISPINFO_3;
-
-
-/* -- Level 4 Display Info - User List (ASCII) -- */
-
-typedef struct samr_entry_info4
-{
- uint32 user_idx;
- STRHDR hdr_acct_name;
-
-} SAM_ENTRY4;
-
-typedef struct samr_str_entry_info4
-{
- STRING2 acct_name;
-
-} SAM_STR4;
-
-typedef struct sam_entry_info_4
-{
- SAM_ENTRY4 *sam;
- SAM_STR4 *str;
-
-} SAM_DISPINFO_4;
-
-
-/* -- Level 5 Display Info - Group List (ASCII) -- */
-
-typedef struct samr_entry_info5
-{
- uint32 grp_idx;
- STRHDR hdr_grp_name;
-
-} SAM_ENTRY5;
-
-typedef struct samr_str_entry_info5
-{
- STRING2 grp_name;
-
-} SAM_STR5;
-
-typedef struct sam_entry_info_5
-{
- SAM_ENTRY5 *sam;
- SAM_STR5 *str;
-
-} SAM_DISPINFO_5;
-
-
-typedef struct sam_dispinfo_ctr_info
-{
- union
- {
- SAM_DISPINFO_1 *info1; /* users/names/descriptions */
- SAM_DISPINFO_2 *info2; /* trust accounts */
- SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
- SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
- SAM_DISPINFO_5 *info5; /* group list (ASCII) */
- void *info; /* allows assignment without typecasting, */
-
- } sam;
-
-} SAM_DISPINFO_CTR;
-
-
-/* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
-typedef struct q_samr_query_disp_info
-{
- POLICY_HND domain_pol;
-
- uint16 switch_level; /* see SAM_DISPINFO_CTR above */
- /* align */
-
- uint32 start_idx; /* start enumeration index */
- uint32 max_entries; /* maximum number of entries to return */
- uint32 max_size; /* recommended data size; if exceeded server
- should return STATUS_MORE_ENTRIES */
-
-} SAMR_Q_QUERY_DISPINFO;
-
-
-/* SAMR_R_QUERY_DISPINFO */
-typedef struct r_samr_query_dispinfo_info
-{
- uint32 total_size; /* total data size for all matching entries
- (0 = uncalculated) */
- uint32 data_size; /* actual data size returned = size of SAM_ENTRY
- structures + total length of strings */
-
- uint16 switch_level; /* see SAM_DISPINFO_CTR above */
- /* align */
-
- uint32 num_entries; /* number of entries returned */
- uint32 ptr_entries;
- uint32 num_entries2;
-
- SAM_DISPINFO_CTR *ctr;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_DISPINFO;
-
-
-/* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
-typedef struct q_samr_delete_dom_group_info
-{
- POLICY_HND group_pol; /* policy handle */
-
-} SAMR_Q_DELETE_DOM_GROUP;
-
-
-/* SAMR_R_DELETE_DOM_GROUP - delete domain group */
-typedef struct r_samr_delete_dom_group_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_DELETE_DOM_GROUP;
-
-
-/* SAMR_Q_CREATE_DOM_GROUP - SAM create group */
-typedef struct q_samr_create_dom_group_info
-{
- POLICY_HND pol; /* policy handle */
-
- UNIHDR hdr_acct_desc;
- UNISTR2 uni_acct_desc;
-
- uint32 access_mask;
-
-} SAMR_Q_CREATE_DOM_GROUP;
-
-/* SAMR_R_CREATE_DOM_GROUP - SAM create group */
-typedef struct r_samr_create_dom_group_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 rid;
- NTSTATUS status;
-
-} SAMR_R_CREATE_DOM_GROUP;
-
-/* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
-typedef struct q_samr_query_group_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint16 switch_level; /* 0x0001 seen */
-
-} SAMR_Q_QUERY_GROUPINFO;
-
-typedef struct samr_group_info1
-{
- UNIHDR hdr_acct_name;
-
- uint32 unknown_1; /* 0x0000 0003 - number of group members? */
- uint32 num_members; /* 0x0000 0001 - number of group members? */
-
- UNIHDR hdr_acct_desc;
-
- UNISTR2 uni_acct_name;
- UNISTR2 uni_acct_desc;
-
-} GROUP_INFO1;
-
-typedef struct samr_group_info3
-{
- uint32 unknown_1; /* 0x0000 0003 - number of group members? */
-
-} GROUP_INFO3;
-
-typedef struct samr_group_info4
-{
- UNIHDR hdr_acct_desc;
- UNISTR2 uni_acct_desc;
-
-} GROUP_INFO4;
-
-/* GROUP_INFO_CTR */
-typedef struct group_info_ctr
-{
- uint16 switch_value1;
-
- union
- {
- GROUP_INFO1 info1;
- GROUP_INFO3 info3;
- GROUP_INFO4 info4;
-
- } group;
-
-} GROUP_INFO_CTR;
-
-/* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
-typedef struct r_samr_query_groupinfo_info
-{
- uint32 ptr;
- GROUP_INFO_CTR *ctr;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_GROUPINFO;
-
-
-/* SAMR_Q_SET_GROUPINFO - SAM Group Info */
-typedef struct q_samr_set_group_info
-{
- POLICY_HND pol; /* policy handle */
- GROUP_INFO_CTR *ctr;
-
-} SAMR_Q_SET_GROUPINFO;
-
-/* SAMR_R_SET_GROUPINFO - SAM Group Info */
-typedef struct r_samr_set_group_info
-{
- NTSTATUS status;
-
-} SAMR_R_SET_GROUPINFO;
-
-
-/* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
-typedef struct q_samr_delete_dom_alias_info
-{
- POLICY_HND alias_pol; /* policy handle */
-
-} SAMR_Q_DELETE_DOM_ALIAS;
-
-
-/* SAMR_R_DELETE_DOM_ALIAS - delete domain alias */
-typedef struct r_samr_delete_dom_alias_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_DELETE_DOM_ALIAS;
-
-
-/* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
-typedef struct q_samr_create_dom_alias_info
-{
- POLICY_HND dom_pol; /* policy handle */
-
- UNIHDR hdr_acct_desc;
- UNISTR2 uni_acct_desc;
-
- uint32 access_mask; /* 0x001f000f */
-
-} SAMR_Q_CREATE_DOM_ALIAS;
-
-/* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
-typedef struct r_samr_create_dom_alias_info
-{
- POLICY_HND alias_pol; /* policy handle */
-
- uint32 rid;
- NTSTATUS status;
-
-} SAMR_R_CREATE_DOM_ALIAS;
-
-/* SAMR_Q_QUERY_ALIASINFO - SAM Alias Info */
-typedef struct q_samr_query_alias_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint16 switch_level; /* 0x0003 seen */
-
-} SAMR_Q_QUERY_ALIASINFO;
-
-typedef struct samr_alias_info1
-{
- UNIHDR hdr_acct_name;
- UNIHDR hdr_acct_desc;
- uint32 num_member;
- UNISTR2 uni_acct_name;
- UNISTR2 uni_acct_desc;
-
-} ALIAS_INFO1;
-
-typedef struct samr_alias_info3
-{
- UNIHDR hdr_acct_desc;
- UNISTR2 uni_acct_desc;
-
-} ALIAS_INFO3;
-
-/* ALIAS_INFO_CTR */
-typedef struct alias_info_ctr
-{
- uint16 switch_value1;
- uint16 switch_value2;
-
- union
- {
- ALIAS_INFO1 info1;
- ALIAS_INFO3 info3;
-
- } alias;
-
-} ALIAS_INFO_CTR;
-
-/* SAMR_R_QUERY_ALIASINFO - SAM alias info */
-typedef struct r_samr_query_aliasinfo_info
-{
- uint32 ptr;
- ALIAS_INFO_CTR ctr;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_ALIASINFO;
-
-
-/* SAMR_Q_SET_ALIASINFO - SAM Alias Info */
-typedef struct q_samr_set_alias_info
-{
- POLICY_HND alias_pol; /* policy handle */
- ALIAS_INFO_CTR ctr;
-
-} SAMR_Q_SET_ALIASINFO;
-
-/* SAMR_R_SET_ALIASINFO - SAM alias info */
-typedef struct r_samr_set_aliasinfo_info
-{
- NTSTATUS status;
-
-} SAMR_R_SET_ALIASINFO;
-
-
-/* SAMR_Q_QUERY_USERGROUPS - */
-typedef struct q_samr_query_usergroup_info
-{
- POLICY_HND pol; /* policy handle associated with unknown id */
-
-} SAMR_Q_QUERY_USERGROUPS;
-
-/* SAMR_R_QUERY_USERGROUPS - probably a get sam info */
-typedef struct r_samr_query_usergroup_info
-{
- uint32 ptr_0; /* pointer */
- uint32 num_entries; /* number of RID groups */
- uint32 ptr_1; /* pointer */
- uint32 num_entries2; /* number of RID groups */
-
- DOM_GID *gid; /* group info */
-
- NTSTATUS status; /* return status */
-
-} SAMR_R_QUERY_USERGROUPS;
-
-/* SAM_USERINFO_CTR - sam user info */
-typedef struct sam_userinfo_ctr_info
-{
- uint16 switch_value;
-
- union
- {
- SAM_USER_INFO_10 *id10; /* auth-level 0x10 */
- SAM_USER_INFO_11 *id11; /* auth-level 0x11 */
- SAM_USER_INFO_12 *id12; /* auth-level 0x12 */
- SAM_USER_INFO_20 *id20; /* auth-level 20 */
- SAM_USER_INFO_21 *id21; /* auth-level 21 */
- SAM_USER_INFO_23 *id23; /* auth-level 0x17 */
- SAM_USER_INFO_24 *id24; /* auth-level 0x18 */
- SAM_USER_INFO_25 *id25; /* auth-level 0x19 */
- void* id; /* to make typecasting easy */
-
- } info;
-
-} SAM_USERINFO_CTR;
-
-
-/* SAMR_Q_SET_USERINFO2 - set sam info */
-typedef struct q_samr_set_user_info2
-{
- POLICY_HND pol; /* policy handle associated with user */
- uint16 switch_value; /* 0x0010 */
-
- SAM_USERINFO_CTR *ctr;
-
-} SAMR_Q_SET_USERINFO2;
-
-/* SAMR_R_SET_USERINFO2 - set sam info */
-typedef struct r_samr_set_user_info2
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_SET_USERINFO2;
-
-/* SAMR_Q_SET_USERINFO - set sam info */
-typedef struct q_samr_set_user_info
-{
- POLICY_HND pol; /* policy handle associated with user */
- uint16 switch_value;
- SAM_USERINFO_CTR *ctr;
-
-} SAMR_Q_SET_USERINFO;
-
-/* SAMR_R_SET_USERINFO - set sam info */
-typedef struct r_samr_set_user_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_SET_USERINFO;
-
-
-/* SAMR_Q_QUERY_USERINFO - probably a get sam info */
-typedef struct q_samr_query_user_info
-{
- POLICY_HND pol; /* policy handle associated with unknown id */
- uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
-
-} SAMR_Q_QUERY_USERINFO;
-
-/* SAMR_R_QUERY_USERINFO - probably a get sam info */
-typedef struct r_samr_query_user_info
-{
- uint32 ptr; /* pointer */
- SAM_USERINFO_CTR *ctr;
-
- NTSTATUS status; /* return status */
-
-} SAMR_R_QUERY_USERINFO;
-
-
-/****************************************************************************
-SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
-
-the policy handle allocated by an "samr open secret" call is associated
-with a SID. this policy handle is what is queried here, *not* the SID
-itself. the response to the lookup rids is relative to this SID.
-*****************************************************************************/
-/* SAMR_Q_QUERY_USERALIASES */
-typedef struct q_samr_query_useraliases_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 num_sids1; /* number of rids being looked up */
- uint32 ptr; /* buffer pointer */
- uint32 num_sids2; /* number of rids being looked up */
-
- uint32 *ptr_sid; /* pointers to sids to be looked up */
- DOM_SID2 *sid ; /* sids to be looked up. */
-
-} SAMR_Q_QUERY_USERALIASES;
-
-
-/* SAMR_R_QUERY_USERALIASES */
-typedef struct r_samr_query_useraliases_info
-{
- uint32 num_entries;
- uint32 ptr; /* undocumented buffer pointer */
-
- uint32 num_entries2;
- uint32 *rid; /* domain RIDs being looked up */
-
- NTSTATUS status; /* return code */
-
-} SAMR_R_QUERY_USERALIASES;
-
-
-/****************************************************************************
-SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
-*****************************************************************************/
-/* SAMR_Q_LOOKUP_NAMES */
-typedef struct q_samr_lookup_names_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 num_names1; /* number of names being looked up */
- uint32 flags; /* 0x0000 03e8 - unknown */
- uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
- uint32 num_names2; /* number of names being looked up */
-
- UNIHDR *hdr_name; /* unicode account name header */
- UNISTR2 *uni_name; /* unicode account name string */
-
-} SAMR_Q_LOOKUP_NAMES;
-
-
-/* SAMR_R_LOOKUP_NAMES */
-typedef struct r_samr_lookup_names_info
-{
- uint32 num_rids1; /* number of aliases being looked up */
- uint32 ptr_rids; /* pointer to aliases */
- uint32 num_rids2; /* number of aliases being looked up */
-
- uint32 *rids; /* rids */
-
- uint32 num_types1; /* number of users in aliases being looked up */
- uint32 ptr_types; /* pointer to users in aliases */
- uint32 num_types2; /* number of users in aliases being looked up */
-
- uint32 *types; /* SID_ENUM type */
-
- NTSTATUS status; /* return code */
-
-} SAMR_R_LOOKUP_NAMES;
-
-
-/****************************************************************************
-SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
-
-called to resolve domain RID groups.
-*****************************************************************************/
-/* SAMR_Q_LOOKUP_RIDS */
-typedef struct q_samr_lookup_rids_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 num_rids1; /* number of rids being looked up */
- uint32 flags; /* 0x0000 03e8 - unknown */
- uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
- uint32 num_rids2; /* number of rids being looked up */
-
- uint32 *rid; /* domain RIDs being looked up */
-
-} SAMR_Q_LOOKUP_RIDS;
-
-
-/****************************************************************************
-SAMR_R_LOOKUP_RIDS - do a conversion from group RID to names
-
-*****************************************************************************/
-/* SAMR_R_LOOKUP_RIDS */
-typedef struct r_samr_lookup_rids_info
-{
- uint32 num_names1; /* number of aliases being looked up */
- uint32 ptr_names; /* pointer to aliases */
- uint32 num_names2; /* number of aliases being looked up */
-
- UNIHDR *hdr_name; /* unicode account name header */
- UNISTR2 *uni_name; /* unicode account name string */
-
- uint32 num_types1; /* number of users in aliases being looked up */
- uint32 ptr_types; /* pointer to users in aliases */
- uint32 num_types2; /* number of users in aliases being looked up */
-
- uint32 *type; /* SID_ENUM type */
-
- NTSTATUS status;
-
-} SAMR_R_LOOKUP_RIDS;
-
-
-/* SAMR_Q_OPEN_USER - probably an open */
-typedef struct q_samr_open_user_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint32 access_mask; /* 32 bit unknown - 0x02011b */
- uint32 user_rid; /* user RID */
-
-} SAMR_Q_OPEN_USER;
-
-
-/* SAMR_R_OPEN_USER - probably an open */
-typedef struct r_samr_open_user_info
-{
- POLICY_HND user_pol; /* policy handle associated with unknown id */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_USER;
-
-
-/* SAMR_Q_CREATE_USER - probably a create */
-typedef struct q_samr_create_user_info
-{
- POLICY_HND domain_pol; /* policy handle */
-
- UNIHDR hdr_name; /* unicode account name header */
- UNISTR2 uni_name; /* unicode account name */
-
- uint32 acb_info; /* account control info */
- uint32 access_mask; /* 0xe005 00b0 */
-
-} SAMR_Q_CREATE_USER;
-
-
-/* SAMR_R_CREATE_USER - probably a create */
-typedef struct r_samr_create_user_info
-{
- POLICY_HND user_pol; /* policy handle associated with user */
-
- uint32 access_granted;
- uint32 user_rid; /* user RID */
- NTSTATUS status; /* return status */
-
-} SAMR_R_CREATE_USER;
-
-
-/* SAMR_Q_DELETE_DOM_USER - delete domain user */
-typedef struct q_samr_delete_dom_user_info
-{
- POLICY_HND user_pol; /* policy handle */
-
-} SAMR_Q_DELETE_DOM_USER;
-
-
-/* SAMR_R_DELETE_DOM_USER - delete domain user */
-typedef struct r_samr_delete_dom_user_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_DELETE_DOM_USER;
-
-
-/* SAMR_Q_QUERY_GROUPMEM - query group members */
-typedef struct q_samr_query_groupmem_info
-{
- POLICY_HND group_pol; /* policy handle */
-
-} SAMR_Q_QUERY_GROUPMEM;
-
-
-/* SAMR_R_QUERY_GROUPMEM - query group members */
-typedef struct r_samr_query_groupmem_info
-{
- uint32 ptr;
- uint32 num_entries;
-
- uint32 ptr_rids;
- uint32 ptr_attrs;
-
- uint32 num_rids;
- uint32 *rid;
-
- uint32 num_attrs;
- uint32 *attr;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_GROUPMEM;
-
-
-/* SAMR_Q_DEL_GROUPMEM - probably an del group member */
-typedef struct q_samr_del_group_mem_info
-{
- POLICY_HND pol; /* policy handle */
- uint32 rid; /* rid */
-
-} SAMR_Q_DEL_GROUPMEM;
-
-
-/* SAMR_R_DEL_GROUPMEM - probably an del group member */
-typedef struct r_samr_del_group_mem_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_DEL_GROUPMEM;
-
-
-/* SAMR_Q_ADD_GROUPMEM - probably an add group member */
-typedef struct q_samr_add_group_mem_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 rid; /* rid */
- uint32 unknown; /* 0x0000 0005 */
-
-} SAMR_Q_ADD_GROUPMEM;
-
-
-/* SAMR_R_ADD_GROUPMEM - probably an add group member */
-typedef struct r_samr_add_group_mem_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_ADD_GROUPMEM;
-
-
-/* SAMR_Q_OPEN_GROUP - probably an open */
-typedef struct q_samr_open_group_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
- uint32 rid_group; /* rid */
-
-} SAMR_Q_OPEN_GROUP;
-
-
-/* SAMR_R_OPEN_GROUP - probably an open */
-typedef struct r_samr_open_group_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_GROUP;
-
-
-/* SAMR_Q_QUERY_ALIASMEM - query alias members */
-typedef struct q_samr_query_aliasmem_info
-{
- POLICY_HND alias_pol; /* policy handle */
-
-} SAMR_Q_QUERY_ALIASMEM;
-
-
-/* SAMR_R_QUERY_ALIASMEM - query alias members */
-typedef struct r_samr_query_aliasmem_info
-{
- uint32 num_sids;
- uint32 ptr;
- uint32 num_sids1;
-
- DOM_SID2 *sid;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_ALIASMEM;
-
-
-/* SAMR_Q_ADD_ALIASMEM - add alias member */
-typedef struct q_samr_add_alias_mem_info
-{
- POLICY_HND alias_pol; /* policy handle */
-
- DOM_SID2 sid; /* member sid to be added to the alias */
-
-} SAMR_Q_ADD_ALIASMEM;
-
-
-/* SAMR_R_ADD_ALIASMEM - add alias member */
-typedef struct r_samr_add_alias_mem_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_ADD_ALIASMEM;
-
-
-/* SAMR_Q_DEL_ALIASMEM - add an add alias member */
-typedef struct q_samr_del_alias_mem_info
-{
- POLICY_HND alias_pol; /* policy handle */
-
- DOM_SID2 sid; /* member sid to be added to alias */
-
-} SAMR_Q_DEL_ALIASMEM;
-
-
-/* SAMR_R_DEL_ALIASMEM - delete alias member */
-typedef struct r_samr_del_alias_mem_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_DEL_ALIASMEM;
-
-
-
-/* SAMR_Q_OPEN_ALIAS - probably an open */
-typedef struct q_samr_open_alias_info
-{
- POLICY_HND dom_pol;
-
- uint32 access_mask;
- uint32 rid_alias;
-
-} SAMR_Q_OPEN_ALIAS;
-
-
-/* SAMR_R_OPEN_ALIAS - probably an open */
-typedef struct r_samr_open_alias_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_ALIAS;
-
-
-/* SAMR_Q_CONNECT_ANON - probably an open */
-typedef struct q_samr_connect_anon_info
-{
- uint32 ptr; /* ptr? */
- uint16 unknown_0; /* 0x005c */
- uint16 unknown_1; /* 0x0001 */
- uint32 access_mask;
-
-} SAMR_Q_CONNECT_ANON;
-
-/* SAMR_R_CONNECT_ANON - probably an open */
-typedef struct r_samr_connect_anon_info
-{
- POLICY_HND connect_pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_CONNECT_ANON;
-
-/* SAMR_Q_CONNECT - probably an open */
-typedef struct q_samr_connect_info
-{
- uint32 ptr_srv_name; /* pointer (to server name?) */
- UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
-
- uint32 access_mask;
-
-} SAMR_Q_CONNECT;
-
-
-/* SAMR_R_CONNECT - probably an open */
-typedef struct r_samr_connect_info
-{
- POLICY_HND connect_pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_CONNECT;
-
-/* SAMR_Q_CONNECT4 */
-typedef struct q_samr_connect4_info
-{
- uint32 ptr_srv_name; /* pointer to server name */
- UNISTR2 uni_srv_name;
-
- uint32 unk_0; /* possible server name type, 1 for IP num, 2 for name */
- uint32 access_mask;
-} SAMR_Q_CONNECT4;
-
-/* SAMR_R_CONNECT4 - same format as connect */
-typedef struct r_samr_connect_info SAMR_R_CONNECT4;
-
-/* SAMR_Q_GET_DOM_PWINFO */
-typedef struct q_samr_get_dom_pwinfo
-{
- uint32 ptr;
- UNIHDR hdr_srv_name;
- UNISTR2 uni_srv_name;
-
-} SAMR_Q_GET_DOM_PWINFO;
-
-/* SAMR_R_GET_DOM_PWINFO */
-typedef struct r_samr_get_dom_pwinfo
-{
- /*
- * Previously this was 3 uint16's. However, after some tests
- * it appears that the data len for the signing needs to be 16.
- * Not sure how 3 unit16's ever worked since the length always
- * turned out to 12. 3 uint32's + NT_STATUS == 16 bytes. Tested
- * using NT and 2k. --jerry
- */
- uint32 unk_0;
- uint32 unk_1;
- uint32 unk_2;
- NTSTATUS status;
-
-} SAMR_R_GET_DOM_PWINFO;
-
-/* SAMR_ENC_PASSWD */
-typedef struct enc_passwd_info
-{
- uint32 ptr;
- uint8 pass[516];
-
-} SAMR_ENC_PASSWD;
-
-/* SAMR_ENC_HASH */
-typedef struct enc_hash_info
-{
- uint32 ptr;
- uint8 hash[16];
-
-} SAMR_ENC_HASH;
-
-/* SAMR_Q_CHGPASSWD_USER */
-typedef struct q_samr_chgpasswd_user_info
-{
- uint32 ptr_0;
-
- UNIHDR hdr_dest_host; /* server name unicode header */
- UNISTR2 uni_dest_host; /* server name unicode string */
-
- UNIHDR hdr_user_name; /* username unicode string header */
- UNISTR2 uni_user_name; /* username unicode string */
-
- SAMR_ENC_PASSWD nt_newpass;
- SAMR_ENC_HASH nt_oldhash;
-
- uint32 unknown; /* 0x0000 0001 */
-
- SAMR_ENC_PASSWD lm_newpass;
- SAMR_ENC_HASH lm_oldhash;
-
-} SAMR_Q_CHGPASSWD_USER;
-
-/* SAMR_R_CHGPASSWD_USER */
-typedef struct r_samr_chgpasswd_user_info
-{
- NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
-
-} SAMR_R_CHGPASSWD_USER;
-
-
-/* SAMR_Q_UNKNOWN_2D */
-typedef struct q_samr_unknown_2d_info
-{
- POLICY_HND dom_pol; /* policy handle */
- DOM_SID2 sid; /* SID */
-
-} SAMR_Q_UNKNOWN_2D;
-
-
-/* SAMR_R_UNKNOWN_2D - probably an open */
-typedef struct r_samr_unknown_2d_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_UNKNOWN_2D;
-
-
-
-/* these are from the old rpc_samr.h - they are needed while the merge
- is still going on */
-#define MAX_SAM_SIDS 15
-
-/* DOM_SID3 - security id */
-typedef struct sid_info_3
-{
- uint16 len; /* length, bytes, including length of len :-) */
- /* uint8 pad[2]; */
-
- DOM_SID sid;
-
-} DOM_SID3;
-
-/* SAMR_Q_UNKNOWN_2E */
-typedef struct q_samr_unknown_2e_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint16 switch_value;
-
-} SAMR_Q_UNKNOWN_2E;
-
-/* SAMR_R_UNKNOWN_2E */
-typedef struct r_samr_unknown_2e_info
-{
- uint32 ptr_0;
- uint16 switch_value;
- SAM_UNK_CTR *ctr;
- NTSTATUS status; /* return status */
-
-} SAMR_R_UNKNOWN_2E;
-
-/* SAMR_Q_SET_DOMAIN_INFO */
-typedef struct q_samr_set_domain_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint16 switch_value0;
- uint16 switch_value;
- SAM_UNK_CTR *ctr;
-
-} SAMR_Q_SET_DOMAIN_INFO;
-
-/* SAMR_R_SET_DOMAIN_INFO */
-typedef struct r_samr_set_domain_info
-{
- NTSTATUS status; /* return status */
-
-} SAMR_R_SET_DOMAIN_INFO;
-
-#endif /* _RPC_SAMR_H */
diff --git a/source4/include/rpc_spoolss.h b/source4/include/rpc_spoolss.h
deleted file mode 100755
index c2e3d92787..0000000000
--- a/source4/include/rpc_spoolss.h
+++ /dev/null
@@ -1,2228 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- SMB parameters and setup
- Copyright (C) Andrew Tridgell 1992-2000,
- Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
- Copyright (C) Jean Francois Micouleau 1998-2000.
- Copyright (C) Gerald Carter 2001-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_SPOOLSS_H /* _RPC_SPOOLSS_H */
-#define _RPC_SPOOLSS_H
-
-/* spoolss pipe: this are the calls which are not implemented ...
-#define SPOOLSS_GETPRINTERDRIVER 0x0b
-#define SPOOLSS_READPRINTER 0x16
-#define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
-#define SPOOLSS_ADDPORT 0x25
-#define SPOOLSS_CONFIGUREPORT 0x26
-#define SPOOLSS_DELETEPORT 0x27
-#define SPOOLSS_CREATEPRINTERIC 0x28
-#define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
-#define SPOOLSS_DELETEPRINTERIC 0x2a
-#define SPOOLSS_ADDPRINTERCONNECTION 0x2b
-#define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
-#define SPOOLSS_PRINTERMESSAGEBOX 0x2d
-#define SPOOLSS_ADDMONITOR 0x2e
-#define SPOOLSS_DELETEMONITOR 0x2f
-#define SPOOLSS_DELETEPRINTPROCESSOR 0x30
-#define SPOOLSS_ADDPRINTPROVIDOR 0x31
-#define SPOOLSS_DELETEPRINTPROVIDOR 0x32
-#define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
-#define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
-#define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
-#define SPOOLSS_ADDPORTEX 0x3d
-#define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
-#define SPOOLSS_SPOOLERINIT 0x3f
-#define SPOOLSS_RESETPRINTEREX 0x40
-*/
-
-/* those are implemented */
-#define SPOOLSS_ENUMPRINTERS 0x00
-#define SPOOLSS_OPENPRINTER 0x01
-#define SPOOLSS_SETJOB 0x02
-#define SPOOLSS_GETJOB 0x03
-#define SPOOLSS_ENUMJOBS 0x04
-#define SPOOLSS_ADDPRINTER 0x05
-#define SPOOLSS_DELETEPRINTER 0x06
-#define SPOOLSS_SETPRINTER 0x07
-#define SPOOLSS_GETPRINTER 0x08
-#define SPOOLSS_ADDPRINTERDRIVER 0x09
-#define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
-#define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
-#define SPOOLSS_DELETEPRINTERDRIVER 0x0d
-#define SPOOLSS_ADDPRINTPROCESSOR 0x0e
-#define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
-#define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
-#define SPOOLSS_STARTDOCPRINTER 0x11
-#define SPOOLSS_STARTPAGEPRINTER 0x12
-#define SPOOLSS_WRITEPRINTER 0x13
-#define SPOOLSS_ENDPAGEPRINTER 0x14
-#define SPOOLSS_ABORTPRINTER 0x15
-#define SPOOLSS_ENDDOCPRINTER 0x17
-#define SPOOLSS_ADDJOB 0x18
-#define SPOOLSS_SCHEDULEJOB 0x19
-#define SPOOLSS_GETPRINTERDATA 0x1a
-#define SPOOLSS_SETPRINTERDATA 0x1b
-#define SPOOLSS_CLOSEPRINTER 0x1d
-#define SPOOLSS_ADDFORM 0x1e
-#define SPOOLSS_DELETEFORM 0x1f
-#define SPOOLSS_GETFORM 0x20
-#define SPOOLSS_SETFORM 0x21
-#define SPOOLSS_ENUMFORMS 0x22
-#define SPOOLSS_ENUMPORTS 0x23
-#define SPOOLSS_ENUMMONITORS 0x24
-#define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
-#define SPOOLSS_RESETPRINTER 0x34
-#define SPOOLSS_GETPRINTERDRIVER2 0x35
-#define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */
-#define SPOOLSS_REPLYOPENPRINTER 0x3a
-#define SPOOLSS_ROUTERREPLYPRINTER 0x3b
-#define SPOOLSS_REPLYCLOSEPRINTER 0x3c
-#define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */
-#define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */
-#define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */
-#define SPOOLSS_OPENPRINTEREX 0x45
-#define SPOOLSS_ADDPRINTEREX 0x46
-#define SPOOLSS_ENUMPRINTERDATA 0x48
-#define SPOOLSS_DELETEPRINTERDATA 0x49
-#define SPOOLSS_SETPRINTERDATAEX 0x4d
-#define SPOOLSS_GETPRINTERDATAEX 0x4e
-#define SPOOLSS_ENUMPRINTERDATAEX 0x4f
-#define SPOOLSS_ENUMPRINTERKEY 0x50
-#define SPOOLSS_DELETEPRINTERDATAEX 0x51
-#define SPOOLSS_DELETEPRINTERKEY 0x52
-#define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
-#define SPOOLSS_ADDPRINTERDRIVEREX 0x59
-
-
-#define PRINTER_CONTROL_UNPAUSE 0x00000000
-#define PRINTER_CONTROL_PAUSE 0x00000001
-#define PRINTER_CONTROL_RESUME 0x00000002
-#define PRINTER_CONTROL_PURGE 0x00000003
-#define PRINTER_CONTROL_SET_STATUS 0x00000004
-
-#define PRINTER_STATUS_OK 0x00000000
-#define PRINTER_STATUS_PAUSED 0x00000001
-#define PRINTER_STATUS_ERROR 0x00000002
-#define PRINTER_STATUS_PENDING_DELETION 0x00000004
-#define PRINTER_STATUS_PAPER_JAM 0x00000008
-
-#define PRINTER_STATUS_PAPER_OUT 0x00000010
-#define PRINTER_STATUS_MANUAL_FEED 0x00000020
-#define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
-#define PRINTER_STATUS_OFFLINE 0x00000080
-
-#define PRINTER_STATUS_IO_ACTIVE 0x00000100
-#define PRINTER_STATUS_BUSY 0x00000200
-#define PRINTER_STATUS_PRINTING 0x00000400
-#define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
-
-#define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
-#define PRINTER_STATUS_WAITING 0x00002000
-#define PRINTER_STATUS_PROCESSING 0x00004000
-#define PRINTER_STATUS_INITIALIZING 0x00008000
-
-#define PRINTER_STATUS_WARMING_UP 0x00010000
-#define PRINTER_STATUS_TONER_LOW 0x00020000
-#define PRINTER_STATUS_NO_TONER 0x00040000
-#define PRINTER_STATUS_PAGE_PUNT 0x00080000
-
-#define PRINTER_STATUS_USER_INTERVENTION 0x00100000
-#define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
-#define PRINTER_STATUS_DOOR_OPEN 0x00400000
-#define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
-
-#define PRINTER_STATUS_POWER_SAVE 0x01000000
-
-#define SERVER_ACCESS_ADMINISTER 0x00000001
-#define SERVER_ACCESS_ENUMERATE 0x00000002
-#define PRINTER_ACCESS_ADMINISTER 0x00000004
-#define PRINTER_ACCESS_USE 0x00000008
-#define JOB_ACCESS_ADMINISTER 0x00000010
-
-/* JOB status codes. */
-
-#define JOB_STATUS_QUEUED 0x0000
-#define JOB_STATUS_PAUSED 0x0001
-#define JOB_STATUS_ERROR 0x0002
-#define JOB_STATUS_DELETING 0x0004
-#define JOB_STATUS_SPOOLING 0x0008
-#define JOB_STATUS_PRINTING 0x0010
-#define JOB_STATUS_OFFLINE 0x0020
-#define JOB_STATUS_PAPEROUT 0x0040
-#define JOB_STATUS_PRINTED 0x0080
-#define JOB_STATUS_DELETED 0x0100
-#define JOB_STATUS_BLOCKED 0x0200
-#define JOB_STATUS_USER_INTERVENTION 0x0400
-
-/* ACE masks for the various print permissions */
-
-#define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
-#define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
-#define PRINTER_ACE_PRINT \
- (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
-
-/* Access rights for print servers */
-#define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
-#define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
-#define SERVER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
-#define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
-
-/* Access rights for printers */
-#define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
-#define PRINTER_READ STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
-#define PRINTER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
-#define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
-
-/* Access rights for jobs */
-#define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER
-#define JOB_READ STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER
-#define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
-#define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
-
-/* Notify field types */
-
-#define NOTIFY_ONE_VALUE 1 /* Notify data is stored in value1 */
-#define NOTIFY_TWO_VALUE 2 /* Notify data is stored in value2 */
-#define NOTIFY_POINTER 3 /* Data is a pointer to a buffer */
-#define NOTIFY_STRING 4 /* Data is a pointer to a buffer w/length */
-#define NOTIFY_SECDESC 5 /* Data is a security descriptor */
-
-#define PRINTER_NOTIFY_TYPE 0x00
-#define JOB_NOTIFY_TYPE 0x01
-
-#define MAX_PRINTER_NOTIFY 26
-#define MAX_JOB_NOTIFY 24
-
-#define MAX_NOTIFY_TYPE_FOR_NOW 26
-
-#define PRINTER_NOTIFY_SERVER_NAME 0x00
-#define PRINTER_NOTIFY_PRINTER_NAME 0x01
-#define PRINTER_NOTIFY_SHARE_NAME 0x02
-#define PRINTER_NOTIFY_PORT_NAME 0x03
-#define PRINTER_NOTIFY_DRIVER_NAME 0x04
-#define PRINTER_NOTIFY_COMMENT 0x05
-#define PRINTER_NOTIFY_LOCATION 0x06
-#define PRINTER_NOTIFY_DEVMODE 0x07
-#define PRINTER_NOTIFY_SEPFILE 0x08
-#define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
-#define PRINTER_NOTIFY_PARAMETERS 0x0A
-#define PRINTER_NOTIFY_DATATYPE 0x0B
-#define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
-#define PRINTER_NOTIFY_ATTRIBUTES 0x0D
-#define PRINTER_NOTIFY_PRIORITY 0x0E
-#define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
-#define PRINTER_NOTIFY_START_TIME 0x10
-#define PRINTER_NOTIFY_UNTIL_TIME 0x11
-#define PRINTER_NOTIFY_STATUS 0x12
-#define PRINTER_NOTIFY_STATUS_STRING 0x13
-#define PRINTER_NOTIFY_CJOBS 0x14
-#define PRINTER_NOTIFY_AVERAGE_PPM 0x15
-#define PRINTER_NOTIFY_TOTAL_PAGES 0x16
-#define PRINTER_NOTIFY_PAGES_PRINTED 0x17
-#define PRINTER_NOTIFY_TOTAL_BYTES 0x18
-#define PRINTER_NOTIFY_BYTES_PRINTED 0x19
-
-#define JOB_NOTIFY_PRINTER_NAME 0x00
-#define JOB_NOTIFY_MACHINE_NAME 0x01
-#define JOB_NOTIFY_PORT_NAME 0x02
-#define JOB_NOTIFY_USER_NAME 0x03
-#define JOB_NOTIFY_NOTIFY_NAME 0x04
-#define JOB_NOTIFY_DATATYPE 0x05
-#define JOB_NOTIFY_PRINT_PROCESSOR 0x06
-#define JOB_NOTIFY_PARAMETERS 0x07
-#define JOB_NOTIFY_DRIVER_NAME 0x08
-#define JOB_NOTIFY_DEVMODE 0x09
-#define JOB_NOTIFY_STATUS 0x0A
-#define JOB_NOTIFY_STATUS_STRING 0x0B
-#define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
-#define JOB_NOTIFY_DOCUMENT 0x0D
-#define JOB_NOTIFY_PRIORITY 0x0E
-#define JOB_NOTIFY_POSITION 0x0F
-#define JOB_NOTIFY_SUBMITTED 0x10
-#define JOB_NOTIFY_START_TIME 0x11
-#define JOB_NOTIFY_UNTIL_TIME 0x12
-#define JOB_NOTIFY_TIME 0x13
-#define JOB_NOTIFY_TOTAL_PAGES 0x14
-#define JOB_NOTIFY_PAGES_PRINTED 0x15
-#define JOB_NOTIFY_TOTAL_BYTES 0x16
-#define JOB_NOTIFY_BYTES_PRINTED 0x17
-
-#define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
-
-#define PRINTER_CHANGE_ADD_PRINTER 0x00000001
-#define PRINTER_CHANGE_SET_PRINTER 0x00000002
-#define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
-#define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
-#define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
- PRINTER_CHANGE_SET_PRINTER | \
- PRINTER_CHANGE_DELETE_PRINTER | \
- PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
-
-#define PRINTER_CHANGE_ADD_JOB 0x00000100
-#define PRINTER_CHANGE_SET_JOB 0x00000200
-#define PRINTER_CHANGE_DELETE_JOB 0x00000400
-#define PRINTER_CHANGE_WRITE_JOB 0x00000800
-#define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
- PRINTER_CHANGE_SET_JOB | \
- PRINTER_CHANGE_DELETE_JOB | \
- PRINTER_CHANGE_WRITE_JOB )
-
-#define PRINTER_CHANGE_ADD_FORM 0x00010000
-#define PRINTER_CHANGE_SET_FORM 0x00020000
-#define PRINTER_CHANGE_DELETE_FORM 0x00040000
-#define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
- PRINTER_CHANGE_SET_FORM | \
- PRINTER_CHANGE_DELETE_FORM )
-
-#define PRINTER_CHANGE_ADD_PORT 0x00100000
-#define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
-#define PRINTER_CHANGE_DELETE_PORT 0x00400000
-#define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
- PRINTER_CHANGE_CONFIGURE_PORT | \
- PRINTER_CHANGE_DELETE_PORT )
-
-#define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
-#define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
-#define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
- PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
-
-#define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
-#define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
-#define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
-#define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
- PRINTER_CHANGE_SET_PRINTER_DRIVER | \
- PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
-
-#define PRINTER_CHANGE_TIMEOUT 0x80000000
-#define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
- PRINTER_CHANGE_FORM | \
- PRINTER_CHANGE_PORT | \
- PRINTER_CHANGE_PRINT_PROCESSOR | \
- PRINTER_CHANGE_PRINTER_DRIVER )
-
-#define PRINTER_NOTIFY_INFO_DISCARDED 0x1
-
-/*
- * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
- * when sending messages to other smbd's
- */
-#define PRINTER_MESSAGE_NULL 0x00000000
-#define PRINTER_MESSAGE_DRIVER 0x00000001
-#define PRINTER_MESSAGE_COMMENT 0x00000002
-#define PRINTER_MESSAGE_PRINTERNAME 0x00000004
-#define PRINTER_MESSAGE_LOCATION 0x00000008
-#define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */
-#define PRINTER_MESSAGE_SEPFILE 0x00000020
-#define PRINTER_MESSAGE_PRINTPROC 0x00000040
-#define PRINTER_MESSAGE_PARAMS 0x00000080
-#define PRINTER_MESSAGE_DATATYPE 0x00000100
-#define PRINTER_MESSAGE_SECDESC 0x00000200
-#define PRINTER_MESSAGE_CJOBS 0x00000400
-#define PRINTER_MESSAGE_PORT 0x00000800
-#define PRINTER_MESSAGE_SHARENAME 0x00001000
-#define PRINTER_MESSAGE_ATTRIBUTES 0x00002000
-
-typedef struct printer_message_info {
- uint32 low; /* PRINTER_CHANGE_XXX */
- uint32 high; /* PRINTER_CHANGE_XXX */
- fstring printer_name;
- uint32 flags; /* PRINTER_MESSAGE_XXX */
-}
-PRINTER_MESSAGE_INFO;
-
-/*
- * The printer attributes.
- * I #defined all of them (grabbed form MSDN)
- * I'm only using:
- * ( SHARED | NETWORK | RAW_ONLY )
- * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
- */
-
-#define PRINTER_ATTRIBUTE_QUEUED 0x00000001
-#define PRINTER_ATTRIBUTE_DIRECT 0x00000002
-#define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
-#define PRINTER_ATTRIBUTE_SHARED 0x00000008
-
-#define PRINTER_ATTRIBUTE_NETWORK 0x00000010
-#define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
-#define PRINTER_ATTRIBUTE_LOCAL 0x00000040
-#define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
-
-#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
-#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
-#define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
-#define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
-
-#define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
-#define PRINTER_ATTRIBUTE_PUBLISHED 0x00002000
-
-#define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\
- PRINTER_ATTRIBUTE_SHARED|\
- PRINTER_ATTRIBUTE_NETWORK)
-
-#define NO_PRIORITY 0
-#define MAX_PRIORITY 99
-#define MIN_PRIORITY 1
-#define DEF_PRIORITY 1
-
-/* the flags of the query */
-#define PRINTER_ENUM_DEFAULT 0x00000001
-#define PRINTER_ENUM_LOCAL 0x00000002
-#define PRINTER_ENUM_CONNECTIONS 0x00000004
-#define PRINTER_ENUM_FAVORITE 0x00000004
-#define PRINTER_ENUM_NAME 0x00000008
-#define PRINTER_ENUM_REMOTE 0x00000010
-#define PRINTER_ENUM_SHARED 0x00000020
-#define PRINTER_ENUM_NETWORK 0x00000040
-
-/* the flags of each printers */
-#define PRINTER_ENUM_UNKNOWN_8 0x00000008
-#define PRINTER_ENUM_EXPAND 0x00004000
-#define PRINTER_ENUM_CONTAINER 0x00008000
-#define PRINTER_ENUM_ICONMASK 0x00ff0000
-#define PRINTER_ENUM_ICON1 0x00010000
-#define PRINTER_ENUM_ICON2 0x00020000
-#define PRINTER_ENUM_ICON3 0x00040000
-#define PRINTER_ENUM_ICON4 0x00080000
-#define PRINTER_ENUM_ICON5 0x00100000
-#define PRINTER_ENUM_ICON6 0x00200000
-#define PRINTER_ENUM_ICON7 0x00400000
-#define PRINTER_ENUM_ICON8 0x00800000
-
-/* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */
-
-#define DPD_DELETE_UNUSED_FILES 0x00000001
-#define DPD_DELETE_SPECIFIC_VERSION 0x00000002
-#define DPD_DELETE_ALL_FILES 0x00000004
-
-#define DRIVER_ANY_VERSION 0xffffffff
-#define DRIVER_MAX_VERSION 4
-
-/* FLAGS for SPOOLSS_ADDPRINTERDRIVEREX */
-
-#define APD_STRICT_UPGRADE 0x00000001
-#define APD_STRICT_DOWNGRADE 0x00000002
-#define APD_COPY_ALL_FILES 0x00000004
-#define APD_COPY_NEW_FILES 0x00000008
-
-
-/* this struct is undocumented */
-/* thanks to the ddk ... */
-typedef struct spool_user_1
-{
- uint32 size; /* length of user_name & client_name + 2? */
- uint32 client_name_ptr;
- uint32 user_name_ptr;
- uint32 build;
- uint32 major;
- uint32 minor;
- uint32 processor;
- UNISTR2 client_name;
- UNISTR2 user_name;
-}
-SPOOL_USER_1;
-
-typedef struct spool_user_ctr_info
-{
- uint32 level;
- uint32 ptr;
- SPOOL_USER_1 user1;
-}
-SPOOL_USER_CTR;
-
-/*
- * various bits in the DEVICEMODE.fields member
- */
-
-#define DEVMODE_ORIENTATION 0x00000001
-#define DEVMODE_PAPERSIZE 0x00000002
-#define DEVMODE_PAPERLENGTH 0x00000004
-#define DEVMODE_PAPERWIDTH 0x00000008
-#define DEVMODE_SCALE 0x00000010
-#define DEVMODE_POSITION 0x00000020
-#define DEVMODE_NUP 0x00000040
-#define DEVMODE_COPIES 0x00000100
-#define DEVMODE_DEFAULTSOURCE 0x00000200
-#define DEVMODE_PRINTQUALITY 0x00000400
-#define DEVMODE_COLOR 0x00000800
-#define DEVMODE_DUPLEX 0x00001000
-#define DEVMODE_YRESOLUTION 0x00002000
-#define DEVMODE_TTOPTION 0x00004000
-#define DEVMODE_COLLATE 0x00008000
-#define DEVMODE_FORMNAME 0x00010000
-#define DEVMODE_LOGPIXELS 0x00020000
-#define DEVMODE_BITSPERPEL 0x00040000
-#define DEVMODE_PELSWIDTH 0x00080000
-#define DEVMODE_PELSHEIGHT 0x00100000
-#define DEVMODE_DISPLAYFLAGS 0x00200000
-#define DEVMODE_DISPLAYFREQUENCY 0x00400000
-#define DEVMODE_ICMMETHOD 0x00800000
-#define DEVMODE_ICMINTENT 0x01000000
-#define DEVMODE_MEDIATYPE 0x02000000
-#define DEVMODE_DITHERTYPE 0x04000000
-#define DEVMODE_PANNINGWIDTH 0x08000000
-#define DEVMODE_PANNINGHEIGHT 0x10000000
-
-
-/*
- * Devicemode structure
- */
-
-typedef struct devicemode
-{
- UNISTR devicename;
- uint16 specversion;
- uint16 driverversion;
- uint16 size;
- uint16 driverextra;
- uint32 fields;
- uint16 orientation;
- uint16 papersize;
- uint16 paperlength;
- uint16 paperwidth;
- uint16 scale;
- uint16 copies;
- uint16 defaultsource;
- uint16 printquality;
- uint16 color;
- uint16 duplex;
- uint16 yresolution;
- uint16 ttoption;
- uint16 collate;
- UNISTR formname;
- uint16 logpixels;
- uint32 bitsperpel;
- uint32 pelswidth;
- uint32 pelsheight;
- uint32 displayflags;
- uint32 displayfrequency;
- uint32 icmmethod;
- uint32 icmintent;
- uint32 mediatype;
- uint32 dithertype;
- uint32 reserved1;
- uint32 reserved2;
- uint32 panningwidth;
- uint32 panningheight;
- uint8 *private;
-}
-DEVICEMODE;
-
-typedef struct _devmode_cont
-{
- uint32 size;
- uint32 devmode_ptr;
- DEVICEMODE *devmode;
-}
-DEVMODE_CTR;
-
-typedef struct _printer_default
-{
- uint32 datatype_ptr;
- UNISTR2 datatype;
- DEVMODE_CTR devmode_cont;
- uint32 access_required;
-}
-PRINTER_DEFAULT;
-
-/* SPOOL_Q_OPEN_PRINTER request to open a printer */
-typedef struct spool_q_open_printer
-{
- uint32 printername_ptr;
- UNISTR2 printername;
- PRINTER_DEFAULT printer_default;
-}
-SPOOL_Q_OPEN_PRINTER;
-
-/* SPOOL_R_OPEN_PRINTER reply to an open printer */
-typedef struct spool_r_open_printer
-{
- POLICY_HND handle; /* handle used along all transactions (20*uint8) */
- WERROR status;
-}
-SPOOL_R_OPEN_PRINTER;
-
-/* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
-typedef struct spool_q_open_printer_ex
-{
- uint32 printername_ptr;
- UNISTR2 printername;
- PRINTER_DEFAULT printer_default;
- uint32 user_switch;
- SPOOL_USER_CTR user_ctr;
-}
-SPOOL_Q_OPEN_PRINTER_EX;
-
-/* SPOOL_R_OPEN_PRINTER_EX reply to an open printer */
-typedef struct spool_r_open_printer_ex
-{
- POLICY_HND handle; /* handle used along all transactions (20*uint8) */
- WERROR status;
-}
-SPOOL_R_OPEN_PRINTER_EX;
-
-typedef struct spool_notify_option_type
-{
- uint16 type;
- uint16 reserved0;
- uint32 reserved1;
- uint32 reserved2;
- uint32 count;
- uint32 fields_ptr;
- uint32 count2;
- uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
-}
-SPOOL_NOTIFY_OPTION_TYPE;
-
-typedef struct spool_notify_option_type_ctr
-{
- uint32 count;
- SPOOL_NOTIFY_OPTION_TYPE *type;
-}
-SPOOL_NOTIFY_OPTION_TYPE_CTR;
-
-
-
-typedef struct s_header_type
-{
- uint32 type;
- union
- {
- uint32 value;
- UNISTR string;
- }
- data;
-}
-HEADER_TYPE;
-
-typedef struct new_buffer
-{
- uint32 ptr;
- uint32 size;
- prs_struct prs;
- uint32 struct_start;
- uint32 string_at_end;
-}
-NEW_BUFFER;
-
-typedef struct spool_q_getprinterdata
-{
- POLICY_HND handle;
- UNISTR2 valuename;
- uint32 size;
-}
-SPOOL_Q_GETPRINTERDATA;
-
-typedef struct spool_r_getprinterdata
-{
- uint32 type;
- uint32 size;
- uint8 *data;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETPRINTERDATA;
-
-typedef struct spool_q_deleteprinterdata
-{
- POLICY_HND handle;
- UNISTR2 valuename;
-}
-SPOOL_Q_DELETEPRINTERDATA;
-
-typedef struct spool_r_deleteprinterdata
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDATA;
-
-typedef struct spool_q_closeprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_CLOSEPRINTER;
-
-typedef struct spool_r_closeprinter
-{
- POLICY_HND handle;
- WERROR status;
-}
-SPOOL_R_CLOSEPRINTER;
-
-typedef struct spool_q_startpageprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_STARTPAGEPRINTER;
-
-typedef struct spool_r_startpageprinter
-{
- WERROR status;
-}
-SPOOL_R_STARTPAGEPRINTER;
-
-typedef struct spool_q_endpageprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_ENDPAGEPRINTER;
-
-typedef struct spool_r_endpageprinter
-{
- WERROR status;
-}
-SPOOL_R_ENDPAGEPRINTER;
-
-
-typedef struct spool_q_deleteprinterdriver
-{
- uint32 server_ptr;
- UNISTR2 server;
- UNISTR2 arch;
- UNISTR2 driver;
-}
-SPOOL_Q_DELETEPRINTERDRIVER;
-
-typedef struct spool_r_deleteprinterdriver
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDRIVER;
-
-typedef struct spool_q_deleteprinterdriverex
-{
- uint32 server_ptr;
- UNISTR2 server;
- UNISTR2 arch;
- UNISTR2 driver;
- uint32 delete_flags;
- uint32 version;
-}
-SPOOL_Q_DELETEPRINTERDRIVEREX;
-
-typedef struct spool_r_deleteprinterdriverex
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDRIVEREX;
-
-
-typedef struct spool_doc_info_1
-{
- uint32 p_docname;
- uint32 p_outputfile;
- uint32 p_datatype;
- UNISTR2 docname;
- UNISTR2 outputfile;
- UNISTR2 datatype;
-}
-DOC_INFO_1;
-
-typedef struct spool_doc_info
-{
- uint32 switch_value;
- DOC_INFO_1 doc_info_1;
-}
-DOC_INFO;
-
-typedef struct spool_doc_info_container
-{
- uint32 level;
- DOC_INFO docinfo;
-}
-DOC_INFO_CONTAINER;
-
-typedef struct spool_q_startdocprinter
-{
- POLICY_HND handle;
- DOC_INFO_CONTAINER doc_info_container;
-}
-SPOOL_Q_STARTDOCPRINTER;
-
-typedef struct spool_r_startdocprinter
-{
- uint32 jobid;
- WERROR status;
-}
-SPOOL_R_STARTDOCPRINTER;
-
-typedef struct spool_q_enddocprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_ENDDOCPRINTER;
-
-typedef struct spool_r_enddocprinter
-{
- WERROR status;
-}
-SPOOL_R_ENDDOCPRINTER;
-
-typedef struct spool_q_writeprinter
-{
- POLICY_HND handle;
- uint32 buffer_size;
- uint8 *buffer;
- uint32 buffer_size2;
-}
-SPOOL_Q_WRITEPRINTER;
-
-typedef struct spool_r_writeprinter
-{
- uint32 buffer_written;
- WERROR status;
-}
-SPOOL_R_WRITEPRINTER;
-
-typedef struct spool_notify_option
-{
- uint32 version;
- uint32 flags;
- uint32 count;
- uint32 option_type_ptr;
- SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
-}
-SPOOL_NOTIFY_OPTION;
-
-typedef struct spool_notify_info_data
-{
- uint16 type;
- uint16 field;
- uint32 reserved;
- uint32 id;
- union {
- uint32 value[2];
- struct {
- uint32 length;
- uint16 *string;
- } data;
- struct {
- uint32 size;
- SEC_DESC *desc;
- } sd;
- }
- notify_data;
- uint32 size;
- BOOL enc_type;
-} SPOOL_NOTIFY_INFO_DATA;
-
-typedef struct spool_notify_info
-{
- uint32 version;
- uint32 flags;
- uint32 count;
- SPOOL_NOTIFY_INFO_DATA *data;
-}
-SPOOL_NOTIFY_INFO;
-
-/* If the struct name looks obscure, yes it is ! */
-/* RemoteFindFirstPrinterChangeNotificationEx query struct */
-typedef struct spoolss_q_rffpcnex
-{
- POLICY_HND handle;
- uint32 flags;
- uint32 options;
- uint32 localmachine_ptr;
- UNISTR2 localmachine;
- uint32 printerlocal;
- uint32 option_ptr;
- SPOOL_NOTIFY_OPTION *option;
-}
-SPOOL_Q_RFFPCNEX;
-
-typedef struct spool_r_rffpcnex
-{
- WERROR status;
-}
-SPOOL_R_RFFPCNEX;
-
-/* Remote Find Next Printer Change Notify Ex */
-typedef struct spool_q_rfnpcnex
-{
- POLICY_HND handle;
- uint32 change;
- uint32 option_ptr;
- SPOOL_NOTIFY_OPTION *option;
-}
-SPOOL_Q_RFNPCNEX;
-
-typedef struct spool_r_rfnpcnex
-{
- uint32 info_ptr;
- SPOOL_NOTIFY_INFO info;
- WERROR status;
-}
-SPOOL_R_RFNPCNEX;
-
-/* Find Close Printer Notify */
-typedef struct spool_q_fcpn
-{
- POLICY_HND handle;
-}
-SPOOL_Q_FCPN;
-
-typedef struct spool_r_fcpn
-{
- WERROR status;
-}
-SPOOL_R_FCPN;
-
-
-typedef struct printer_info_0
-{
- UNISTR printername;
- UNISTR servername;
- uint32 cjobs;
- uint32 total_jobs;
- uint32 total_bytes;
-
- uint16 year;
- uint16 month;
- uint16 dayofweek;
- uint16 day;
- uint16 hour;
- uint16 minute;
- uint16 second;
- uint16 milliseconds;
-
- uint32 global_counter;
- uint32 total_pages;
-
- uint16 major_version;
- uint16 build_version;
-
- uint32 unknown7;
- uint32 unknown8;
- uint32 unknown9;
- uint32 session_counter;
- uint32 unknown11;
- uint32 printer_errors;
- uint32 unknown13;
- uint32 unknown14;
- uint32 unknown15;
- uint32 unknown16;
- uint32 change_id;
- uint32 unknown18;
- uint32 status;
- uint32 unknown20;
- uint32 c_setprinter;
-
- uint16 unknown22;
- uint16 unknown23;
- uint16 unknown24;
- uint16 unknown25;
- uint16 unknown26;
- uint16 unknown27;
- uint16 unknown28;
- uint16 unknown29;
-} PRINTER_INFO_0;
-
-typedef struct printer_info_1
-{
- uint32 flags;
- UNISTR description;
- UNISTR name;
- UNISTR comment;
-}
-PRINTER_INFO_1;
-
-typedef struct printer_info_2
-{
- UNISTR servername;
- UNISTR printername;
- UNISTR sharename;
- UNISTR portname;
- UNISTR drivername;
- UNISTR comment;
- UNISTR location;
- DEVICEMODE *devmode;
- UNISTR sepfile;
- UNISTR printprocessor;
- UNISTR datatype;
- UNISTR parameters;
- SEC_DESC *secdesc;
- uint32 attributes;
- uint32 priority;
- uint32 defaultpriority;
- uint32 starttime;
- uint32 untiltime;
- uint32 status;
- uint32 cjobs;
- uint32 averageppm;
-}
-PRINTER_INFO_2;
-
-typedef struct printer_info_3
-{
- uint32 flags;
- SEC_DESC *secdesc;
-}
-PRINTER_INFO_3;
-
-typedef struct printer_info_4
-{
- UNISTR printername;
- UNISTR servername;
- uint32 attributes;
-}
-PRINTER_INFO_4;
-
-typedef struct printer_info_5
-{
- UNISTR printername;
- UNISTR portname;
- uint32 attributes;
- uint32 device_not_selected_timeout;
- uint32 transmission_retry_timeout;
-}
-PRINTER_INFO_5;
-
-#define SPOOL_DS_PUBLISH 1
-#define SPOOL_DS_UPDATE 2
-#define SPOOL_DS_UNPUBLISH 4
-#define SPOOL_DS_PENDING 0x80000000
-
-typedef struct printer_info_7
-{
- UNISTR guid; /* text form of printer guid */
- uint32 action;
-}
-PRINTER_INFO_7;
-
-typedef struct spool_q_enumprinters
-{
- uint32 flags;
- uint32 servername_ptr;
- UNISTR2 servername;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMPRINTERS;
-
-typedef struct printer_info_ctr_info
-{
- PRINTER_INFO_0 *printers_0;
- PRINTER_INFO_1 *printers_1;
- PRINTER_INFO_2 *printers_2;
- PRINTER_INFO_3 *printers_3;
- PRINTER_INFO_4 *printers_4;
- PRINTER_INFO_5 *printers_5;
-}
-PRINTER_INFO_CTR;
-
-typedef struct spool_r_enumprinters
-{
- NEW_BUFFER *buffer;
- uint32 needed; /* bytes needed */
- uint32 returned; /* number of printers */
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERS;
-
-
-typedef struct spool_q_getprinter
-{
- POLICY_HND handle;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_GETPRINTER;
-
-typedef struct printer_info_info
-{
- union
- {
- PRINTER_INFO_0 *info0;
- PRINTER_INFO_1 *info1;
- PRINTER_INFO_2 *info2;
- void *info;
- } printer;
-} PRINTER_INFO;
-
-typedef struct spool_r_getprinter
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-} SPOOL_R_GETPRINTER;
-
-typedef struct driver_info_1
-{
- UNISTR name;
-} DRIVER_INFO_1;
-
-typedef struct driver_info_2
-{
- uint32 version;
- UNISTR name;
- UNISTR architecture;
- UNISTR driverpath;
- UNISTR datafile;
- UNISTR configfile;
-} DRIVER_INFO_2;
-
-typedef struct driver_info_3
-{
- uint32 version;
- UNISTR name;
- UNISTR architecture;
- UNISTR driverpath;
- UNISTR datafile;
- UNISTR configfile;
- UNISTR helpfile;
- uint16 *dependentfiles;
- UNISTR monitorname;
- UNISTR defaultdatatype;
-}
-DRIVER_INFO_3;
-
-typedef struct driver_info_6
-{
- uint32 version;
- UNISTR name;
- UNISTR architecture;
- UNISTR driverpath;
- UNISTR datafile;
- UNISTR configfile;
- UNISTR helpfile;
- uint16 *dependentfiles;
- UNISTR monitorname;
- UNISTR defaultdatatype;
- uint16* previousdrivernames;
- NTTIME driver_date;
- uint32 padding;
- uint32 driver_version_low;
- uint32 driver_version_high;
- UNISTR mfgname;
- UNISTR oem_url;
- UNISTR hardware_id;
- UNISTR provider;
-}
-DRIVER_INFO_6;
-
-typedef struct driver_info_info
-{
- DRIVER_INFO_1 *info1;
- DRIVER_INFO_2 *info2;
- DRIVER_INFO_3 *info3;
- DRIVER_INFO_6 *info6;
-}
-PRINTER_DRIVER_CTR;
-
-typedef struct spool_q_getprinterdriver2
-{
- POLICY_HND handle;
- uint32 architecture_ptr;
- UNISTR2 architecture;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
- uint32 clientmajorversion;
- uint32 clientminorversion;
-}
-SPOOL_Q_GETPRINTERDRIVER2;
-
-typedef struct spool_r_getprinterdriver2
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 servermajorversion;
- uint32 serverminorversion;
- WERROR status;
-}
-SPOOL_R_GETPRINTERDRIVER2;
-
-
-typedef struct add_jobinfo_1
-{
- UNISTR path;
- uint32 job_number;
-}
-ADD_JOBINFO_1;
-
-
-typedef struct spool_q_addjob
-{
- POLICY_HND handle;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ADDJOB;
-
-typedef struct spool_r_addjob
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_ADDJOB;
-
-/*
- * I'm really wondering how many different time formats
- * I will have to cope with
- *
- * JFM, 09/13/98 In a mad mood ;-(
-*/
-typedef struct systemtime
-{
- uint16 year;
- uint16 month;
- uint16 dayofweek;
- uint16 day;
- uint16 hour;
- uint16 minute;
- uint16 second;
- uint16 milliseconds;
-}
-SYSTEMTIME;
-
-typedef struct s_job_info_1
-{
- uint32 jobid;
- UNISTR printername;
- UNISTR machinename;
- UNISTR username;
- UNISTR document;
- UNISTR datatype;
- UNISTR text_status;
- uint32 status;
- uint32 priority;
- uint32 position;
- uint32 totalpages;
- uint32 pagesprinted;
- SYSTEMTIME submitted;
-}
-JOB_INFO_1;
-
-typedef struct s_job_info_2
-{
- uint32 jobid;
- UNISTR printername;
- UNISTR machinename;
- UNISTR username;
- UNISTR document;
- UNISTR notifyname;
- UNISTR datatype;
- UNISTR printprocessor;
- UNISTR parameters;
- UNISTR drivername;
- DEVICEMODE *devmode;
- UNISTR text_status;
-/* SEC_DESC sec_desc;*/
- uint32 status;
- uint32 priority;
- uint32 position;
- uint32 starttime;
- uint32 untiltime;
- uint32 totalpages;
- uint32 size;
- SYSTEMTIME submitted;
- uint32 timeelapsed;
- uint32 pagesprinted;
-}
-JOB_INFO_2;
-
-typedef struct spool_q_enumjobs
-{
- POLICY_HND handle;
- uint32 firstjob;
- uint32 numofjobs;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMJOBS;
-
-typedef struct job_info_ctr_info
-{
- union
- {
- JOB_INFO_1 *job_info_1;
- JOB_INFO_2 *job_info_2;
- void *info;
- } job;
-
-} JOB_INFO_CTR;
-
-typedef struct spool_r_enumjobs
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMJOBS;
-
-typedef struct spool_q_schedulejob
-{
- POLICY_HND handle;
- uint32 jobid;
-}
-SPOOL_Q_SCHEDULEJOB;
-
-typedef struct spool_r_schedulejob
-{
- WERROR status;
-}
-SPOOL_R_SCHEDULEJOB;
-
-typedef struct s_port_info_1
-{
- UNISTR port_name;
-}
-PORT_INFO_1;
-
-typedef struct s_port_info_2
-{
- UNISTR port_name;
- UNISTR monitor_name;
- UNISTR description;
- uint32 port_type;
- uint32 reserved;
-}
-PORT_INFO_2;
-
-typedef struct spool_q_enumports
-{
- uint32 name_ptr;
- UNISTR2 name;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMPORTS;
-
-typedef struct port_info_ctr_info
-{
- union
- {
- PORT_INFO_1 *info_1;
- PORT_INFO_2 *info_2;
- }
- port;
-
-}
-PORT_INFO_CTR;
-
-typedef struct spool_r_enumports
-{
- NEW_BUFFER *buffer;
- uint32 needed; /* bytes needed */
- uint32 returned; /* number of printers */
- WERROR status;
-}
-SPOOL_R_ENUMPORTS;
-
-#define JOB_CONTROL_PAUSE 1
-#define JOB_CONTROL_RESUME 2
-#define JOB_CONTROL_CANCEL 3
-#define JOB_CONTROL_RESTART 4
-#define JOB_CONTROL_DELETE 5
-
-typedef struct job_info_info
-{
- union
- {
- JOB_INFO_1 job_info_1;
- JOB_INFO_2 job_info_2;
- }
- job;
-
-}
-JOB_INFO;
-
-typedef struct spool_q_setjob
-{
- POLICY_HND handle;
- uint32 jobid;
- uint32 level;
- JOB_INFO ctr;
- uint32 command;
-
-}
-SPOOL_Q_SETJOB;
-
-typedef struct spool_r_setjob
-{
- WERROR status;
-
-}
-SPOOL_R_SETJOB;
-
-typedef struct spool_q_enumprinterdrivers
-{
- uint32 name_ptr;
- UNISTR2 name;
- uint32 environment_ptr;
- UNISTR2 environment;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMPRINTERDRIVERS;
-
-typedef struct spool_r_enumprinterdrivers
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERDRIVERS;
-
-#define FORM_USER 0
-#define FORM_BUILTIN 1
-#define FORM_PRINTER 2
-
-typedef struct spool_form_1
-{
- uint32 flag;
- UNISTR name;
- uint32 width;
- uint32 length;
- uint32 left;
- uint32 top;
- uint32 right;
- uint32 bottom;
-}
-FORM_1;
-
-typedef struct spool_q_enumforms
-{
- POLICY_HND handle;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMFORMS;
-
-typedef struct spool_r_enumforms
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 numofforms;
- WERROR status;
-}
-SPOOL_R_ENUMFORMS;
-
-typedef struct spool_q_getform
-{
- POLICY_HND handle;
- UNISTR2 formname;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_GETFORM;
-
-typedef struct spool_r_getform
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETFORM;
-
-typedef struct spool_printer_info_level_1
-{
- uint32 flags;
- uint32 description_ptr;
- uint32 name_ptr;
- uint32 comment_ptr;
- UNISTR2 description;
- UNISTR2 name;
- UNISTR2 comment;
-} SPOOL_PRINTER_INFO_LEVEL_1;
-
-typedef struct spool_printer_info_level_2
-{
- uint32 servername_ptr;
- uint32 printername_ptr;
- uint32 sharename_ptr;
- uint32 portname_ptr;
- uint32 drivername_ptr;
- uint32 comment_ptr;
- uint32 location_ptr;
- uint32 devmode_ptr;
- uint32 sepfile_ptr;
- uint32 printprocessor_ptr;
- uint32 datatype_ptr;
- uint32 parameters_ptr;
- uint32 secdesc_ptr;
- uint32 attributes;
- uint32 priority;
- uint32 default_priority;
- uint32 starttime;
- uint32 untiltime;
- uint32 status;
- uint32 cjobs;
- uint32 averageppm;
- UNISTR2 servername;
- UNISTR2 printername;
- UNISTR2 sharename;
- UNISTR2 portname;
- UNISTR2 drivername;
- UNISTR2 comment;
- UNISTR2 location;
- UNISTR2 sepfile;
- UNISTR2 printprocessor;
- UNISTR2 datatype;
- UNISTR2 parameters;
-}
-SPOOL_PRINTER_INFO_LEVEL_2;
-
-typedef struct spool_printer_info_level_3
-{
- uint32 secdesc_ptr;
-}
-SPOOL_PRINTER_INFO_LEVEL_3;
-
-typedef struct spool_printer_info_level_7
-{
- uint32 guid_ptr;
- uint32 action;
- UNISTR2 guid;
-}
-SPOOL_PRINTER_INFO_LEVEL_7;
-
-typedef struct spool_printer_info_level
-{
- uint32 level;
- uint32 info_ptr;
- SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
- SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
- SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
- SPOOL_PRINTER_INFO_LEVEL_7 *info_7;
-}
-SPOOL_PRINTER_INFO_LEVEL;
-
-typedef struct spool_printer_driver_info_level_3
-{
- uint32 cversion;
- uint32 name_ptr;
- uint32 environment_ptr;
- uint32 driverpath_ptr;
- uint32 datafile_ptr;
- uint32 configfile_ptr;
- uint32 helpfile_ptr;
- uint32 monitorname_ptr;
- uint32 defaultdatatype_ptr;
- uint32 dependentfilessize;
- uint32 dependentfiles_ptr;
-
- UNISTR2 name;
- UNISTR2 environment;
- UNISTR2 driverpath;
- UNISTR2 datafile;
- UNISTR2 configfile;
- UNISTR2 helpfile;
- UNISTR2 monitorname;
- UNISTR2 defaultdatatype;
- BUFFER5 dependentfiles;
-
-}
-SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
-
-/* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
-typedef struct {
- uint32 version;
- uint32 name_ptr;
- uint32 environment_ptr;
- uint32 driverpath_ptr;
- uint32 datafile_ptr;
- uint32 configfile_ptr;
- uint32 helpfile_ptr;
- uint32 monitorname_ptr;
- uint32 defaultdatatype_ptr;
- uint32 dependentfiles_len;
- uint32 dependentfiles_ptr;
- uint32 previousnames_len;
- uint32 previousnames_ptr;
- NTTIME driverdate;
- UINT64_S driverversion;
- uint32 dummy4;
- uint32 mfgname_ptr;
- uint32 oemurl_ptr;
- uint32 hardwareid_ptr;
- uint32 provider_ptr;
- UNISTR2 name;
- UNISTR2 environment;
- UNISTR2 driverpath;
- UNISTR2 datafile;
- UNISTR2 configfile;
- UNISTR2 helpfile;
- UNISTR2 monitorname;
- UNISTR2 defaultdatatype;
- BUFFER5 dependentfiles;
- BUFFER5 previousnames;
- UNISTR2 mfgname;
- UNISTR2 oemurl;
- UNISTR2 hardwareid;
- UNISTR2 provider;
-} SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
-
-
-typedef struct spool_printer_driver_info_level
-{
- uint32 level;
- uint32 ptr;
- SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
- SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
-}
-SPOOL_PRINTER_DRIVER_INFO_LEVEL;
-
-
-/* this struct is undocumented */
-/* thanks to the ddk ... */
-typedef struct spool_user_level_1
-{
- uint32 size;
- uint32 client_name_ptr;
- uint32 user_name_ptr;
- uint32 build;
- uint32 major;
- uint32 minor;
- uint32 processor;
- UNISTR2 client_name;
- UNISTR2 user_name;
-}
-SPOOL_USER_LEVEL_1;
-
-typedef struct spool_user_level
-{
- SPOOL_USER_LEVEL_1 *user_level_1;
-}
-SPOOL_USER_LEVEL;
-
-typedef struct spool_q_setprinter
-{
- POLICY_HND handle;
- uint32 level;
- SPOOL_PRINTER_INFO_LEVEL info;
- SEC_DESC_BUF *secdesc_ctr;
- DEVMODE_CTR devmode_ctr;
-
- uint32 command;
-
-}
-SPOOL_Q_SETPRINTER;
-
-typedef struct spool_r_setprinter
-{
- WERROR status;
-}
-SPOOL_R_SETPRINTER;
-
-typedef struct spool_q_addprinter
-{
- UNISTR2 server_name;
- uint32 level;
- SPOOL_PRINTER_INFO_LEVEL info;
- DEVMODE_CTR devmode_ctr;
- SEC_DESC_BUF *secdesc_ctr;
- uint32 user_level;
- SPOOL_USER_LEVEL user;
-}
-SPOOL_Q_ADDPRINTER;
-
-typedef struct spool_r_addprinter
-{
- WERROR status;
-}
-SPOOL_R_ADDPRINTER;
-
-typedef struct spool_q_deleteprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_DELETEPRINTER;
-
-typedef struct spool_r_deleteprinter
-{
- POLICY_HND handle;
- WERROR status;
-}
-SPOOL_R_DELETEPRINTER;
-
-typedef struct spool_q_abortprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_ABORTPRINTER;
-
-typedef struct spool_r_abortprinter
-{
- WERROR status;
-}
-SPOOL_R_ABORTPRINTER;
-
-
-typedef struct spool_q_addprinterex
-{
- uint32 server_name_ptr;
- UNISTR2 server_name;
- uint32 level;
- SPOOL_PRINTER_INFO_LEVEL info;
- DEVMODE_CTR devmode_ctr;
- SEC_DESC_BUF *secdesc_ctr;
- uint32 user_switch;
- SPOOL_USER_CTR user_ctr;
-}
-SPOOL_Q_ADDPRINTEREX;
-
-typedef struct spool_r_addprinterex
-{
- POLICY_HND handle;
- WERROR status;
-}
-SPOOL_R_ADDPRINTEREX;
-
-
-typedef struct spool_q_addprinterdriver
-{
- uint32 server_name_ptr;
- UNISTR2 server_name;
- uint32 level;
- SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
-}
-SPOOL_Q_ADDPRINTERDRIVER;
-
-typedef struct spool_r_addprinterdriver
-{
- WERROR status;
-}
-SPOOL_R_ADDPRINTERDRIVER;
-
-typedef struct spool_q_addprinterdriverex
-{
- uint32 server_name_ptr;
- UNISTR2 server_name;
- uint32 level;
- SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
- uint32 copy_flags;
-}
-SPOOL_Q_ADDPRINTERDRIVEREX;
-
-typedef struct spool_r_addprinterdriverex
-{
- WERROR status;
-}
-SPOOL_R_ADDPRINTERDRIVEREX;
-
-
-typedef struct driver_directory_1
-{
- UNISTR name;
-}
-DRIVER_DIRECTORY_1;
-
-typedef struct driver_info_ctr_info
-{
- DRIVER_DIRECTORY_1 *info1;
-}
-DRIVER_DIRECTORY_CTR;
-
-typedef struct spool_q_getprinterdriverdirectory
-{
- uint32 name_ptr;
- UNISTR2 name;
- uint32 environment_ptr;
- UNISTR2 environment;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_GETPRINTERDRIVERDIR;
-
-typedef struct spool_r_getprinterdriverdirectory
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETPRINTERDRIVERDIR;
-
-typedef struct spool_q_addprintprocessor
-{
- uint32 server_ptr;
- UNISTR2 server;
- UNISTR2 environment;
- UNISTR2 path;
- UNISTR2 name;
-}
-SPOOL_Q_ADDPRINTPROCESSOR;
-
-typedef struct spool_r_addprintprocessor
-{
- WERROR status;
-}
-SPOOL_R_ADDPRINTPROCESSOR;
-
-
-typedef struct spool_q_enumprintprocessors
-{
- uint32 name_ptr;
- UNISTR2 name;
- uint32 environment_ptr;
- UNISTR2 environment;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMPRINTPROCESSORS;
-
-typedef struct printprocessor_1
-{
- UNISTR name;
-}
-PRINTPROCESSOR_1;
-
-typedef struct spool_r_enumprintprocessors
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTPROCESSORS;
-
-typedef struct spool_q_enumprintprocdatatypes
-{
- uint32 name_ptr;
- UNISTR2 name;
- uint32 processor_ptr;
- UNISTR2 processor;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMPRINTPROCDATATYPES;
-
-typedef struct ppdatatype_1
-{
- UNISTR name;
-}
-PRINTPROCDATATYPE_1;
-
-typedef struct spool_r_enumprintprocdatatypes
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTPROCDATATYPES;
-
-typedef struct printmonitor_1
-{
- UNISTR name;
-}
-PRINTMONITOR_1;
-
-typedef struct printmonitor_2
-{
- UNISTR name;
- UNISTR environment;
- UNISTR dll_name;
-}
-PRINTMONITOR_2;
-
-typedef struct spool_q_enumprintmonitors
-{
- uint32 name_ptr;
- UNISTR2 name;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_ENUMPRINTMONITORS;
-
-typedef struct spool_r_enumprintmonitors
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTMONITORS;
-
-
-typedef struct spool_q_enumprinterdata
-{
- POLICY_HND handle;
- uint32 index;
- uint32 valuesize;
- uint32 datasize;
-}
-SPOOL_Q_ENUMPRINTERDATA;
-
-typedef struct spool_r_enumprinterdata
-{
- uint32 valuesize;
- uint16 *value;
- uint32 realvaluesize;
- uint32 type;
- uint32 datasize;
- uint8 *data;
- uint32 realdatasize;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERDATA;
-
-typedef struct spool_q_setprinterdata
-{
- POLICY_HND handle;
- UNISTR2 value;
- uint32 type;
- uint32 max_len;
- uint8 *data;
- uint32 real_len;
- uint32 numeric_data;
-}
-SPOOL_Q_SETPRINTERDATA;
-
-typedef struct spool_r_setprinterdata
-{
- WERROR status;
-}
-SPOOL_R_SETPRINTERDATA;
-
-typedef struct spool_q_resetprinter
-{
- POLICY_HND handle;
- uint32 datatype_ptr;
- UNISTR2 datatype;
- DEVMODE_CTR devmode_ctr;
-
-} SPOOL_Q_RESETPRINTER;
-
-typedef struct spool_r_resetprinter
-{
- WERROR status;
-}
-SPOOL_R_RESETPRINTER;
-
-
-
-typedef struct _form
-{
- uint32 flags;
- uint32 name_ptr;
- uint32 size_x;
- uint32 size_y;
- uint32 left;
- uint32 top;
- uint32 right;
- uint32 bottom;
- UNISTR2 name;
-}
-FORM;
-
-typedef struct spool_q_addform
-{
- POLICY_HND handle;
- uint32 level;
- uint32 level2; /* This should really be part of the FORM structure */
- FORM form;
-}
-SPOOL_Q_ADDFORM;
-
-typedef struct spool_r_addform
-{
- WERROR status;
-}
-SPOOL_R_ADDFORM;
-
-typedef struct spool_q_setform
-{
- POLICY_HND handle;
- UNISTR2 name;
- uint32 level;
- uint32 level2;
- FORM form;
-}
-SPOOL_Q_SETFORM;
-
-typedef struct spool_r_setform
-{
- WERROR status;
-}
-SPOOL_R_SETFORM;
-
-typedef struct spool_q_deleteform
-{
- POLICY_HND handle;
- UNISTR2 name;
-}
-SPOOL_Q_DELETEFORM;
-
-typedef struct spool_r_deleteform
-{
- WERROR status;
-}
-SPOOL_R_DELETEFORM;
-
-typedef struct spool_q_getjob
-{
- POLICY_HND handle;
- uint32 jobid;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_GETJOB;
-
-typedef struct pjob_info_info
-{
- union
- {
- JOB_INFO_1 *job_info_1;
- JOB_INFO_2 *job_info_2;
- void *info;
- }
- job;
-
-}
-PJOB_INFO;
-
-typedef struct spool_r_getjob
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETJOB;
-
-typedef struct spool_q_replyopenprinter
-{
- UNISTR2 string;
- uint32 printer;
- uint32 type;
- uint32 unknown0;
- uint32 unknown1;
-}
-SPOOL_Q_REPLYOPENPRINTER;
-
-typedef struct spool_r_replyopenprinter
-{
- POLICY_HND handle;
- WERROR status;
-}
-SPOOL_R_REPLYOPENPRINTER;
-
-typedef struct spool_q_routerreplyprinter
-{
- POLICY_HND handle;
- uint32 condition;
- uint32 unknown1; /* 0x00000001 */
- uint32 change_id;
- uint8 unknown2[5]; /* 0x0000000001 */
-}
-SPOOL_Q_ROUTERREPLYPRINTER;
-
-typedef struct spool_r_routerreplyprinter
-{
- WERROR status;
-}
-SPOOL_R_ROUTERREPLYPRINTER;
-
-typedef struct spool_q_replycloseprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_REPLYCLOSEPRINTER;
-
-typedef struct spool_r_replycloseprinter
-{
- POLICY_HND handle;
- WERROR status;
-}
-SPOOL_R_REPLYCLOSEPRINTER;
-
-typedef struct spool_q_rrpcn
-{
- POLICY_HND handle;
- uint32 change_low;
- uint32 change_high;
- uint32 unknown0;
- uint32 unknown1;
- uint32 info_ptr;
- SPOOL_NOTIFY_INFO info;
-}
-SPOOL_Q_REPLY_RRPCN;
-
-typedef struct spool_r_rrpcn
-{
- uint32 unknown0;
- WERROR status;
-}
-SPOOL_R_REPLY_RRPCN;
-
-typedef struct spool_q_getprinterdataex
-{
- POLICY_HND handle;
- UNISTR2 keyname;
- UNISTR2 valuename;
- uint32 size;
-}
-SPOOL_Q_GETPRINTERDATAEX;
-
-typedef struct spool_r_getprinterdataex
-{
- uint32 type;
- uint32 size;
- uint8 *data;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETPRINTERDATAEX;
-
-typedef struct spool_q_setprinterdataex
-{
- POLICY_HND handle;
- UNISTR2 key;
- UNISTR2 value;
- uint32 type;
- uint32 max_len;
- uint8 *data;
- uint32 real_len;
- uint32 numeric_data;
-}
-SPOOL_Q_SETPRINTERDATAEX;
-
-typedef struct spool_r_setprinterdataex
-{
- WERROR status;
-}
-SPOOL_R_SETPRINTERDATAEX;
-
-
-typedef struct spool_q_deleteprinterdataex
-{
- POLICY_HND handle;
- UNISTR2 keyname;
- UNISTR2 valuename;
-}
-SPOOL_Q_DELETEPRINTERDATAEX;
-
-typedef struct spool_r_deleteprinterdataex
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDATAEX;
-
-
-typedef struct spool_q_enumprinterkey
-{
- POLICY_HND handle;
- UNISTR2 key;
- uint32 size;
-}
-SPOOL_Q_ENUMPRINTERKEY;
-
-typedef struct spool_r_enumprinterkey
-{
- BUFFER5 keys;
- uint32 needed; /* in bytes */
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERKEY;
-
-typedef struct spool_q_deleteprinterkey
-{
- POLICY_HND handle;
- UNISTR2 keyname;
-}
-SPOOL_Q_DELETEPRINTERKEY;
-
-typedef struct spool_r_deleteprinterkey
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERKEY;
-
-typedef struct printer_enum_values
-{
- UNISTR valuename;
- uint32 value_len;
- uint32 type;
- uint8 *data;
- uint32 data_len;
-
-}
-PRINTER_ENUM_VALUES;
-
-typedef struct printer_enum_values_ctr
-{
- uint32 size;
- uint32 size_of_array;
- PRINTER_ENUM_VALUES *values;
-}
-PRINTER_ENUM_VALUES_CTR;
-
-typedef struct spool_q_enumprinterdataex
-{
- POLICY_HND handle;
- UNISTR2 key;
- uint32 size;
-}
-SPOOL_Q_ENUMPRINTERDATAEX;
-
-typedef struct spool_r_enumprinterdataex
-{
- PRINTER_ENUM_VALUES_CTR ctr;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERDATAEX;
-
-typedef struct printprocessor_directory_1
-{
- UNISTR name;
-}
-PRINTPROCESSOR_DIRECTORY_1;
-
-typedef struct spool_q_getprintprocessordirectory
-{
- UNISTR2 name;
- UNISTR2 environment;
- uint32 level;
- NEW_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
-
-typedef struct spool_r_getprintprocessordirectory
-{
- NEW_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETPRINTPROCESSORDIRECTORY;
-
-#define PRINTER_DRIVER_VERSION 2
-#define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
-
-#endif /* _RPC_SPOOLSS_H */
-
diff --git a/source4/include/rpc_srvsvc.h b/source4/include/rpc_srvsvc.h
deleted file mode 100644
index 94d23bb4bc..0000000000
--- a/source4/include/rpc_srvsvc.h
+++ /dev/null
@@ -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 */
diff --git a/source4/include/rpc_wkssvc.h b/source4/include/rpc_wkssvc.h
deleted file mode 100644
index adc37c255b..0000000000
--- a/source4/include/rpc_wkssvc.h
+++ /dev/null
@@ -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 */
-
diff --git a/source4/include/smb.h b/source4/include/smb.h
index e9f09ce0a5..b8dd030c63 100644
--- a/source4/include/smb.h
+++ b/source4/include/smb.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
{