wkd: Minor permission fix for created files.

* tools/wks-util.c (wks_cmd_install_key): Don't set u+x on the file.
(ensure_policy_file): No need to make the policy file group writable.
--

The policy file is rarely changed thus no need to g+w.  Setting +x on
a plain file does not make sense at all.

GnuPG-bug-id: 5214
This commit is contained in:
Werner Koch 2020-12-30 15:00:28 +01:00
parent 22f7dddc34
commit c008e8d20e
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 2 additions and 2 deletions

View File

@ -931,7 +931,7 @@ ensure_policy_file (const char *addrspec)
log_info ("policy file '%s' created\n", fname);
/* Make sure the policy file world readable. */
if (gnupg_chmod (fname, "-rw-rw-r--"))
if (gnupg_chmod (fname, "-rw-r--r--"))
{
err = gpg_error_from_syserror ();
log_error ("can't set permissions of '%s': %s\n",
@ -1131,7 +1131,7 @@ wks_cmd_install_key (const char *fname, const char *userid)
}
/* Make sure it is world readable. */
if (gnupg_chmod (huname, "-rwxr--r--"))
if (gnupg_chmod (huname, "-rw-r--r--"))
log_error ("can't set permissions of '%s': %s\n",
huname, gpg_strerror (gpg_err_code_from_syserror()));