]> git.ipfire.org Git - people/ms/dma.git/commit
dma - Fix security hole (#46)
authorZach Crownover <zachary.crownover@gmail.com>
Fri, 5 Aug 2016 22:24:27 +0000 (15:24 -0700)
committerSimon Schubert <2@0x2c.org>
Fri, 5 Aug 2016 22:24:27 +0000 (00:24 +0200)
commitf249aa412dd4a09881cb450390d1003815bd0013
tree122dbe92a4044edacdc62ad09322d20219875f3b
parent17a0f39bd2bbedae84fba8a8167648c54b81743e
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.
dma-mbox-create.c