[Alpine-info] ldap-servers and $USER possible?

Eduardo Chappa chappa at u.washington.edu
Fri Apr 17 06:49:39 PDT 2009


On Fri, 17 Apr 2009, Liam Gretton wrote:


:) Every means of quoting and escaping I've tried has failed. Here's what

:) I have ldap-servers set to currently:

:)

:) ldap-servers=host.com:port "/base=dc=host,dc=com/binddn=${USER}"


You need to recompile Alpine to make this work.

Look at the file alpine/ldapconf.c, there is a piece of code that reads:

server_var.name = cpystr("ldap-server");
server_var.is_used = 1;
server_var.is_user = 1;
apval = APVAL(&server_var, ew);
*apval = (def && def->serv && def->serv[0]) ? cpystr(def->serv) : NULL;
set_current_val(&server_var, FALSE, FALSE);

replace the last

set_current_val(&server_var, FALSE, FALSE);

by

set_current_val(&server_var, TRUE, FALSE);

and that should solve your issue. That "TRUE" makes Alpine expand
environment variables for that variable.

I did not try this, but it should work.

--
Eduardo
http://staff.washington.edu/chappa/alpine/


More information about the Alpine-info mailing list