Displaying 1 result from an estimated 1 matches for "store_new".
2006 Oct 30
0
File Store permissions
...S_IRUSR | S_IWUSR);
+ O_WRONLY | O_CREAT | O_BINARY, store->file_mode);
OutStream *os;
if (fd < 0) {
RAISE(IO_ERROR, "couldn''t create OutStream %s: <%s>",
@@ -431,9 +431,19 @@ static void fs_close_i(Store *store)
static Store *fs_store_new(const char *pathname)
{
+ struct stat stt;
Store *new_store = store_new();
new_store->dir.path = estrdup(pathname);
+
+ new_store->file_mode = S_IRUSR | S_IWUSR;
+ if (!stat(new_store->dir.path, &stt) &&
+ stt.st_gid == getgid()) {
+ if (stt.s...