mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-20 01:02:44 +02:00
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
(cherry picked from commit c008e8d20e
)
This commit is contained in:
parent
83e875a2d1
commit
fdc5485026
|
@ -931,7 +931,7 @@ ensure_policy_file (const char *addrspec)
|
||||||
log_info ("policy file '%s' created\n", fname);
|
log_info ("policy file '%s' created\n", fname);
|
||||||
|
|
||||||
/* Make sure the policy file world readable. */
|
/* 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 ();
|
err = gpg_error_from_syserror ();
|
||||||
log_error ("can't set permissions of '%s': %s\n",
|
log_error ("can't set permissions of '%s': %s\n",
|
||||||
|
@ -1132,7 +1132,7 @@ wks_cmd_install_key (const char *fname, const char *userid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure it is world readable. */
|
/* 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",
|
log_error ("can't set permissions of '%s': %s\n",
|
||||||
huname, gpg_strerror (gpg_err_code_from_syserror()));
|
huname, gpg_strerror (gpg_err_code_from_syserror()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user