summaryrefslogtreecommitdiff
path: root/devel/cvs/patches/patch-ar
blob: dffd878f999bc2dfae102f41b501d1d9bbf00ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$NetBSD: patch-ar,v 1.2 1999/04/20 15:09:44 mycroft Exp $

--- src/server.c.orig	Thu Aug  6 20:46:38 1998
+++ src/server.c	Tue Apr 20 10:43:30 1999
@@ -597,31 +597,34 @@
        nothing.  But for rsh, we need to do it now.  */
     parse_config (CVSroot_directory);
 
-    path = xmalloc (strlen (CVSroot_directory)
-		    + sizeof (CVSROOTADM)
-		    + sizeof (CVSROOTADM_HISTORY)
-		    + 10);
-    (void) sprintf (path, "%s/%s", CVSroot_directory, CVSROOTADM);
-    if (!isaccessible (path, R_OK | X_OK))
-    {
-	save_errno = errno;
-	pending_error_text = malloc (80 + strlen (path));
-	if (pending_error_text != NULL)
-	    sprintf (pending_error_text, "E Cannot access %s", path);
-	pending_error = save_errno;
-    }
-    (void) strcat (path, "/");
-    (void) strcat (path, CVSROOTADM_HISTORY);
-    if (isfile (path) && !isaccessible (path, R_OK | W_OK))
-    {
-	save_errno = errno;
-	pending_error_text = malloc (80 + strlen (path));
-	if (pending_error_text != NULL)
-	    sprintf (pending_error_text, "E \
+    if (!nolock)
+    {
+	path = xmalloc (strlen (CVSroot_directory)
+			+ sizeof (CVSROOTADM)
+			+ sizeof (CVSROOTADM_HISTORY)
+			+ 10);
+	(void) sprintf (path, "%s/%s", CVSroot_directory, CVSROOTADM);
+	if (!isaccessible (path, R_OK | X_OK))
+	{
+	    save_errno = errno;
+	    pending_error_text = malloc (80 + strlen (path));
+	    if (pending_error_text != NULL)
+		sprintf (pending_error_text, "E Cannot access %s", path);
+	    pending_error = save_errno;
+	}
+	(void) strcat (path, "/");
+	(void) strcat (path, CVSROOTADM_HISTORY);
+	if (isfile (path) && !isaccessible (path, R_OK | W_OK))
+	{
+	    save_errno = errno;
+	    pending_error_text = malloc (80 + strlen (path));
+	    if (pending_error_text != NULL)
+		sprintf (pending_error_text, "E \
 Sorry, you don't have read/write access to the history file %s", path);
-	pending_error = save_errno;
+	    pending_error = save_errno;
+	}
+	free (path);
     }
-    free (path);
 
 #ifdef HAVE_PUTENV
     env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 1 + 1);
@@ -1759,6 +1762,8 @@
     {
 	case 'n':
 	    noexec = 1;
+	case 'u':
+	    nolock = 1;
 	    break;
 	case 'q':
 	    quiet = 1;