Make newly-created files other than grub.cfg world-readable.
This commit is contained in:
parent
569766e49b
commit
e5fa26e573
8 changed files with 12 additions and 8 deletions
|
@ -80,11 +80,11 @@ grub_util_fd_open (const char *os_dev, int flags)
|
|||
flags |= O_BINARY;
|
||||
#endif
|
||||
|
||||
ret = open (os_dev, flags, S_IRUSR | S_IWUSR);
|
||||
ret = open (os_dev, flags, S_IROTH | S_IRGRP | S_IRUSR | S_IWUSR);
|
||||
|
||||
/* If we can't have exclusive access, try shared access */
|
||||
if (ret < 0)
|
||||
ret = open (os_dev, flags | O_SHLOCK, S_IRUSR | S_IWUSR);
|
||||
ret = open (os_dev, flags | O_SHLOCK, S_IROTH | S_IRGRP | S_IRUSR | S_IWUSR);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue