add functions used to drop root privileges