s3-printing: eliminate another non sec_initial_uid using security check.
authorGünther Deschner <gd@samba.org>
Tue, 23 Jun 2009 18:27:05 +0000 (20:27 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 23 Jun 2009 22:36:48 +0000 (00:36 +0200)
Guenther

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();
 
 
        close_all_print_db();
 
-       if (geteuid() == 0) {
+       if (geteuid() == sec_initial_uid()) {
                if (asprintf(&printdb_path, "%s%s.tdb",
                                cache_path("printing/"),
                                sharename) < 0) {
                if (asprintf(&printdb_path, "%s%s.tdb",
                                cache_path("printing/"),
                                sharename) < 0) {