projects
/
selector.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set the file mode creation default to user only.
[selector.git]
/
selector.c
diff --git
a/selector.c
b/selector.c
index
6695bb6
..
0efdd1c
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-33,6
+33,7
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
@@
-1009,6
+1010,9
@@
int main(int argc, char **argv) {
struct hash_table_t *hash_table;
char *bash_histsize;
struct hash_table_t *hash_table;
char *bash_histsize;
+ /* Group and others have no access to created files */
+ umask(S_IRWXG | S_IRWXO);
+
if(!isatty(STDIN_FILENO)) {
fprintf(stderr, "selector: The standard input is not a tty.\n");
exit(EXIT_FAILURE);
if(!isatty(STDIN_FILENO)) {
fprintf(stderr, "selector: The standard input is not a tty.\n");
exit(EXIT_FAILURE);