diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-12-06 07:28:16 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-12-06 07:28:16 +0000 |
commit | 586f2ef7f645457d25cb6335c43f0b3fa3da68d7 (patch) | |
tree | 591ea180adecaac7081c86c46064bc0b592f34be /usr.bin/cvs | |
parent | 3ed22efe68dfb159e0bb0162412d8f916e0ba13c (diff) |
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
Diffstat (limited to 'usr.bin/cvs')
-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); } } |