summaryrefslogtreecommitdiff
blob: ca13cc9420e6972f037b20abc0192b381a599554 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- gpart.orig/src/gpart.c	2008-10-19 15:06:06.000000000 +0000
+++ gpart/src/gpart.c	2008-11-25 07:34:47.000000000 +0000
@@ -1221,7 +1221,7 @@ static int make_mbr_backup(disk_desc *d,
 {
 	int		fd, ret = 0;
 
-	if ((fd = open(bfile,O_WRONLY|O_CREAT)) < 0)
+	if ((fd = open(bfile,O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
 		return (ret);
 
 	if (write(fd,d->d_pt.t_boot,512) == 512)