Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security: mktemp, file permissions, removing temp file after. And a basic feature I needed. #91

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants