Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4554/src/gdk
Modified Files:
gdk.mx gdk_logger.mx gdk_posix.mx gdk_storage.mx gdk_utils.mx
Log Message:
propagated changes of Wednesday Nov 28 2007 - Monday Dec 03 2007
from the MonetDB_1-20 branch to the development trunk
Index: gdk.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk.mx,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- gdk.mx 14 Nov 2007 12:38:08 -0000 1.242
+++ gdk.mx 3 Dec 2007 08:32:17 -0000 1.243
@@ -2323,6 +2323,8 @@
#define strdup _strdup
#endif
+#define MONETDB_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
+
#define BBP_BATMASK 511
#define BBP_THREADMASK 63
Index: gdk_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_storage.mx,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- gdk_storage.mx 14 Nov 2007 12:40:55 -0000 1.130
+++ gdk_storage.mx 3 Dec 2007 08:32:19 -0000 1.131
@@ -160,14 +160,14 @@
#ifdef WIN32
flags |= strchr(mode, 'b') ? O_BINARY : O_TEXT;
#endif
- fd = open(path, flags, 0644);
+ fd = open(path, flags, MONETDB_MODE);
if (fd < 0 && *mode == 'w') {
/* try to create the directory, if that was the problem */
char tmp[PATHLENGTH];
strcpy(tmp, buf);
if (GDKcreatedir(tmp)) {
- fd = open(path, flags, 0644);
+ fd = open(path, flags, MONETDB_MODE);
}
}
return fd;
Index: gdk_logger.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_logger.mx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gdk_logger.mx 4 Oct 2007 10:33:41 -0000 1.10
+++ gdk_logger.mx 3 Dec 2007 08:32:18 -0000 1.11
@@ -297,7 +297,10 @@
b = BATdescriptor(bid);
if (b) {
+ int access = b->P->restricted;
+ b->P->restricted = BAT_WRITE;
BATclear(b);
+ b->P->restricted = access;
logbat_destroy(b);
}
}
Index: gdk_utils.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_utils.mx,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -d -r1.198 -r1.199
--- gdk_utils.mx 1 Dec 2007 19:30:33 -0000 1.198
+++ gdk_utils.mx 3 Dec 2007 08:32:20 -0000 1.199
@@ -1636,7 +1636,6 @@
if (GDKrecovery && unlink(GDKLOCK) < 0) {
GDKfatal("GDKlockHome: unlock DB failed\n");
}
- umask(0000);
if (MT_lockf(GDKLOCK, F_TLOCK, 4, 1) < 0) {
GDKlockFile = 0;
GDKfatal("GDKlockHome: Database lock '%s' denied\n", GDKLOCK);
Index: gdk_posix.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_posix.mx,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- gdk_posix.mx 23 Nov 2007 11:46:10 -0000 1.145
+++ gdk_posix.mx 3 Dec 2007 08:32:18 -0000 1.146
@@ -1039,7 +1039,7 @@
void *
MT_mmap_open(MT_mmap_hdl *hdl, char *path, int mode, off_t off, size_t len,
size_t nremaps)
{
- int fd = open(path, O_CREAT | ((mode & MMAP_WRITE) ? O_RDWR :
O_RDONLY), 0664);
+ int fd = open(path, O_CREAT | ((mode & MMAP_WRITE) ? O_RDWR :
O_RDONLY), MONETDB_MODE);
void *ret = (void *) -1L;
(void) nremaps;
@@ -1928,7 +1928,7 @@
#else
#define MMAP_FLAGS(f) f
#define MMAP_FD fd
-#define MMAP_OPEN_DEV_ZERO int fd = open("/dev/zero", O_RDWR, 0666)
+#define MMAP_OPEN_DEV_ZERO int fd = open("/dev/zero", O_RDWR, MONETDB_MODE)
#define MMAP_CLOSE_DEV_ZERO close(fd)
#endif
@@ -2035,7 +2035,7 @@
int
MT_lockf(char *filename, int mode, off_t off, off_t len)
{
- int fd = open(filename, O_CREAT | O_RDWR, 0662);
+ int fd = open(filename, O_CREAT | O_RDWR, MONETDB_MODE);
if (fd < 0)
return -2;
@@ -2198,7 +2198,7 @@
SetLastError(ERROR_INVALID_DATA);
}
if (ret != 0) {
- fd = open(filename, O_CREAT | O_RDWR, 0662);
+ fd = open(filename, O_CREAT | O_RDWR, MONETDB_MODE);
if (fd < 0) {
/* this is nasty, but I "trust" windows that it in this
case
* also cannot open the file into a filehandle any
more, so
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins