efreet: Set umask before creating temporary file
CID 1039615
This commit is contained in:
parent
67a8feeb08
commit
e2dabc5d23
|
@ -28,13 +28,17 @@ main(int argc, char *argv[])
|
|||
{
|
||||
char path[PATH_MAX];
|
||||
FILE *log;
|
||||
mode_t um;
|
||||
|
||||
strcpy(path, "/tmp/efreetd_XXXXXX");
|
||||
um = umask(0077);
|
||||
if (mkstemp(path) < 0)
|
||||
{
|
||||
perror("mkstemp");
|
||||
umask(um);
|
||||
return 1;
|
||||
}
|
||||
umask(um);
|
||||
if (chmod(path, 0700) < 0)
|
||||
{
|
||||
perror("chmod");
|
||||
|
|
Loading…
Reference in New Issue