diff options
author | Justus Winter <[email protected]> | 2016-04-20 12:55:45 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-04-20 13:02:37 +0000 |
commit | f8adf1a3234655877a4f985d627d98567507002c (patch) | |
tree | fc52acddf11211860bdfa2608c376bf783884d3a /common/sysutils.h | |
parent | tests: Test the migration from a classic GnuPG home directory. (diff) | |
download | gnupg-f8adf1a3234655877a4f985d627d98567507002c.tar.gz gnupg-f8adf1a3234655877a4f985d627d98567507002c.zip |
agent: Sanitize permissions of the private key directory.
* agent/gpg-agent.c (create_private_keys_directory): Set permissions.
* common/sysutils.c (modestr_to_mode): New function.
(gnupg_mkdir): Use new function.
(gnupg_chmod): New function.
* common/sysutils.h (gnupg_chmod): New prototype.
* tests/migrations/from-classic.test: Test migration with existing
directory.
GnuPG-bug-id: 2312
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'common/sysutils.h')
-rw-r--r-- | common/sysutils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/sysutils.h b/common/sysutils.h index 95276dea6..ba66ce616 100644 --- a/common/sysutils.h +++ b/common/sysutils.h @@ -61,6 +61,7 @@ void gnupg_reopen_std (const char *pgmname); void gnupg_allow_set_foregound_window (pid_t pid); int gnupg_remove (const char *fname); int gnupg_mkdir (const char *name, const char *modestr); +int gnupg_chmod (const char *name, const char *modestr); char *gnupg_mkdtemp (char *template); int gnupg_setenv (const char *name, const char *value, int overwrite); int gnupg_unsetenv (const char *name); |