FreeBSD Bugzilla – Attachment 13973 Details for
Bug 26362
"cvs server" doesn't honour the global --allow-root
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.74 KB, created by
jan grant
on 2001-04-05 11:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
jan grant
Created:
2001-04-05 11:10:01 UTC
Size:
1.74 KB
patch
obsolete
>*** src/cvs.h.orig Mon Apr 2 15:37:18 2001 >--- src/cvs.h Mon Apr 2 15:37:46 2001 >*************** >*** 463,468 **** >--- 463,469 ---- > void root_allow_add PROTO ((char *)); > void root_allow_free PROTO ((void)); > int root_allow_ok PROTO ((char *)); >+ int root_allow_ok_or_unspecified PROTO ((char *)); > > char *gca PROTO((const char *rev1, const char *rev2)); > extern void check_numeric PROTO ((const char *, int, char **)); >*** src/root.c.orig Mon Apr 2 15:36:56 2001 >--- src/root.c Mon Apr 2 15:38:27 2001 >*************** >*** 265,270 **** >--- 265,284 ---- > return 0; > } > >+ int >+ root_allow_ok_or_unspecified (arg) >+ char *arg; >+ { >+ int i; >+ >+ if (root_allow_count == 0) return 1; >+ >+ for (i = 0; i < root_allow_count; ++i) >+ if (strcmp (root_allow_vector[i], arg) == 0) >+ return 1; >+ return 0; >+ } >+ > /* This global variable holds the global -d option. It is NULL if -d > was not used, which means that we must get the CVSroot information > from the CVSROOT environment variable or from a CVS/Root file. */ >*** src/server.c.orig Mon Apr 2 15:35:54 2001 >--- src/server.c Mon Apr 2 15:47:43 2001 >*************** >*** 794,799 **** >--- 794,812 ---- > } > } > #endif >+ if (!root_allow_ok_or_unspecified(arg)) { >+ if (alloc_pending (80 + strlen (arg))) >+ /* If cvs server was run with --allow-root, we ensure >+ that the root given is a valid one. >+ Useful for using :ext: communication to >+ a cvs server via ssh with >+ Command "cvs --allow-root=/blah server" >+ in the ssh config. */ >+ sprintf (pending_error_text, "\ >+ E Protocol error: Root cannot be \"%s\"", >+ arg); >+ return; >+ } > set_local_cvsroot (arg); > > /* For pserver, this will already have happened, and the call will do
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26362
: 13973