This file is indexed.

/usr/include/libinfinity-0.7/libinfinity/common/inf-sasl-context.h is in libinfinity-0.7-dev 0.7.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/* libinfinity - a GObject-based infinote implementation
 * Copyright (C) 2007-2015 Armin Burgmeier <armin@arbur.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */

#ifndef __INF_SASL_CONTEXT_H__
#define __INF_SASL_CONTEXT_H__

#include <libinfinity/common/inf-io.h>

#include <glib-object.h>

#include <gsasl.h>

G_BEGIN_DECLS

#define INF_TYPE_SASL_CONTEXT                (inf_sasl_context_get_type())

/**
 * InfSaslContext:
 *
 * #InfSaslContext is an opaque data type. You should only access it via the
 * public API functions.
 */
typedef struct _InfSaslContext InfSaslContext;

/**
 * InfSaslContextSession: (foreign)
 *
 * #InfSaslContextSession represents an ongoing authentication session. Create
 * with inf_sasl_context_server_start_session() or
 * inf_sasl_context_client_start_session().
 */
typedef struct _InfSaslContextSession InfSaslContextSession;

/**
 * InfSaslContextCallbackFunc:
 * @session: A #InfSaslContextSession.
 * @property: The property requested.
 * @session_data: The session data for session specified in
 * inf_sasl_context_server_start_session() or
 * inf_sasl_context_client_start_session().
 * @user_data: The user data specified in inf_sasl_context_set_callback().
 *
 * This callback is called whenever a property is required to proceed with
 * authentication. For example, when a password is required, the callback is
 * called with @property set to %GSASL_PASSCODE.
 *
 * The function is then expected to set that property using
 * inf_sasl_context_session_set_property() and, once it is done, call
 * inf_sasl_context_session_continue(). This can happen fully asynchronously,
 * that is it does not need to take place directly within the callback but the
 * callback can, for example, open a dialog for the user to enter a password
 * and then once the user closes the dialog call the two functions mentioned
 * above.
 */
typedef void(*InfSaslContextCallbackFunc)(InfSaslContextSession* session,
                                          Gsasl_property property,
                                          gpointer session_data,
                                          gpointer user_data);

/**
 * InfSaslContextSessionFeedFunc:
 * @session: A #InfSaslContextSession.
 * @data: The response to the fed data, base64 encoded and null-terminated.
 * @needs_more: If %TRUE then inf_sasl_context_session_feed() needs to be
 * called again with more data, otherwise the authentication has finished.
 * @error: This is nonzero if an error occured while processing the input
 * data.
 * @user_data: The user data specified in inf_sasl_context_session_feed().
 *
 * This function is called in response to inf_sasl_context_session_feed().
 * When all required properties (if any) have been provided by the callback
 * function then this function is called with the response to send to the
 * remote site.
 *
 * If an error occurred then @error will be set and @data will be %NULL.
 */
typedef void(*InfSaslContextSessionFeedFunc)(InfSaslContextSession* session,
                                             const char* data,
                                             gboolean needs_more,
                                             const GError* error,
                                             gpointer user_data);

GType
inf_sasl_context_get_type(void) G_GNUC_CONST;

InfSaslContext*
inf_sasl_context_new(GError** error);

InfSaslContext*
inf_sasl_context_ref(InfSaslContext* context);

void
inf_sasl_context_unref(InfSaslContext* context);

void
inf_sasl_context_set_callback(InfSaslContext* context,
                              InfSaslContextCallbackFunc callback,
                              gpointer user_data,
                              GDestroyNotify notify);

InfSaslContextSession*
inf_sasl_context_client_start_session(InfSaslContext* context,
                                      InfIo* io,
                                      const char* mech,
                                      gpointer session_data,
                                      GError** error);

char*
inf_sasl_context_client_list_mechanisms(InfSaslContext* context,
                                        GError** error);

gboolean
inf_sasl_context_client_supports_mechanism(InfSaslContext* context,
                                           const char* mech);

const char*
inf_sasl_context_client_suggest_mechanism(InfSaslContext* context,
                                          const char* mechanisms);

InfSaslContextSession*
inf_sasl_context_server_start_session(InfSaslContext* context,
                                      InfIo* io,
                                      const char* mech,
                                      gpointer session_data,
                                      GError** error);

char*
inf_sasl_context_server_list_mechanisms(InfSaslContext* context,
                                        GError** error);

gboolean
inf_sasl_context_server_supports_mechanism(InfSaslContext* context,
                                           const char* mech);

void
inf_sasl_context_stop_session(InfSaslContext* context,
                              InfSaslContextSession* session);

const char*
inf_sasl_context_session_get_property(InfSaslContextSession* session,
                                      Gsasl_property prop);

void
inf_sasl_context_session_set_property(InfSaslContextSession* session,
                                      Gsasl_property prop,
                                      const char* value);

void
inf_sasl_context_session_continue(InfSaslContextSession* session,
                                  int retval);

void
inf_sasl_context_session_feed(InfSaslContextSession* session,
                              const char* data,
                              InfSaslContextSessionFeedFunc func,
                              gpointer user_data);

gboolean
inf_sasl_context_session_is_processing(InfSaslContextSession* session);

G_END_DECLS

#endif /* __INF_SASL_CONTEXT_H__ */

/* vim:set et sw=2 ts=2: */