--- grass-6.3.0/raster/r.drain/main.c +++ grass-6.3.0/raster/r.drain/main.c @@ -296,8 +296,8 @@ int main(int argc, char **argv) tempfile1 = G_tempfile(); tempfile2 = G_tempfile(); - fe = open(tempfile1, O_RDWR | O_CREAT); - fd = open(tempfile2, O_RDWR | O_CREAT); + fe = open(tempfile1, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); + fd = open(tempfile2, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); /* transfer the input map to a temp file */ for (i = 0; i < nrows; i++) { --- grass-6.3.0/raster/r.fill.dir/main.c +++ grass-6.3.0/raster/r.fill.dir/main.c @@ -196,9 +196,9 @@ main(int argc, char **argv) tempfile2 = G_tempfile(); tempfile3 = G_tempfile(); - fe=open(tempfile1,O_RDWR|O_CREAT); /* elev */ - fd=open(tempfile2,O_RDWR|O_CREAT); /* dirn */ - fm=open(tempfile3,O_RDWR|O_CREAT); /* problems */ + fe=open(tempfile1,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* elev */ + fd=open(tempfile2,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* dirn */ + fm=open(tempfile3,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* problems */ G_message(_("Reading map...")); for(i=0;i