diff options
author | 2004-12-06 07:28:15 +0000 | |
---|---|---|
committer | 2004-12-06 07:28:15 +0000 | |
commit | 860550b6790e71b9f5d5435038025aafa51c078c (patch) | |
tree | 4e2cbb51c2dc0c2a47e1f8555eb56f740895a0cb | |
parent | implement a saner handler for the Removed and Remove-entry responses. (diff) | |
download | wireguard-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.c | 4 |
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); } } |