Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 348260 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-18 / +33 lines)
Line  Link Here
0
-- a/camel/camel-sasl-gssapi.c
0
++ b/camel/camel-sasl-gssapi.c
Lines 20-73 Link Here
20
 *
20
 *
21
 */
21
 */
22
22
23
/* If building without Kerberos support, this class is an empty shell. */
24
23
#ifdef HAVE_CONFIG_H
25
#ifdef HAVE_CONFIG_H
24
#include <config.h>
26
#include <config.h>
25
#endif
27
#endif
26
28
27
#include <errno.h>
29
#include <errno.h>
28
30
29
#ifdef HAVE_KRB5
30
#include <netdb.h>
31
#include <netdb.h>
31
#include <string.h>
32
#include <string.h>
32
#include <sys/socket.h>
33
#include <sys/socket.h>
33
#include <sys/types.h>
34
#include <sys/types.h>
35
36
#include <gio/gio.h>
37
#include <glib/gi18n-lib.h>
38
39
#include "camel-net-utils.h"
40
#include "camel-sasl-gssapi.h"
41
#include "camel-session.h"
42
43
#ifdef HAVE_KRB5
44
34
#ifdef HAVE_HEIMDAL_KRB5
45
#ifdef HAVE_HEIMDAL_KRB5
35
#include <krb5.h>
46
#include <krb5.h>
36
#else
47
#else
37
#include <krb5/krb5.h>
48
#include <krb5/krb5.h>
38
#endif
49
#endif /* HAVE_HEIMDAL_KRB5 */
50
39
#ifdef HAVE_ET_COM_ERR_H
51
#ifdef HAVE_ET_COM_ERR_H
40
#include <et/com_err.h>
52
#include <et/com_err.h>
41
#else
53
#else
42
#ifdef HAVE_COM_ERR_H
54
#ifdef HAVE_COM_ERR_H
43
#include <com_err.h>
55
#include <com_err.h>
44
#endif
56
#endif /* HAVE_COM_ERR_H */
45
#endif
57
#endif /* HAVE_ET_COM_ERR_H */
58
46
#ifdef HAVE_MIT_KRB5
59
#ifdef HAVE_MIT_KRB5
47
#include <gssapi/gssapi.h>
60
#include <gssapi/gssapi.h>
48
#include <gssapi/gssapi_generic.h>
61
#include <gssapi/gssapi_generic.h>
49
#endif
62
#endif /* HAVE_MIT_KRB5 */
63
50
#ifdef HAVE_HEIMDAL_KRB5
64
#ifdef HAVE_HEIMDAL_KRB5
51
#include <gssapi.h>
65
#include <gssapi.h>
52
#else
66
#else
53
#ifdef  HAVE_SUN_KRB5
67
#ifdef HAVE_SUN_KRB5
54
#include <gssapi/gssapi.h>
68
#include <gssapi/gssapi.h>
55
#include <gssapi/gssapi_ext.h>
69
#include <gssapi/gssapi_ext.h>
56
extern gss_OID gss_nt_service_name;
70
extern gss_OID gss_nt_service_name;
57
#endif
71
#endif /* HAVE_SUN_KRB5 */
58
#endif
72
#endif /* HAVE_HEIMDAL_KRB5 */
59
73
60
#ifndef GSS_C_OID_KRBV5_DES
74
#ifndef GSS_C_OID_KRBV5_DES
61
#define GSS_C_OID_KRBV5_DES GSS_C_NO_OID
75
#define GSS_C_OID_KRBV5_DES GSS_C_NO_OID
62
#endif
76
#endif
63
77
64
#include <glib/gi18n-lib.h>
65
#include <gio/gio.h>
66
67
#include "camel-net-utils.h"
68
#include "camel-sasl-gssapi.h"
69
#include "camel-session.h"
70
71
#define DBUS_PATH		"/org/gnome/KrbAuthDialog"
78
#define DBUS_PATH		"/org/gnome/KrbAuthDialog"
72
#define DBUS_INTERFACE		"org.gnome.KrbAuthDialog"
79
#define DBUS_INTERFACE		"org.gnome.KrbAuthDialog"
73
#define DBUS_METHOD		"org.gnome.KrbAuthDialog.acquireTgt"
80
#define DBUS_METHOD		"org.gnome.KrbAuthDialog.acquireTgt"
Lines 105-112 struct _CamelSaslGssapiPrivate { Link Here
105
	gss_name_t target;
112
	gss_name_t target;
106
};
113
};
107
114
115
#endif /* HAVE_KRB5 */
116
108
G_DEFINE_TYPE (CamelSaslGssapi, camel_sasl_gssapi, CAMEL_TYPE_SASL)
117
G_DEFINE_TYPE (CamelSaslGssapi, camel_sasl_gssapi, CAMEL_TYPE_SASL)
109
118
119
#ifdef HAVE_KRB5
120
110
static void
121
static void
111
gssapi_set_exception (OM_uint32 major,
122
gssapi_set_exception (OM_uint32 major,
112
                      OM_uint32 minor,
123
                      OM_uint32 minor,
Lines 413-421 sasl_gssapi_challenge (CamelSasl *sasl, Link Here
413
	return challenge;
424
	return challenge;
414
}
425
}
415
426
427
#endif /* HAVE_KRB5 */
428
416
static void
429
static void
417
camel_sasl_gssapi_class_init (CamelSaslGssapiClass *class)
430
camel_sasl_gssapi_class_init (CamelSaslGssapiClass *class)
418
{
431
{
432
#ifdef HAVE_KRB5
419
	GObjectClass *object_class;
433
	GObjectClass *object_class;
420
	CamelSaslClass *sasl_class;
434
	CamelSaslClass *sasl_class;
421
435
Lines 426-441 camel_sasl_gssapi_class_init (CamelSaslG Link Here
426
440
427
	sasl_class = CAMEL_SASL_CLASS (class);
441
	sasl_class = CAMEL_SASL_CLASS (class);
428
	sasl_class->challenge = sasl_gssapi_challenge;
442
	sasl_class->challenge = sasl_gssapi_challenge;
443
#endif /* HAVE_KRB5 */
429
}
444
}
430
445
431
static void
446
static void
432
camel_sasl_gssapi_init (CamelSaslGssapi *sasl)
447
camel_sasl_gssapi_init (CamelSaslGssapi *sasl)
433
{
448
{
449
#ifdef HAVE_KRB5
434
	sasl->priv = CAMEL_SASL_GSSAPI_GET_PRIVATE (sasl);
450
	sasl->priv = CAMEL_SASL_GSSAPI_GET_PRIVATE (sasl);
435
451
436
	sasl->priv->state = GSSAPI_STATE_INIT;
452
	sasl->priv->state = GSSAPI_STATE_INIT;
437
	sasl->priv->ctx = GSS_C_NO_CONTEXT;
453
	sasl->priv->ctx = GSS_C_NO_CONTEXT;
438
	sasl->priv->target = GSS_C_NO_NAME;
454
	sasl->priv->target = GSS_C_NO_NAME;
439
}
440
441
#endif /* HAVE_KRB5 */
455
#endif /* HAVE_KRB5 */
456
}

Return to bug 348260