[Pkg-gnupg-commit] [gnupg2] 276/292: g10: Fix creating a lock for ToFU.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit b2e1b17efa952afcf7aeec8b15e9d0088dba587a
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Nov 18 09:32:34 2016 +0900

    g10: Fix creating a lock for ToFU.
    
    * g10/tofu.c (busy_handler): Add third argument which is mandatory for
    O_CREATE flag.
    
    --
    
    Reported-by: Kristian Fiskerstrand
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
 g10/tofu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/g10/tofu.c b/g10/tofu.c
index 03d8ebe..cf1d00a 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -732,7 +732,8 @@ busy_handler (void *cookie, int call_count)
          process will have to wait a bit longer, but otherwise nothing
          horrible should happen.  */
 
-      int fd = open (dbs->want_lock_file, O_CREAT);
+      int fd = open (dbs->want_lock_file, O_CREAT,
+                     S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR);
       if (fd == -1)
         log_debug ("TOFU: Error opening '%s': %s\n",
                    dbs->want_lock_file, strerror (errno));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list