(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:
Ron Koenderink 2007-03-10 16:29:51 +00:00
parent 32d62797d2
commit c97d79c0ee
6 changed files with 32 additions and 12 deletions

View file

@ -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");