Description: Specify a mode to open(2) as required (Closes: #506816).
Author: James Westby <james.westby@canonical.com>
Last-Update: 2008-11-25
Index: gpart-0.1h/src/gpart.c
===================================================================
--- gpart-0.1h.orig/src/gpart.c
+++ gpart-0.1h/src/gpart.c
@@ -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)
