summaryrefslogtreecommitdiff
path: root/sys/src/cmd/upas/smtp
AgeCommit message (Collapse)Author
2017-10-23upas/smtpd: don't call syslog() from the note handler, this can deadlockcinap_lenrek
when the alarm hits while the process is currently in syslog(), holding the sl lock, then calling syslog again will deadlock: /proc/1729193/text:386 plan 9 executable /sys/lib/acid/port /sys/lib/acid/386 acid: lstk() sleep()+0x7 /sys/src/libc/9syscall/sleep.s:5 lock(lk=0x394d8)+0xb7 /sys/src/libc/port/lock.c:25 i=0x3e8 syslog(logname=0x41c64,cons=0x0,fmt=0x41c6a)+0x2d /sys/src/libc/9sys/syslog.c:60 err=0x79732f27 d=0x0 ctim=0x0 buf=0x0 p=0x0 arg=0x0 n=0x0 catchalarm(msg=0xdfffc854)+0x7a /sys/src/cmd/upas/smtp/smtpd.c:71 notifier+0x30 /sys/src/libc/port/atnotify.c:15
2017-04-23libsec: sha256 support for thumbprint files, use it in ssh as wellcinap_lenrek
initThumbprints() now takes an application tag argument so x509 and ssh can coexist. the thumbprint entries can now hold both sha1 and sha256 hashes. okThumbprint() now takes a len argument for the hash length used. the new function okCertificate() hashes the certificate with both and checks for any matches. on failure, okCertificate() returns 0 and sets error string. we also check for include loops now in thumbfiles, limiting the number of includes to 8.
2017-03-23upas/smtp: fix cram-md5 auth, simplify doauth(), check varargs for dBprint()cinap_lenrek
- smtpcram() was replying with the challenge instead of the response... m( - simplify doauth, use error string for auth_getuserpasswd() error logging - enable #pragma varargck for dBprint()
2017-03-23upas/smtp: generate 128-bit random message id (was 32 bit), use dBprint(), ↵cinap_lenrek
cleanup unused variables
2017-03-22upas/smtp: Revert smtp dial string behavior to match that of old upas ↵spew
(thanks sam-d) Also do some cleanup around buffers and memory management
2017-03-12merging erik quanstros nupascinap_lenrek
2016-02-22smtpd: remove unused lastsender logiccinap_lenrek
2015-04-15upas/smtp: cleanup mkfilecinap_lenrek
no need to list headers explicitely as they are implied by $HFILES.
2015-03-11smtp, smtpd: fix use of enc64(), fix memory leaks in doauth()cinap_lenrek
the approximation of n*2 to calculate the number of output bytes for enc64() fails for inputs of size < 3. this is fixed by using encodefmt() which gets the calculation right and also simplifies the code avoiding the allocation and freeing of intermediate string buffers.
2014-11-08smtpd: cleanup hello() domain check codecinap_lenrek
theres no point in doing domain checks on literal ip addresses, so handle that case early.
2014-11-08smtpd: accept literal ipv6 addresses in HELO/EHLOcinap_lenrek
2013-10-30smtp: fix free on uninitialized pointerBurnZeZ
2013-09-14tls: fix various tlsClient()/tlsServer() related bugscinap_lenrek
- TLSconn structure on stack but not initialized (zeroed) - original filedescriptor double closed in error case - original filedescriptor leaked in success case - leaked TLSconn.sessionID and TLSconn.cert - clarify in pushtls(2) and pushssl(2)
2013-08-02smtp: fix -t flagcinap_lenrek
2013-06-18smtp: usage for -t flag (thanks erik)cinap_lenrek
2013-06-12smtp: add SMTPS support (-t)cinap_lenrek
2012-03-15smtp: try /net.alt on /net dns failurecinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen