Use sec_initial_uid() in the places where being root doesn't matter,
[samba.git] / source3 / printing / printing_db.c
index 746e768e4854730b3c445005897cdcdd3270092d..762b418bb1ebd4d5f18a18475b15239d3e0ab7c0 100644 (file)
@@ -98,7 +98,7 @@ struct tdb_print_db *get_print_db_byname(const char *printername)
                return NULL;
        }
 
-       if (geteuid() != 0) {
+       if (geteuid() != sec_initial_uid()) {
                become_root();
                done_become_root = True;
        }