summaryrefslogtreecommitdiff
path: root/pith
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
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')
-rw-r--r--pith/ldap.c23
-rw-r--r--pith/osdep/creatdir.c2
-rw-r--r--pith/pine.hlp13
-rw-r--r--pith/send.c4
4 files changed, 30 insertions, 12 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 **
diff --git a/pith/osdep/creatdir.c b/pith/osdep/creatdir.c
index 1c3a115e..ac97ac38 100644
--- a/pith/osdep/creatdir.c
+++ b/pith/osdep/creatdir.c
@@ -89,7 +89,7 @@ create_random_dir(char *dir, size_t len)
{ int i;
char *s = &dir[strlen(dir) - 6];
for(i = 0; i < 10; i++){
- sprintf(s, "%x%x%x", (unsigned int)(random() % 256), (unsigned int)(random() % 256),
+ sprintf(s, "%02x%02x%02x", (unsigned int)(random() % 256), (unsigned int)(random() % 256),
(unsigned int)(random() % 256));
if(our_mkdir(dir, 0700) == 0) return dir;
}
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 48db2823..85797ab8 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 608 2021-10-24 13:59:38
+Alpine Commit 609 2021-10-27 21:07:40
============= h_news =================
<HTML>
<HEAD>
@@ -198,6 +198,15 @@ new additions to Alpine, please check it periodically.
must contain a draft message. This joint collaboration with Thomas
Uhle modifies alpine to not to attempt to continue a draft message if
the draft folder is empty.
+
+<LI> Contributions by Thomas Uhle:
+<UL>
+ <LI> Add support to the LDAP attribute "userCertificate";
+ <LI> Move voiceMailTelephoneNumber from the TCL side to ldap_translate;
+ <LI> XOAUTH2 state generator changes format specifier from %x to %02x;
+ <LI> Web Alpine will not attempt to continue a postponed message if the
+ postponed-msgs folder is empty.
+</UL>
</UL>
<P>
@@ -15988,7 +15997,7 @@ If an address doesn't look like a fully-qualified address, it will be looked
up in your address books, and if it doesn't match a nickname there, then it
will be looked up on the LDAP servers that have this feature set.
The lookups will also be done when using the address completion feature
-(TAB command) in the composer if any of the serves have this feature set.
+(TAB command) in the composer if any of the servers have this feature set.
Also see the LDAP feature
<A HREF="h_config_ldap_opts_rhs">&quot;Lookup-Addrbook-Contents&quot;</A>
and the Setup/Config feature
diff --git a/pith/send.c b/pith/send.c
index e4948ab9..64783374 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -5605,10 +5605,10 @@ post_handoff(METAENV *header, struct mail_bodystruct *body, char *errbuf,
char *s;
char tmp[200];
- if(s = strstr(header->env->date," (")) /* fix the date format for news */
+ if((s = strstr(header->env->date," (")) != NULL) /* fix the date format for news */
*s = '\0';
- if(err = mta_parse_post(header, body, SENDNEWS, errbuf, errbuflen, bigresult_f, pipecb_f)){
+ if((err = mta_parse_post(header, body, SENDNEWS, errbuf, errbuflen, bigresult_f, pipecb_f))){
strncpy(tmp, err, sizeof(tmp)-1);
tmp[sizeof(tmp)-1] = '\0';
snprintf(err = errbuf, errbuflen, _("News not posted: \"%s\": %s"),