1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Fix `puttygen-unix-perms': f_open(), PuTTY's wrapper on fopen, now

takes a third argument which is TRUE if the file is being opened for
writing and wants to be created in such a way that it's readable
only to the owner. This is used when saving private keys.

While I'm here, I also use this option when writing session logs, on
the general principle that they probably contain _something_
sensitive.

The new argument is only supported on Unix, for the moment. (I think
writing owner-accessible-only files is the default on Windows.)

[originally from svn r7084]
This commit is contained in:
Simon Tatham
2007-01-09 18:14:30 +00:00
parent dbbd6eb5ec
commit 4fa9564c90
9 changed files with 37 additions and 22 deletions

View File

@ -18,7 +18,7 @@
struct Filename {
char path[FILENAME_MAX];
};
#define f_open(filename, mode) ( fopen((filename).path, (mode)) )
#define f_open(filename, mode, isprivate) ( fopen((filename).path, (mode)) )
struct FontSpec {
char name[64];