Skip to content

Commit

Permalink
Merge pull request #164 from jrobeson/use-octal-prefixes
Browse files Browse the repository at this point in the history
use 0o prefix when we want octal
  • Loading branch information
sidorares committed Oct 3, 2017
2 parents 01d9237 + fa8835e commit 9e0ef5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/handshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function getCookie(context, id, cb) {
fs.stat(dirname, function(err, stat) {
if (err)
return cb(err);
//if (stat.mode & 066)
if (stat.mode & 022)
//if (stat.mode & 0o66)
if (stat.mode & 0o22)
return cb(new Error('User keyrings directory is writeable by other users. Aborting authentication'));
if (process.hasOwnProperty('getuid') && stat.uid != process.getuid())
return cb(new Error('Keyrings directory is not owned by the current user. Aborting authentication!'));
Expand Down

0 comments on commit 9e0ef5c

Please sign in to comment.