Skip to content

Conversation

@wrzasa
Copy link

@wrzasa wrzasa commented Mar 22, 2018

I think you should seriously consider using mktemp as in the first commit. Not tested on OSX!

Starting vim with current clipboard already in the editor seemed quite natural for me, but it's just my concept of using vim-anywhere.

@wrzasa wrzasa changed the title mktemp for security and basic feature I needed Security: mktemp, file permissions, removing temp file after. And a basic feature I needed. Mar 23, 2018
# Linux
if [[ $OSTYPE == "linux-gnu" ]]; then
chmod o-r $TMPFILE # Make file only readable by you
chmod 600 $TMPFILE # Make file only readable by you

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be one of chmod 0600 or chmod go-rwx?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your question.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your original command removed permission only from other. My suggestion was to ensure that only your user be allowed, i.e. to remove permission from others in the group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants