tupas/smtp: fixes for authenticated connections - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4a8214b1ecfbd64e83491c580dc53941c7285591
 (DIR) parent 86ce4cedbf92c32ae857b9c193bc50c1c1070866
 (HTM) Author: Richard Miller <millerresearch@gmail.com>
       Date:   Wed, 31 Aug 2011 07:40:10 -0400
       
       upas/smtp: fixes for authenticated connections
       
       R=rsc
       CC=plan9port.codebot
       http://codereview.appspot.com/4967049
       
       Diffstat:
         M src/cmd/upas/smtp/mxdial.c          |       1 +
         M src/cmd/upas/smtp/smtp.c            |       4 ++--
       
       2 files changed, 3 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/upas/smtp/mxdial.c b/src/cmd/upas/smtp/mxdial.c
       t@@ -124,6 +124,7 @@ mxlookup(DS *ds, char *domain)
                int i, n, nmx;
                Ndbtuple *t, *tmx, *tpref, *tip;
                
       +        strcpy(domain, ds->host);
                ds->netdir = "/net";
                nmx = 0;
                if((t = dnsquery(nil, ds->host, "mx")) != nil){
 (DIR) diff --git a/src/cmd/upas/smtp/smtp.c b/src/cmd/upas/smtp/smtp.c
       t@@ -395,10 +395,10 @@ doauth(char *methods)
        
                if(user != 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
                        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)
                        return Giveup;