if (!selpath)
return;
- int fd = open(selpath, O_CREAT | O_WRONLY | O_TRUNC, 0666);
+ int fd = open(selpath, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR);
if (fd != -1) {
if (write(fd, buf, buflen) != (ssize_t)buflen)
int fd = open(outfile
? (outfile[0] == '~' ? g_buf : outfile)
- : cfgpath, O_CREAT | O_WRONLY | O_TRUNC, 0666);
+ : cfgpath, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR);
if (fd != -1) {
dprintf(fd, "cd \"%s\"", curpath);
mkpath(cfgpath, toks[TOK_SSN], ssnpath);
mkpath(ssnpath, sname, spath);
- fd = open(spath, O_CREAT | O_WRONLY | O_TRUNC, 0666);
+ fd = open(spath, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR);
if (fd == -1) {
printwait(messages[MSG_SEL_MISSING], presel);
return;
if (has_loaded_dynamically)
save_session("@", NULL);
- fd = open(spath, O_RDONLY, 0666);
+ fd = open(spath, O_RDONLY, S_IWUSR | S_IRUSR);
if (fd == -1) {
if (!status) {
printmsg(messages[MSG_SEL_MISSING]);
return FALSE;
}
} else {
- int fd = open(path, O_CREAT | O_TRUNC, 0666); /* Use forced create mode for files */
+ int fd = open(path, O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR); /* Forced create mode for files */
if (fd == -1 && errno != EEXIST) {
DPRINTF_S("open!");