summaryrefslogtreecommitdiff
path: root/pith/ldap.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-10-27 21:07:45 -0600
committerEduardo Chappa <chappa@washington.edu>2021-10-27 21:07:45 -0600
commit248f45578fcf93b56e3b97c52cfd21b5b84f2a38 (patch)
tree411f3e2e25ebe1e33cbff4994477dc7a18dfa38f /pith/ldap.c
parent4e924cc7aeb4edceb84d43d97f0542539f614cdd (diff)
downloadalpine-248f45578fcf93b56e3b97c52cfd21b5b84f2a38.tar.xz
* Contributions by Thomas Uhle:
. Add support to the LDAP attribute "userCertificate"; . Move voiceMailTelephoneNumber from the TCL side to ldap_translate; . XOAUTH2 state generator changes format specifier from %x to %02x; . Clear compiler warnings and correct spelling in documentation. . Web Alpine will not attempt to continue a postponed message if the postponed-msgs folder is empty.
Diffstat (limited to 'pith/ldap.c')
-rw-r--r--pith/ldap.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/pith/ldap.c b/pith/ldap.c
index c2f2a78c..6ec46c1c 100644
--- a/pith/ldap.c
+++ b/pith/ldap.c
@@ -1903,26 +1903,32 @@ static struct tl_table ldap_trans_table[]={
{"officePhone", N_("Office Telephone")},
{"facsimileTelephoneNumber", N_("FAX Telephone")},
{"mobile", N_("Mobile Telephone")},
+ {"voiceMailTelephoneNumber", N_("Voice Mail")},
{"pager", N_("Pager")},
{"roomNumber", N_("Room Number")},
{"uid", N_("User ID")},
+ {"userCertificate", N_("User Certificate")},
{NULL, NULL}
};
char *
ldap_translate(char *a, LDAP_SERV_S *info_used)
{
+ char *s, *ret_a = a;
int i;
+ if((s = strchr(a, ';')) != NULL)
+ *s = '\0';
+
if(info_used){
if(info_used->mailattr && strucmp(info_used->mailattr, a) == 0)
- return(_(ldap_trans_table[LDAP_MAIL_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_MAIL_ATTR].translated);
else if(info_used->snattr && strucmp(info_used->snattr, a) == 0)
- return(_(ldap_trans_table[LDAP_SN_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_SN_ATTR].translated);
else if(info_used->gnattr && strucmp(info_used->gnattr, a) == 0)
- return(_(ldap_trans_table[LDAP_GN_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_GN_ATTR].translated);
else if(info_used->cnattr && strucmp(info_used->cnattr, a) == 0)
- return(_(ldap_trans_table[LDAP_CN_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_CN_ATTR].translated);
}
for(i = 0; ldap_trans_table[i].ldap_ese; i++){
@@ -1937,10 +1943,13 @@ ldap_translate(char *a, LDAP_SERV_S *info_used)
}
if(strucmp(ldap_trans_table[i].ldap_ese, a) == 0)
- return(_(ldap_trans_table[i].translated));
+ ret_a = _(ldap_trans_table[i].translated);
}
-
- return(a);
+
+ if(s)
+ *s = ';';
+
+ return ret_a;
}
char **