]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use per-type mode when saving OAuth values.
authorMichael R Sweet <msweet@msweet.org>
Fri, 16 May 2025 22:46:17 +0000 (18:46 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 16 May 2025 22:46:17 +0000 (18:46 -0400)
cups/oauth.c

index 6adac2ca36ff2dc62fffab5422c9d380e31d3a08..0bf50b16059ca6bdf1b1a0be5fd5dca866249c5d 100644 (file)
@@ -2112,7 +2112,7 @@ oauth_save_value(
   if (value)
   {
     // Create the file...
-    if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW, 0600)) >= 0)
+    if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW, modes[otype])) >= 0)
     {
       // Write the value and close...
       write(fd, value, strlen(value));