Add option for dropping privileges
Merge upstream