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

add funcion to save history in private file #122

Closed
wants to merge 3 commits into from

Conversation

denisvm
Copy link

@denisvm denisvm commented Jun 18, 2016

Function that guarantees no group nor world access when creating a new history file, but do not change the current file permission.

Closes #121

@Sonophoto
Copy link

Sonophoto commented Jun 20, 2016

It is not my call but this is ok imo.

I suggest a new "docstring", this is explicit and clear to POSIX users:

You can also +use `linenoiseHistoryPrivSave` to no group nor world access when creating +a new history file on POSIX systems. On POSIX systems, you can optionally use linenoiseHistoryPrivSave() to force saving the command line history file with a umask of 0077 ("u=rwx, g=, o=") This will block world and group from accessing a critical history file without changing your shell's default umask.

@Sonophoto
Copy link

Thanks for your insight and hard work, I will add this to my l7n repo. You are very right about the security hazard.

Lunchtime!

@denisvm
Copy link
Author

denisvm commented Jun 20, 2016

Thanks for your suggestion, @Sonophoto! I've just updated the README file ;)

@antirez
Copy link
Owner

antirez commented Jul 29, 2016

See #121. Closing.

@antirez antirez closed this Jul 29, 2016
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

3 participants