[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: allow list patch
From: |
Tollef Fog Heen |
Subject: |
Re: allow list patch |
Date: |
04 Mar 2002 07:33:37 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 |
* Mike Sutton
| On 02/19/02 08:05:22, Mike Sutton wrote:
| > I'll see if I can dig it up. I believe its based on 1.10.8. I have
| > not ported it to 1.11.1p1 yet.
| >
| As promised. See diff bellow. The diff is against 1.10. But you
| should be able to get the idea of the patch.
diff -u -r1.1.1.7 -r1.1.1.7.2.1
--- root.c 1998/08/20 15:10:47 1.1.1.7
+++ root.c 1998/08/24 15:58:52 1.1.1.7.2.1
@@ -181,6 +181,30 @@
static unsigned int root_allow_size;
void
+root_allow_list(file)
+ char *file;
+{
+ FILE *fp;
+
+ char *line = NULL;
+ size_t line_allocated = 0;
+
+ /* open a file containing the list of allowed CVS root
+ * directories. A # character represents a comment line.
+ */
+ fp = open_file(file, "r");
+ while (fp && getline(&line, &line_allocated, fp) >= 0)
+ {
+ if (line[0] == '#')
+ continue;
+
+ line[strlen(line) -1] = '\0'; /* chop off newline */
This will cause unexpected results if the admin forgets to add a final
newline to the file.
+ root_allow_add(line);
+ }
+ if (fp) fclose(fp);
+}
+
+void
root_allow_add (arg)
char *arg;
{
--
Tollef Fog Heen
Unix _IS_ user friendly... It's just selective about who its friends are.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: allow list patch,
Tollef Fog Heen <=