Merge from vendor branch OPENSSH:
[dragonfly.git] / gnu / usr.bin / cvs / cvs / root.c.patch
1 $DragonFly: src/gnu/usr.bin/cvs/cvs/Attic/root.c.patch,v 1.1 2005/01/25 14:00:18 joerg Exp $
2 Index: root.c
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/cvs-1.12.9/src/root.c,v
5 retrieving revision 1.1
6 diff -u -r1.1 root.c
7 --- root.c      3 Aug 2004 18:08:51 -0000       1.1
8 +++ root.c      24 Jan 2005 16:56:08 -0000
9 @@ -507,10 +507,14 @@
10  #ifdef CLIENT_SUPPORT
11      newroot->isremote = (newroot->method != local_method);
12  
13 -    if (readonlyfs && newroot->isremote)
14 -       error (1, 0,
15 +    if (newroot->isremote && readonlyfs) {
16 +       /* downgrade readonlyfs settings via environment */
17 +       if (readonlyfs < 0)
18 +           error (1, 0,
19  "Read-only repository feature unavailable with remote roots (cvsroot = %s)",
20                cvsroot_copy);
21 +       readonlyfs = 0;
22 +    }
23  
24      if ((newroot->method != local_method)
25  #ifdef CLIENT_SUPPORT