~ubuntu-branches/ubuntu/quantal/samba/quantal

« back to all changes in this revision

Viewing changes to .pc/CVE-2012-1182-2.patch/source3/librpc/gen_ndr/ndr_preg.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-05-15 17:00:56 UTC
  • mfrom: (178.1.1 precise-security) (0.39.27 sid)
  • Revision ID: package-import@ubuntu.com-20120515170056-gludtas4257eb61q
Tags: 2:3.6.5-2ubuntu1
* Merge from Debian unstable, remaining changes: 
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Other changes now in Debian packaging.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.install: install profile.
    - debian/control: have samba suggest ufw.
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba-common-bin.install: install hook.
  + Switch to upstart:
    - Added debian/samba.{nmbd,smbd}.upstart.
    - debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
      Make upstart compatible.
* d/samba.install, d/samba-common-bin.install: Restore apport hook and ufw
  profile (LP: #999764).
* Dropped:
  + debian/patches/CVE-2012-1182-*.patch: fixed in upstream release 3.6.4.
  + debian/patches/CVE-2012-2111.patch: fixed in upstream release 3.6.5.
  + debian/patches/fix-debuglevel-name-conflict.patch: fixed upstream -
    debug_level is no longer used as a global variable name.
  + debian/patches/error-trans.fix-276472: fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* parser auto-generated by pidl */
2
 
 
3
 
#include "includes.h"
4
 
#include "librpc/gen_ndr/ndr_preg.h"
5
 
 
6
 
#include "librpc/gen_ndr/ndr_misc.h"
7
 
_PUBLIC_ enum ndr_err_code ndr_push_preg_entry(struct ndr_push *ndr, int ndr_flags, const struct preg_entry *r)
8
 
{
9
 
        if (ndr_flags & NDR_SCALARS) {
10
 
                NDR_CHECK(ndr_push_align(ndr, 4));
11
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "[", 2, sizeof(uint8_t), CH_DOS));
12
 
                {
13
 
                        uint32_t _flags_save_string = ndr->flags;
14
 
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
15
 
                        NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->keyname));
16
 
                        ndr->flags = _flags_save_string;
17
 
                }
18
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
19
 
                {
20
 
                        uint32_t _flags_save_string = ndr->flags;
21
 
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
22
 
                        NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->valuename));
23
 
                        ndr->flags = _flags_save_string;
24
 
                }
25
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
26
 
                NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type));
27
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
28
 
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
29
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
30
 
                NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
31
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "]", 2, sizeof(uint8_t), CH_DOS));
32
 
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
33
 
        }
34
 
        if (ndr_flags & NDR_BUFFERS) {
35
 
        }
36
 
        return NDR_ERR_SUCCESS;
37
 
}
38
 
 
39
 
_PUBLIC_ enum ndr_err_code ndr_pull_preg_entry(struct ndr_pull *ndr, int ndr_flags, struct preg_entry *r)
40
 
{
41
 
        if (ndr_flags & NDR_SCALARS) {
42
 
                NDR_CHECK(ndr_pull_align(ndr, 4));
43
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_opening_bracket, 2, sizeof(uint8_t), CH_DOS));
44
 
                {
45
 
                        uint32_t _flags_save_string = ndr->flags;
46
 
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
47
 
                        NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->keyname));
48
 
                        ndr->flags = _flags_save_string;
49
 
                }
50
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep1, 2, sizeof(uint8_t), CH_DOS));
51
 
                {
52
 
                        uint32_t _flags_save_string = ndr->flags;
53
 
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
54
 
                        NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->valuename));
55
 
                        ndr->flags = _flags_save_string;
56
 
                }
57
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep2, 2, sizeof(uint8_t), CH_DOS));
58
 
                NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->type));
59
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep3, 2, sizeof(uint8_t), CH_DOS));
60
 
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
61
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep4, 2, sizeof(uint8_t), CH_DOS));
62
 
                NDR_PULL_ALLOC_N(ndr, r->data, r->size);
