upas/smtp: fixes for authenticated connections
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4967049
This commit is contained in:
parent
86ce4cedbf
commit
4a8214b1ec
2 changed files with 3 additions and 2 deletions
|
|
@ -124,6 +124,7 @@ mxlookup(DS *ds, char *domain)
|
||||||
int i, n, nmx;
|
int i, n, nmx;
|
||||||
Ndbtuple *t, *tmx, *tpref, *tip;
|
Ndbtuple *t, *tmx, *tpref, *tip;
|
||||||
|
|
||||||
|
strcpy(domain, ds->host);
|
||||||
ds->netdir = "/net";
|
ds->netdir = "/net";
|
||||||
nmx = 0;
|
nmx = 0;
|
||||||
if((t = dnsquery(nil, ds->host, "mx")) != nil){
|
if((t = dnsquery(nil, ds->host, "mx")) != nil){
|
||||||
|
|
|
||||||
|
|
@ -395,10 +395,10 @@ doauth(char *methods)
|
||||||
|
|
||||||
if(user != nil)
|
if(user != nil)
|
||||||
p = auth_getuserpasswd(nil,
|
p = auth_getuserpasswd(nil,
|
||||||
"proto=pass service=smtp server=%q user=%q", ds.host, user);
|
"proto=pass service=smtp role=client server=%q user=%q", ds.host, user);
|
||||||
else
|
else
|
||||||
p = auth_getuserpasswd(nil,
|
p = auth_getuserpasswd(nil,
|
||||||
"proto=pass service=smtp server=%q", ds.host);
|
"proto=pass service=smtp role=client server=%q", ds.host);
|
||||||
if (p == nil)
|
if (p == nil)
|
||||||
return Giveup;
|
return Giveup;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue