~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source4/heimdal/lib/krb5/krb5_locl.h

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + 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.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + 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.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * (Royal Institute of Technology, Stockholm, Sweden).
4
4
 * All rights reserved.
5
5
 *
 
6
 * Portions Copyright (c) 2009 Apple Inc. All rights reserved.
 
7
 *
6
8
 * Redistribution and use in source and binary forms, with or without
7
9
 * modification, are permitted provided that the following conditions
8
10
 * are met:
45
47
#include <stdlib.h>
46
48
#include <limits.h>
47
49
 
 
50
#include <krb5-types.h>
 
51
 
48
52
#ifdef HAVE_SYS_TYPES_H
49
53
#include <sys/types.h>
50
54
#endif
114
118
#include <sys/file.h>
115
119
#endif
116
120
 
 
121
#include <com_err.h>
 
122
 
 
123
#include <heimbase.h>
 
124
 
117
125
#define HEIMDAL_TEXTDOMAIN "heimdal_krb5"
118
126
 
119
127
#ifdef LIBINTL
151
159
struct send_to_kdc;
152
160
 
153
161
/* XXX glue for pkinit */
 
162
struct hx509_certs_data;
154
163
struct krb5_pk_identity;
155
164
struct krb5_pk_cert;
156
165
struct ContentInfo;
169
178
#ifdef PKINIT
170
179
#include <hx509.h>
171
180
#endif
 
181
 
 
182
#include "crypto.h"
 
183
 
172
184
#include <krb5-private.h>
173
185
 
174
186
#include "heim_threads.h"
176
188
#define ALLOC(X, N) (X) = calloc((N), sizeof(*(X)))
177
189
#define ALLOC_SEQ(X, N) do { (X)->len = (N); ALLOC((X)->val, (N)); } while(0)
178
190
 
 
191
#ifndef PATH_SEP
 
192
#define PATH_SEP ":"
 
193
#endif
 
194
 
179
195
/* should this be public? */
180
196
#define KEYTAB_DEFAULT "FILE:" SYSCONFDIR "/krb5.keytab"
181
197
#define KEYTAB_DEFAULT_MODIFY "FILE:" SYSCONFDIR "/krb5.keytab"
182
198
 
 
199
 
183
200
#define MODULI_FILE SYSCONFDIR "/krb5.moduli"
184
201
 
185
202
#ifndef O_BINARY
195
212
#endif
196
213
 
197
214
 
198
 
#define KRB5_BUFSIZ 1024
 
215
#define KRB5_BUFSIZ 2048
199
216
 
200
217
typedef enum {
201
218
    KRB5_INIT_CREDS_TRISTATE_UNSET = 0,
216
233
    int flags;
217
234
#define KRB5_INIT_CREDS_CANONICALIZE            1
218
235
#define KRB5_INIT_CREDS_NO_C_CANON_CHECK        2
 
236
#define KRB5_INIT_CREDS_NO_C_NO_EKU_CHECK       4
219
237
    struct {
220
238
        krb5_gic_process_last_req func;
221
239
        void *ctx;
234
252
    krb5_config_section *cf;
235
253
    struct et_list *et_list;
236
254
    struct krb5_log_facility *warn_dest;
237
 
    krb5_cc_ops *cc_ops;
 
255
    struct krb5_log_facility *debug_dest;
 
256
    const krb5_cc_ops **cc_ops;
238
257
    int num_cc_ops;
239
258
    const char *http_proxy;
240
259
    const char *time_fmt;
263
282
#define KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME    1
264
283
#define KRB5_CTX_F_CHECK_PAC                    2
265
284
#define KRB5_CTX_F_HOMEDIR_ACCESS               4
 
285
#define KRB5_CTX_F_SOCKETS_INITIALIZED          8
 
286
#define KRB5_CTX_F_RD_REQ_IGNORE                16
266
287
    struct send_to_kdc *send_to_kdc;
 
288
#ifdef PKINIT
 
289
    hx509_context hx509ctx;
 
290
#endif
267
291
} krb5_context_data;
268
292
 
 
293
#ifndef KRB5_USE_PATH_TOKENS
269
294
#define KRB5_DEFAULT_CCNAME_FILE "FILE:/tmp/krb5cc_%{uid}"
 
295
#else
 
296
#define KRB5_DEFAULT_CCNAME_FILE "FILE:%{TEMP}/krb5cc_%{uid}"
 
297
#endif
270
298
#define KRB5_DEFAULT_CCNAME_API "API:"
271
 
#define KRB5_DEFAULT_CCNAME_KCM "KCM:%{uid}"
 
299
#define KRB5_DEFAULT_CCNAME_KCM_KCM "KCM:%{uid}"
 
300
#define KRB5_DEFAULT_CCNAME_KCM_API "API:%{uid}"
272
301
 
273
302
#define EXTRACT_TICKET_ALLOW_CNAME_MISMATCH             1
274
303
#define EXTRACT_TICKET_ALLOW_SERVER_MISMATCH            2
275
304
#define EXTRACT_TICKET_MATCH_REALM                      4
276
305
#define EXTRACT_TICKET_AS_REQ                           8
 
306
#define EXTRACT_TICKET_TIMESYNC                         16
277
307
 
278
308
/*
279
309
 * Configurable options
291
321
#define KRB5_ADDRESSLESS_DEFAULT TRUE
292
322
#endif
293
323
 
 
324
#ifndef KRB5_FORWARDABLE_DEFAULT
 
325
#define KRB5_FORWARDABLE_DEFAULT TRUE
 
326
#endif
 
327
 
294
328
#ifdef PKINIT
295
329
 
296
330
struct krb5_pk_identity {
297
 
    hx509_context hx509ctx;
298
331
    hx509_verify_ctx verify_ctx;
299
332
    hx509_certs certs;
300
333
    hx509_cert cert;
301
334
    hx509_certs anchors;
302
335
    hx509_certs certpool;
303
336
    hx509_revoke_ctx revokectx;
 
337
    int flags;
 
338
#define PKINIT_BTMM 1
304
339
};
305
340
 
306
341
enum krb5_pk_type {