This is a security audit change of the main source.
[jra/samba/.git] / source3 / include / rpc_reg.h
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    SMB parameters and setup
5    Copyright (C) Andrew Tridgell 1992-1997
6    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7    Copyright (C) Paul Ashton 1997
8    
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24 #ifndef _RPC_REG_H /* _RPC_REG_H */
25 #define _RPC_REG_H 
26
27
28 /* winreg pipe defines */
29 #define REG_OPEN_POLICY     0x02
30 #define REG_OPEN_ENTRY      0x0f
31 #define REG_INFO            0x11
32 #define REG_CLOSE           0x05
33
34 /* REG_Q_OPEN_POLICY */
35 typedef struct q_reg_open_policy_info
36 {
37         uint32 ptr;
38         uint16 unknown_0; /* 0x5da0      - 16 bit unknown */
39         uint32 level;     /* 0x0000 0001 - 32 bit unknown */
40         uint16 unknown_1; /* 0x0200      - 16 bit unknown */
41
42 } REG_Q_OPEN_POLICY;
43
44 /* REG_R_OPEN_POLICY */
45 typedef struct r_reg_open_policy_info
46 {
47     POLICY_HND pol;       /* policy handle */
48         uint32 status;         /* return status */
49
50 } REG_R_OPEN_POLICY;
51
52
53 /* REG_Q_CLOSE */
54 typedef struct reg_q_close_info
55 {
56         POLICY_HND pol; /* policy handle */
57
58 } REG_Q_CLOSE;
59
60 /* REG_R_CLOSE */
61 typedef struct reg_r_close_info
62 {
63         POLICY_HND pol; /* policy handle.  should be all zeros. */
64
65         uint32 status; /* return code */
66
67 } REG_R_CLOSE;
68
69
70 /* REG_Q_INFO */
71 typedef struct q_reg_info_info
72 {
73     POLICY_HND pol;        /* policy handle */
74
75         UNIHDR  hdr_type;       /* unicode product type header */
76         UNISTR2 uni_type;       /* unicode product type - "ProductType" */
77
78         uint32 ptr1;            /* pointer */
79         NTTIME time;            /* current time? */
80         uint8  major_version1;  /* 0x4 - os major version? */
81         uint8  minor_version1;  /* 0x1 - os minor version? */
82         uint8  pad1[10];        /* padding - zeros */
83
84         uint32 ptr2;            /* pointer */
85         uint8  major_version2;  /* 0x4 - os major version? */
86         uint8  minor_version2;  /* 0x1 - os minor version? */
87         uint8  pad2[2];         /* padding - zeros */
88
89         uint32 ptr3;            /* pointer */
90         uint32 unknown;         /* 0x0000 0000 */
91
92 } REG_Q_INFO;
93
94 /* REG_R_INFO */
95 typedef struct r_reg_info_info
96
97         uint32 ptr1;            /* buffer pointer */
98         uint32 level;          /* 0x1 - info level? */
99
100         uint32     ptr_type;       /* pointer to o/s type */
101         UNINOTSTR2 uni_type;      /* unicode string o/s type - "LanmanNT" */
102
103         uint32 ptr2;           /* pointer to unknown_0 */
104         uint32 unknown_0;      /* 0x12 */
105
106         uint32 ptr3;           /* pointer to unknown_1 */
107         uint32 unknown_1;      /* 0x12 */
108
109         uint32 status;         /* return status */
110
111 } REG_R_INFO;
112
113
114 /* REG_Q_OPEN_ENTRY */
115 typedef struct q_reg_open_entry_info
116 {
117     POLICY_HND pol;        /* policy handle */
118
119         UNIHDR  hdr_name;       /* unicode registry string header */
120         UNISTR2 uni_name;       /* unicode registry string name */
121
122         uint32 unknown_0;       /* 32 bit unknown - 0x0000 0000 */
123         uint16 unknown_1;       /* 16 bit unknown - 0x0000 */
124         uint16 unknown_2;       /* 16 bit unknown - 0x0200 */
125
126 } REG_Q_OPEN_ENTRY;
127
128
129
130 /* REG_R_OPEN_ENTRY */
131 typedef struct r_reg_open_entry_info
132 {
133     POLICY_HND pol;       /* policy handle */
134         uint32 status;         /* return status */
135
136 } REG_R_OPEN_ENTRY;
137
138
139
140 #endif /* _RPC_REG_H */
141