]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Force userconfig to sysconfig when running as root.
authorMichael R Sweet <msweet@msweet.org>
Sun, 29 Dec 2024 19:37:01 +0000 (14:37 -0500)
committerMichael R Sweet <msweet@msweet.org>
Sun, 29 Dec 2024 19:37:01 +0000 (14:37 -0500)
cups/globals.c

index 724611bea77d37b4c22ece1caffd32cdef8b488c..519ebf119540853346e5031f03ecfa88e4b474d6 100644 (file)
@@ -335,6 +335,13 @@ cups_globals_alloc(void)
       cg->localedir = CUPS_LOCALEDIR;
   }
 
+  if (!getuid())
+  {
+    // When running as root, make "userconfig" the same as "sysconfig"...
+    cg->userconfig = strdup(cg->sysconfig);
+    return (cg);
+  }
+
 #  ifdef __APPLE__
   if (!home)
 #else