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

« back to all changes in this revision

Viewing changes to source4/heimdal/lib/gssapi/spnego/external.c

  • 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:
33
33
#include "spnego_locl.h"
34
34
#include <gssapi_mech.h>
35
35
 
36
 
RCSID("$Id$");
37
 
 
38
36
/*
39
37
 * RFC2478, SPNEGO:
40
38
 *  The security mechanism of the initial
42
40
 *  iso.org.dod.internet.security.mechanism.snego (1.3.6.1.5.5.2).
43
41
 */
44
42
 
 
43
static gss_mo_desc spnego_mo[] = {
 
44
    {
 
45
        GSS_C_MA_SASL_MECH_NAME,
 
46
        GSS_MO_MA,
 
47
        "SASL mech name",
 
48
        "SPNEGO",
 
49
        _gss_mo_get_ctx_as_string,
 
50
        NULL
 
51
    },
 
52
    {
 
53
        GSS_C_MA_MECH_NAME,
 
54
        GSS_MO_MA,
 
55
        "Mechanism name",
 
56
        "SPNEGO",
 
57
        _gss_mo_get_ctx_as_string,
 
58
        NULL
 
59
    },
 
60
    {
 
61
        GSS_C_MA_MECH_DESCRIPTION,
 
62
        GSS_MO_MA,
 
63
        "Mechanism description",
 
64
        "Heimdal SPNEGO Mechanism",
 
65
        _gss_mo_get_ctx_as_string,
 
66
        NULL
 
67
    },
 
68
    {
 
69
        GSS_C_MA_MECH_NEGO,
 
70
        GSS_MO_MA
 
71
    },
 
72
    {
 
73
        GSS_C_MA_MECH_PSEUDO,
 
74
        GSS_MO_MA
 
75
    }
 
76
};
 
77
 
45
78
static gssapi_mech_interface_desc spnego_mech = {
46
79
    GMI_VERSION,
47
80
    "spnego",
48
81
    {6, (void *)"\x2b\x06\x01\x05\x05\x02"},
 
82
    0,
49
83
    _gss_spnego_acquire_cred,
50
84
    _gss_spnego_release_cred,
51
85
    _gss_spnego_init_sec_context,
67
101
    _gss_spnego_inquire_cred,
68
102
    _gss_spnego_inquire_context,
69
103
    _gss_spnego_wrap_size_limit,
70
 
    _gss_spnego_add_cred,
 
104
    gss_add_cred,
71
105
    _gss_spnego_inquire_cred_by_mech,
72
106
    _gss_spnego_export_sec_context,
73
107
    _gss_spnego_import_sec_context,
80
114
    _gss_spnego_set_sec_context_option,
81
115
    _gss_spnego_set_cred_option,
82
116
    _gss_spnego_pseudo_random,
83
 
    NULL,
84
 
    NULL,
85
 
    NULL,
 
117
    _gss_spnego_wrap_iov,
 
118
    _gss_spnego_unwrap_iov,
 
119
    _gss_spnego_wrap_iov_length,
86
120
    NULL,
87
121
    _gss_spnego_export_cred,
88
 
    _gss_spnego_import_cred
 
122
    _gss_spnego_import_cred,
 
123
    NULL,
 
124
    NULL,
 
125
    NULL,
 
126
    NULL,
 
127
    NULL,
 
128
    NULL,
 
129
    NULL,
 
130
    spnego_mo,
 
131
    sizeof(spnego_mo) / sizeof(spnego_mo[0])
89
132
};
90
133
 
91
134
gssapi_mech_interface
93
136
{
94
137
        return &spnego_mech;
95
138
}
96
 
 
97
 
static gss_OID_desc _gss_spnego_mechanism_desc =
98
 
    {6, (void *)"\x2b\x06\x01\x05\x05\x02"};
99
 
 
100
 
gss_OID GSS_SPNEGO_MECHANISM = &_gss_spnego_mechanism_desc;