63
 
                NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
64
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_closing_bracket, 2, sizeof(uint8_t), CH_DOS));
65
 
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
66
 
        }
67
 
        if (ndr_flags & NDR_BUFFERS) {
68
 
        }
69
 
        return NDR_ERR_SUCCESS;
70
 
}
71
 
 
72
 
_PUBLIC_ void ndr_print_preg_entry(struct ndr_print *ndr, const char *name, const struct preg_entry *r)
73
 
{
74
 
        ndr_print_struct(ndr, name, "preg_entry");
75
 
        if (r == NULL) { ndr_print_null(ndr); return; }
76
 
        ndr->depth++;
77
 
        ndr_print_string(ndr, "keyname", r->keyname);
78
 
        ndr_print_string(ndr, "valuename", r->valuename);
79
 
        ndr_print_winreg_Type(ndr, "type", r->type);
80
 
        ndr_print_uint32(ndr, "size", r->size);
81
 
        ndr_print_array_uint8(ndr, "data", r->data, r->size);
82
 
        ndr->depth--;
83
 
}
84
 
 
85
 
_PUBLIC_ enum ndr_err_code ndr_push_preg_header(struct ndr_push *ndr, int ndr_flags, const struct preg_header *r)
86
 
{
87
 
        if (ndr_flags & NDR_SCALARS) {
88
 
                NDR_CHECK(ndr_push_align(ndr, 4));
89
 
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "PReg", 4, sizeof(uint8_t), CH_DOS));
90
 
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
91
 
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
92
 
        }
93
 
        if (ndr_flags & NDR_BUFFERS) {
94
 
        }
95
 
        return NDR_ERR_SUCCESS;
96
 
}
97
 
 
98
 
_PUBLIC_ enum ndr_err_code ndr_pull_preg_header(struct ndr_pull *ndr, int ndr_flags, struct preg_header *r)
99
 
{
100
 
        if (ndr_flags & NDR_SCALARS) {
101
 
                NDR_CHECK(ndr_pull_align(ndr, 4));
102
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->signature, 4, sizeof(uint8_t), CH_DOS));
103
 
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
104
 
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
105
 
        }
106
 
        if (ndr_flags & NDR_BUFFERS) {
107
 
        }
108
 
        return NDR_ERR_SUCCESS;
109
 
}
110
 
 
111
 
_PUBLIC_ void ndr_print_preg_header(struct ndr_print *ndr, const char *name, const struct preg_header *r)
112
 
{
113
 
        ndr_print_struct(ndr, name, "preg_header");
114
 
        if (r == NULL) { ndr_print_null(ndr); return; }
115
 
        ndr->depth++;
116
 
        ndr_print_string(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"PReg":r->signature);
117
 
        ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
118
 
        ndr->depth--;
119
 
}
120
 
 
121
 
_PUBLIC_ void ndr_print_preg_file(struct ndr_print *ndr, const char *name, const struct preg_file *r)
122
 
{
123
 
        uint32_t cntr_entries_0;
124
 
        ndr_print_struct(ndr, name, "preg_file");
125
 
        if (r == NULL) { ndr_print_null(ndr); return; }
126
 
        {
127
 
                uint32_t _flags_save_STRUCT = ndr->flags;
128
 
                ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
129
 
                ndr->depth++;
130
 
                ndr_print_preg_header(ndr, "header", &r->header);
131
 
                ndr_print_uint32(ndr, "num_entries", r->num_entries);
132
 
                ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
133
 
                ndr->depth++;
134
 
                for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
135
 
                        ndr_print_preg_entry(ndr, "entries", &r->entries[cntr_entries_0]);
136
 
                }
137
 
                ndr->depth--;
138
 
                ndr->depth--;
139
 
                ndr->flags = _flags_save_STRUCT;
140
 
        }
141
 
}
142
 
 
143
 
static enum ndr_err_code ndr_push_decode_preg_file(struct ndr_push *ndr, int flags, const struct decode_preg_file *r)
144
 
{
145
 
        if (flags & NDR_IN) {
146
 
                NDR_CHECK(ndr_push_preg_file(ndr, NDR_SCALARS, &r->in.file));
147
 
        }
148
 
        if (flags & NDR_OUT) {
149
 
        }
150
 
        return NDR_ERR_SUCCESS;
151
 
}
152
 
 
153
 
static enum ndr_err_code ndr_pull_decode_preg_file(struct ndr_pull *ndr, int flags, struct decode_preg_file *r)
154
 
{
155
 
        if (flags & NDR_IN) {
156
 
                NDR_CHECK(ndr_pull_preg_file(ndr, NDR_SCALARS, &r->in.file));
157
 
        }
158
 
        if (flags & NDR_OUT) {
159
 
        }
160
 
        return NDR_ERR_SUCCESS;
161
 
}
162
 
 
163
 
_PUBLIC_ void ndr_print_decode_preg_file(struct ndr_print *ndr, const char *name, int flags, const struct decode_preg_file *r)
164
 
{
165
 
        ndr_print_struct(ndr, name, "decode_preg_file");
166
 
        if (r == NULL) { ndr_print_null(ndr); return; }
167
 
        ndr->depth++;
168
 
        if (flags & NDR_SET_VALUES) {
169
 
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
170
 
        }
171
 
        if (flags & NDR_IN) {
172
 
                ndr_print_struct(ndr, "in", "decode_preg_file");
173
 
                ndr->depth++;
174
 
                ndr_print_preg_file(ndr, "file", &r->in.file);
175
 
                ndr->depth--;
176
 
        }
177
 
        if (flags & NDR_OUT) {
178
 
                ndr_print_struct(ndr, "out", "decode_preg_file");
179
 
                ndr->depth++;
180
 
                ndr->depth--;
181
 
        }
182
 
        ndr->depth--;
183
 
}
184
 
 
185
 
static const struct ndr_interface_call preg_calls[] = {
186
 
        {
187
 
                "decode_preg_file",
188
 
                sizeof(struct decode_preg_file),
189
 
                (ndr_push_flags_fn_t) ndr_push_decode_preg_file,
190
 
                (ndr_pull_flags_fn_t) ndr_pull_decode_preg_file,
191
 
                (ndr_print_function_t) ndr_print_decode_preg_file,
192
 
                { 0, NULL },
193
 
                { 0, NULL },
194
 
        },
195
 
        { NULL, 0, NULL, NULL, NULL }
196
 
};
197
 
 
198
 
static const char * const preg_endpoint_strings[] = {
199
 
        "ncacn_np:[\\pipe\\preg]", 
200
 
};
201
 
 
202
 
static const struct ndr_interface_string_array preg_endpoints = {
203
 
        .count  = 1,
204
 
        .names  = preg_endpoint_strings
205
 
};
206
 
 
207
 
static const char * const preg_authservice_strings[] = {
208
 
        "host", 
209
 
};
210
 
 
211
 
static const struct ndr_interface_string_array preg_authservices = {
212
 
        .count  = 1,
213
 
        .names  = preg_authservice_strings
214
 
};
215
 
 
216
 
 
217
 
const struct ndr_interface_table ndr_table_preg = {
218
 
        .name           = "preg",
219
 
        .syntax_id      = {
220
 
                {0x67655250,0x0000,0x0000,{0x00,0x00},{0x00,0x00,0x00,0x00}},
221
 
                NDR_PREG_VERSION
222
 
        },
223
 
        .helpstring     = NDR_PREG_HELPSTRING,
224
 
        .num_calls      = 1,
225
 
        .calls          = preg_calls,
226
 
        .endpoints      = &preg_endpoints,
227
 
        .authservices   = &preg_authservices
228
 
};
229