ipa-otpd: make auth_type_is(), get_string() and get_string_array() public

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Sumit Bose authored and Florence Blanc-Renaud committed 2023-06-01 08:20:37 +02:00
1 parent e7a69b3d9f
commit 62e28e4247
3 files changed
+15 -5

No files matched your search

+10
View File
@@ -24,6 +24,8 @@
#include "krad.h"
#include <stdbool.h>
#include <ldap.h>
#include <errno.h>
@@ -164,6 +166,14 @@ void otpd_log_err_(const char * const file, int line, krb5_error_code code,
int add_krad_attr_to_set(krad_packet *req, krad_attrset *attrset,
krb5_data *datap, krad_attr attr, const char *message);
int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
char **out);
int get_string_array(LDAP *ldp, LDAPMessage *entry, const char *name,
char ***out);
bool auth_type_is(char **auth_types, const char *check);
krb5_error_code otpd_queue_item_new(krad_packet *req,
struct otpd_queue_item **item);
+4 -4
View File
@@ -34,8 +34,8 @@
#define DEFAULT_RETRIES 3
/* Convert an LDAP entry into an allocated string. */
static int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
char **out)
int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
char **out)
{
struct berval **vals;
ber_len_t i;
@@ -69,8 +69,8 @@ static int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
}
/* Convert an LDAP entry into an allocated string array. */
static int get_string_array(LDAP *ldp, LDAPMessage *entry, const char *name,
char ***out)
int get_string_array(LDAP *ldp, LDAPMessage *entry, const char *name,
char ***out)
{
struct berval **vals;
ber_len_t i;
+1 -1
View File
@@ -69,7 +69,7 @@ static char *idp[] = {
NULL
};
static bool auth_type_is(char **auth_types, const char *check)
bool auth_type_is(char **auth_types, const char *check)
{
size_t c;