Import Dragonfly Mail Agent snapshort from 20160806 aka v0.11+
authorbapt <bapt@FreeBSD.org>
Sat, 20 Aug 2016 16:36:05 +0000 (16:36 +0000)
committerbapt <bapt@FreeBSD.org>
Sat, 20 Aug 2016 16:36:05 +0000 (16:36 +0000)
commit98f9f1c38995c2f559a472e39cc2aad7b56159b6
treee7b37c4eb6845e4b5a1c541c335f0af9762f2d62
parent8703b25d033ea6d8a5f1bc38ae4430f7f6b5a4c1
Import Dragonfly Mail Agent snapshort from 20160806 aka v0.11+

Most important change being:
dma - Fix security hole (#46)

Affecting DragonFly 4.6 and earlier, Matt Dillon fixed this in base after
finding out from BSDNow Episode 152. Comments following were from his commit
which explains better than I. Just taking his change and putting it here as well.

* dma makes an age-old mistake of not properly checking whether a file
owned by a user is a symlink or not, a bug which the original mail.local
also had.

* Add O_NOFOLLOW to disallow symlinks.

Thanks-to: BSDNow Episode 152, made me dive dma to check when they talked
about the mail.local bug.

MFC After: 2 days
contrib/dma/VERSION
contrib/dma/dma-mbox-create.c
contrib/dma/dma.c
contrib/dma/dma.h
contrib/dma/dns.c
contrib/dma/local.c
contrib/dma/net.c
libexec/dma/Makefile.inc