diff options
author | Julio Merino <jmmv@meroh.net> | 2016-02-08 21:26:53 -0500 |
---|---|---|
committer | Julio Merino <jmmv@meroh.net> | 2016-02-08 21:26:53 -0500 |
commit | 27e7029148aa24803af8f40ea916213a381c1967 (patch) | |
tree | fe25030c857d438fd309191acbedeac62087b35b | |
parent | 30e90ae0800a16992d4a349d1fe9c3f5e3566f56 (diff) | |
download | sshfs-27e7029148aa24803af8f40ea916213a381c1967.tar sshfs-27e7029148aa24803af8f40ea916213a381c1967.tar.gz sshfs-27e7029148aa24803af8f40ea916213a381c1967.tar.bz2 sshfs-27e7029148aa24803af8f40ea916213a381c1967.zip |
Unconditionally mlock the password in memory
Revision b4023a19 added an mlock call to ensure the sshfs password is kept
in memory, but did so only for OS X. This is a good idea in general, so
let's remove the condition.
-rw-r--r-- | sshfs.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -3567,7 +3567,6 @@ static int read_password(void) perror("Failed to allocate locked page for password"); return -1; } -#ifdef __APPLE__ if (mlock(sshfs.password, size) != 0) { memset(sshfs.password, 0, size); munmap(sshfs.password, size); @@ -3575,7 +3574,6 @@ static int read_password(void) perror("Failed to allocate locked page for password"); return -1; } -#endif /* __APPLE__ */ /* Don't use fgets() because password might stay in memory */ for (n = 0; n < max_password; n++) { |