summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjfb <jfb@openbsd.org>2004-12-06 07:28:15 +0000
committerjfb <jfb@openbsd.org>2004-12-06 07:28:15 +0000
commit860550b6790e71b9f5d5435038025aafa51c078c (patch)
tree4e2cbb51c2dc0c2a47e1f8555eb56f740895a0cb
parentimplement a saner handler for the Removed and Remove-entry responses. (diff)
downloadwireguard-openbsd-860550b6790e71b9f5d5435038025aafa51c078c.tar.xz
wireguard-openbsd-860550b6790e71b9f5d5435038025aafa51c078c.zip
when loading the file information from the Entries file, open it in
read-only mode. fixes a problem with running non-modifying commands in directories with restrictive permissions. Reported and patch tested by Peter Hessler
-rw-r--r--usr.bin/cvs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 2e14bd53412..e5df497ae97 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.36 2004/12/03 20:19:54 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.37 2004/12/06 07:28:15 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -580,7 +580,7 @@ cvs_file_getdir(CVSFILE *cf, int flags)
}
}
- cdp->cd_ent = cvs_ent_open(fpath, O_RDWR);
+ cdp->cd_ent = cvs_ent_open(fpath, O_RDONLY);
}
}