#! /bin/sh /usr/share/dpatch/dpatch-run ## 03-open-mode.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Specify a mode to open(2) as required @DPATCH@ diff -urNad gpart-0.1h~/src/gpart.c gpart-0.1h/src/gpart.c --- gpart-0.1h~/src/gpart.c 2001-02-07 18:08:08.000000000 +0000 +++ gpart-0.1h/src/gpart.c 2008-11-24 23:24:53.000000000 +0000 @@ -1221,7 +1221,7 @@ { 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)