Commit Diff


commit - 3abe8080ebefee94b2b393b08debd324eefa92a1
commit + a5b57ccf597d48e3077d7bbb628bbdaa75af6f27
blob - 8abd471909b493674b97efda38762ccece38177a
blob + 0c852561674c41c108485284102bd0b661bd81fe
--- lib/object.c
+++ lib/object.c
@@ -143,7 +143,7 @@ open_loose_object(int *fd, struct got_object_id *id,
 	err = object_path(&path, id, repo);
 	if (err)
 		return err;
-	*fd = open(path, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+	*fd = open(path, O_RDONLY | O_NOFOLLOW);
 	if (*fd == -1) {
 		err = got_error_from_errno();
 		goto done;
@@ -422,7 +422,7 @@ got_object_open(struct got_object **obj, struct got_re
 	if (err)
 		return err;
 
-	fd = open(path, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+	fd = open(path, O_RDONLY | O_NOFOLLOW);
 	if (fd == -1) {
 		if (errno == ENOENT)
 			err = got_error_no_obj(id);
blob - 92c3db02a3b927ecdfefca331cf2190b279536a3
blob + 94d6d9c26d9c86ef02d96131e1ebabf6fb1e3c39
--- lib/pack.c
+++ lib/pack.c
@@ -369,7 +369,7 @@ got_packidx_open(struct got_packidx **packidx, const c
 	if (p == NULL)
 		return got_error_from_errno();
 
-	p->fd = open(path, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+	p->fd = open(path, O_RDONLY | O_NOFOLLOW);
 	if (p->fd == -1)
 		return got_error_from_errno();
 
blob - fac0482213450d23be35c6155dd21d22aff4d48e
blob + ad65519dfb217bedfcc6bfb83c59cc4be503a896
--- lib/repository.c
+++ lib/repository.c
@@ -700,7 +700,7 @@ open_packfile(int *fd, const char *path_packfile, stru
 {
 	const struct got_error *err = NULL;
 
-	*fd = open(path_packfile, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+	*fd = open(path_packfile, O_RDONLY | O_NOFOLLOW);
 	if (*fd == -1)
 		return got_error_from_errno();