s3-printing: eliminate another non sec_initial_uid using security check.
[ira/wip.git] / source3 / printing / nt_printing.c
index f496ae5edd3df31362b1ae3b79cb74f723389253..3e206becf4a930e16799a9398b7c4d4861aa525a 100644 (file)
@@ -2532,7 +2532,7 @@ uint32 del_a_printer(const char *sharename)
 
        close_all_print_db();
 
-       if (geteuid() == 0) {
+       if (geteuid() == sec_initial_uid()) {
                if (asprintf(&printdb_path, "%s%s.tdb",
                                cache_path("printing/"),
                                sharename) < 0) {