d634f7a00ee22a2250db6df94c0bd073a37dc060 chinhli Mon Aug 27 15:43:31 2012 -0700 Minor identation change and typo coreection for bug 8832. diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index 39c5985..549262e 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -67,35 +67,37 @@ char *mailReturnAddr() /* Return the return addr. to be used by outbound mail or NULL. Allocd here. */ { if isEmpty(cfgOption(CFG_LOGIN_MAIL_RETURN_ADDR)) return cloneString("NULL_mailReturnAddr"); else return cloneString(cfgOption(CFG_LOGIN_MAIL_RETURN_ADDR)); } int mailItOut(char *toAddr, char *subject, char *msg, char *fromAddr) /* send mail to toAddr address */ { char cmd[4096]; char fullMail[4096]; -safef(fullMail,sizeof(fullMail),"Form: %s\nTo: %s\nSubject: %s\n\n%s", +safef(fullMail,sizeof(fullMail), + "From: %s\n" + "To: %s\n" + "Subject: %s\n" + "\n%s", fromAddr, toAddr, subject, msg); safef(cmd,sizeof(cmd), "echo '%s' | /usr/sbin/sendmail -t -oi",fullMail); -//safef(cmd,sizeof(cmd), "echo '%s' | /bin/mail -s \"%s\" %s -- -f%s", - msg, subject, toAddr, fromAddr); int result = system(cmd); return result; } /* ---- password functions depend on optionally installed openssl lib ---- */ #ifdef USE_SSL #include <openssl/md5.h> void cryptWikiWay(char *password, char *salt, char* result) /* encrypt password in mediawiki format - ':B:'.$salt.':'. md5($salt.'-'.md5($password ) */ { int i; unsigned char result1[MD5_DIGEST_LENGTH]; unsigned char result2[MD5_DIGEST_LENGTH];