This file is indexed.

/usr/include/courierauthsasl.h is in courier-authlib-dev 0.66.1-1+b1.

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
#ifndef	courierauthsasl_h
#define	courierauthsasl_h

/*
** Copyright 1998 - 2013 Double Precision, Inc.  See COPYING for
** distribution information.
*/

#include	"courier_auth_config.h"
#include	<sys/types.h>

#ifdef	__cplusplus
extern "C" {
#endif


/*
	These family of functions are used to implement the SASL interface
	on top of authlib.  It is mainly used by the authentication user
	process to build the authentication request data for authmod()
	based upon the SASL challenge/response interaction.
*/

/*
**	auth_sasl searches for the right method, and calls the appropriate
**	sasl function.  authsasl received the following arguments:
**
**	initresponse -- initial response for the authentication request,
**	if provided.  If provided, the actual response MUST BE PROVIDED
**	in initresponse using base64 encoding!!!
**
**	sasl_func -- the callback function which is used to carry out the
**	SASL conversation.  The function receives a single argument, the
**	base64-encoded challenge.  The callback function must return
**	a malloced pointer to the base64-encoded response, or NULL to abort
**	SASL.
**
**	authsasl returns two values, provided via call by reference:
**	the authtype and authdata, suitable for direct arguments to
**	auth_generic().
*/

int auth_sasl(const char *,		/* Method */
	      const char *,		/* Initial response - base64encoded */
	      char *(*)(const char *, void *),
					/* Callback conversation functions */
	      void *,			/* Passthrough arg */
	      char **,			/* Returned - AUTHTYPE */
	      char **);			/* Returned - AUTHDATA */

/*
** auth_sasl_ex() is a version of auth_sasl that takes an extra parameter,
** externalauth. If method is "EXTERNAL" and externalauth is not a NULL pointer
** and does not point to an empty string, it is recognized as a SASL EXTERRNAL
** authentication.
*/

int auth_sasl_ex(const char *method,
		 const char *initresponse,
		 const char *externalauth, /* out-of-band authentified identity */
		 char *(*callback_func)(const char *, void *),
		 void *callback_arg,
		 char **authtype_ptr,
		 char **authdata_ptr);

	/*
	** Given authtype and authdata, return the userid in the authentication
	** request. Returns a malloced buffer.
	*/
char *auth_sasl_extract_userid(const char *authtype,
			       const char *authdata);



	/* INTERNAL FUNCTIONS BELOW */

/*
** The authsasl_info is built dynamically by configure, it lists the supported
** SASL methods.  Each method is implemented by a function that's prototyped
** like this:
**
**  int authsasl_function(const char *method, const char *initresponse,
**      char *(*getresp)(const char *),
**
**	char **authtype,
**	char **authdata)
**
** Normally, there's no need to call the appropriate function directly, as
** authsasl() automatically searches this array, and finds one.
**
*/

struct authsasl_info {
	const char *sasl_method;	/* In uppercase */
	int (*sasl_func)(const char *method, const char *initresponse,
			 char *(*getresp)(const char *, void *),
			 void *,
			 char **,
			 char **);
	} ;

extern struct authsasl_info authsasl_list[];
/* Some convenience functions */

char *authsasl_tobase64(const char *, int);
int authsasl_frombase64(char *);

/* Return values from authsasl */

#define	AUTHSASL_OK	0
#define	AUTHSASL_ERROR	-1	/*
				** System error, usually malloc failure,
				** authsasl reports the error to stderr.
				*/

#define	AUTHSASL_ABORTED -2	/*
				** SASL exchange aborted. authsasl does NOT
				** report any errors.
				*/

#ifdef	__cplusplus
}
#endif

#endif