View | Details | Raw Unified | Return to bug 286296 | Differences between
and this patch

Collapse All | Expand All

(-)vendor/github.com/msteinert/pam/v2/errors.go (-9 lines)
Lines 77-91 const ( Link Here
77
	ErrAuthtokExpired Error = C.PAM_AUTHTOK_EXPIRED
77
	ErrAuthtokExpired Error = C.PAM_AUTHTOK_EXPIRED
78
	// ErrModuleUnknown indicates a module is not known.
78
	// ErrModuleUnknown indicates a module is not known.
79
	ErrModuleUnknown Error = C.PAM_MODULE_UNKNOWN
79
	ErrModuleUnknown Error = C.PAM_MODULE_UNKNOWN
80
	// ErrBadItem indicates a bad item passed to pam_*_item().
81
	ErrBadItem Error = C.PAM_BAD_ITEM
82
	// ErrConvAgain indicates a conversation function is event driven and data
83
	// is not available yet.
84
	ErrConvAgain Error = C.PAM_CONV_AGAIN
85
	// ErrIncomplete indicates to please call this function again to complete
86
	// authentication stack. Before calling again, verify that conversation
87
	// is completed.
88
	ErrIncomplete Error = C.PAM_INCOMPLETE
89
)
80
)
90
81
91
// Error returns the error message for the given status.
82
// Error returns the error message for the given status.
(-)vendor/github.com/msteinert/pam/v2/errors_linux.go (+21 lines)
Line 0 Link Here
1
//go:build linux
2
3
package pam
4
5
/*
6
#include <security/pam_appl.h>
7
*/
8
import "C"
9
10
// Pam Return types
11
const (
12
	// ErrBadItem indicates a bad item passed to pam_*_item().
13
	ErrBadItem Error = C.PAM_BAD_ITEM
14
	// ErrConvAgain indicates a conversation function is event driven and data
15
	// is not available yet.
16
	ErrConvAgain Error = C.PAM_CONV_AGAIN
17
	// ErrIncomplete indicates to please call this function again to complete
18
	// authentication stack. Before calling again, verify that conversation
19
	// is completed.
20
	ErrIncomplete Error = C.PAM_INCOMPLETE
21
)
(-)vendor/github.com/msteinert/pam/v2/transaction.c (+15 lines)
Lines 47-61 void init_pam_conv(struct pam_conv *conv, uintptr_t ap Link Here
47
	conv->appdata_ptr = (void *)appdata;
47
	conv->appdata_ptr = (void *)appdata;
48
}
48
}
49
49
50
#ifdef OPENPAM
51
int pam_start_confdir(const char *service_name, const char *user, const struct pam_conv *pam_conversation,
52
		      const char *confdir, pam_handle_t **pamh)
53
{
54
	if (pamh != NULL)
55
		*pamh = NULL;
56
57
	return PAM_SYSTEM_ERR;
58
}
59
#else
50
// pam_start_confdir is a recent PAM api to declare a confdir (mostly for
60
// pam_start_confdir is a recent PAM api to declare a confdir (mostly for
51
// tests) weaken the linking dependency to detect if it’s present.
61
// tests) weaken the linking dependency to detect if it’s present.
52
int pam_start_confdir(const char *service_name, const char *user, const struct pam_conv *pam_conversation,
62
int pam_start_confdir(const char *service_name, const char *user, const struct pam_conv *pam_conversation,
53
		      const char *confdir, pam_handle_t **pamh) __attribute__((weak));
63
		      const char *confdir, pam_handle_t **pamh) __attribute__((weak));
64
#endif
54
65
55
int check_pam_start_confdir(void)
66
int check_pam_start_confdir(void)
56
{
67
{
68
#ifdef OPENPAM
69
	return 1;
70
#else
57
	if (pam_start_confdir == NULL)
71
	if (pam_start_confdir == NULL)
58
		return 1;
72
		return 1;
59
73
60
	return 0;
74
	return 0;
75
#endif
61
}
76
}
(-)vendor/github.com/msteinert/pam/v2/transaction.go (-8 lines)
Lines 257-270 const ( Link Here
257
	Ruser Item = C.PAM_RUSER
257
	Ruser Item = C.PAM_RUSER
258
	// UserPrompt is the string use to prompt for a username.
258
	// UserPrompt is the string use to prompt for a username.
259
	UserPrompt Item = C.PAM_USER_PROMPT
259
	UserPrompt Item = C.PAM_USER_PROMPT
260
	// FailDelay is the app supplied function to override failure delays.
261
	FailDelay Item = C.PAM_FAIL_DELAY
262
	// Xdisplay is the X display name
263
	Xdisplay Item = C.PAM_XDISPLAY
264
	// Xauthdata is the X server authentication data.
265
	Xauthdata Item = C.PAM_XAUTHDATA
266
	// AuthtokType is the type for pam_get_authtok
267
	AuthtokType Item = C.PAM_AUTHTOK_TYPE
268
)
260
)
269
261
270
// SetItem sets a PAM information item.
262
// SetItem sets a PAM information item.
(-)vendor/github.com/msteinert/pam/v2/transaction_linux.go (+20 lines)
Line 0 Link Here
1
//go:build linux
2
3
package pam
4
5
/*
6
#include <security/pam_appl.h>
7
*/
8
import "C"
9
10
// PAM Item types.
11
const (
12
	// FailDelay is the app supplied function to override failure delays.
13
	FailDelay Item = C.PAM_FAIL_DELAY
14
	// Xdisplay is the X display name
15
	Xdisplay Item = C.PAM_XDISPLAY
16
	// Xauthdata is the X server authentication data.
17
	Xauthdata Item = C.PAM_XAUTHDATA
18
	// AuthtokType is the type for pam_get_authtok
19
	AuthtokType Item = C.PAM_AUTHTOK_TYPE
20
)

Return to bug 286296