Matthew Booth
2012-Jul-25 13:19 UTC
[Libguestfs] [PATCH] fish: Use minimal permissions when initially creating history file
--- fish/fish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish/fish.c b/fish/fish.c index ded80ec..9bb8c90 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1455,7 +1455,7 @@ cleanup_readline (void) int fd; if (histfile[0] != '\0') { - fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0644); + fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0600); if (fd == -1) { perror (histfile); return; -- 1.7.10.4
Richard W.M. Jones
2012-Jul-25 13:30 UTC
[Libguestfs] [PATCH] fish: Use minimal permissions when initially creating history file
On Wed, Jul 25, 2012 at 02:19:30PM +0100, Matthew Booth wrote:> --- > fish/fish.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fish/fish.c b/fish/fish.c > index ded80ec..9bb8c90 100644 > --- a/fish/fish.c > +++ b/fish/fish.c > @@ -1455,7 +1455,7 @@ cleanup_readline (void) > int fd; > > if (histfile[0] != '\0') { > - fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0644); > + fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0600); > if (fd == -1) { > perror (histfile); > return; > -- > 1.7.10.4ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Reasonably Related Threads
- [PATCH] fish: Do not emit error message if history file cannot be open for writing.
- [PATCH] fish: reset the console on ^Z RHBZ#1213844
- [PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
- [PATCH] fish: reset the console on ^Z RHBZ#1213844
- [Bug 245] SSH can not log out under Solaris 2.6