diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
commit | 9306e227fc7b1b096d4a58f8c06da66603a50a6a (patch) | |
tree | 0f4089b0487bb8d6514fcfb79fdd352ebcd527a9 /pith/ldap.h | |
parent | 28063ac494a640111f4483e85f968ee45b4213de (diff) | |
download | alpine-9306e227fc7b1b096d4a58f8c06da66603a50a6a.tar.xz |
* new version 2.20.9.
* Add command line argument -smimedir, which allows to specify
the default path for a directory that contains the public, private,
and ca directories. This is useful in case a user has a backup of
old certificates that cannot be installed in the ~/.alpine-smime
dir.
* Update to alpine man page to include documentation on missing command
line options such as -nowrite_password_cache, -passfile, -pwdcertdir,
and -smimedir.
* Various changes in the code to quell some compiler issued warnings in
Mac OSX. Reported by Joe St Sauver. This includes the removing
deprecated ldap functions from the code and the test in the configure
script. The switch to not deprecated functions is done by the use of
the belvar structure, which is not completely appropriate for what we
are doing, but it is sufficient for our needs. The berval structure
is more appropriate for binary data, but it works well with string
data, which is what we need.
* Various changes in the code to quell some warnings issued by clang
3.5.
Diffstat (limited to 'pith/ldap.h')
-rw-r--r-- | pith/ldap.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pith/ldap.h b/pith/ldap.h index 43a5120d..ee9b8b87 100644 --- a/pith/ldap.h +++ b/pith/ldap.h @@ -67,7 +67,7 @@ typedef struct ldap_serv { * ldap_get_dn * ldap_first_attribute * ldap_next_attribute - * ldap_get_values + * ldap_get_values_len * We call those from a half dozen functions. We could fix it by * having a directory-character-set per server and passing that around * in the LDAP_SERV_RES_S structure, I think. For now, let's go with @@ -114,6 +114,14 @@ typedef enum {AlwaysDisplay, DisplayForURL } LDAPLookupStyle; +#define ALPINE_LDAP_can_use_num(X, Y) \ + ((X) != NULL && (X)[(Y)] != NULL \ + && (X)[(Y)]->bv_val != NULL \ + && (X)[(Y)]->bv_val[0] != '\0') + +#define ALPINE_LDAP_can_use(X) ALPINE_LDAP_can_use_num((X), 0) +#define ALPINE_LDAP_usable(X, Y) ((Y) < ldap_count_values_len((X)) \ + && ALPINE_LDAP_can_use_num((X), (Y))) #define LDAP_TYPE_CN 0 #define LDAP_TYPE_SUR 1 @@ -162,6 +170,7 @@ ADDRESS *wp_lookups(char *, WP_ERR_S *, int); int ldap_lookup_all(char *, int, int, LDAPLookupStyle, CUSTOM_FILT_S *, LDAP_CHOOSE_S **, WP_ERR_S *, LDAP_SERV_RES_S **); char *ldap_translate(char *, LDAP_SERV_S *); +char **berval_to_array(struct berval **); ADDRESS *address_from_ldap(LDAP_CHOOSE_S *); LDAP_SERV_S *break_up_ldap_server(char *); void free_ldap_server_info(LDAP_SERV_S **); |