(add, disa, ef_open, logerror, main): Switch permissions to
standard defines instead of magic numbers to improve portability. Also define WIN32 equivalents to the standard defines.
This commit is contained in:
parent
32d62797d2
commit
c97d79c0ee
6 changed files with 32 additions and 12 deletions
|
@ -37,6 +37,7 @@
|
|||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@ -48,7 +49,7 @@ disa(void)
|
|||
{
|
||||
int fd;
|
||||
|
||||
if ((fd = open(disablefil, O_RDWR | O_CREAT | O_TRUNC, 0660)) < 0)
|
||||
if ((fd = open(disablefil, O_RDWR | O_CREAT | O_TRUNC, S_IRWUG)) < 0)
|
||||
return RET_FAIL;
|
||||
close(fd);
|
||||
pr("Updates are disabled\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue