CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: christos Date: Mon Jun 21 02:48:01 UTC 2021 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.texinfo Log Message: PR/56256: Germain: cvs info doc incorrect for update -D To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.14 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.15 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.14 Fri Jul 5 20:10:25 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Sun Jun 20 22:48:01 2021 @@ -11807,7 +11807,7 @@ them): @table @code @item -D date Use the most recent revision no later than @var{date}. -This option is sticky, and implies @samp{-P}. +This option is sticky. See @ref{Sticky tags}, for more information on sticky tags/dates. @item -f
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Wed May 1 02:15:07 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: add various small corrections Add various corrections mostly sourced from upstream's cvs.texinfo, e.g., note NetBSD's local change to log admin commands in history (subsequently added on upstream's HEAD, since it was noted in r. 1.689), add some references to rannotate and rlog (from r. 1.686), some amendments concerning rdiff (from r. 1.687), and miscellaneous typo fixes. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.10 -r1.11 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.9 src/external/gpl2/xcvs/dist/doc/cvs.1:1.10 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.9 Sun Apr 28 07:13:16 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Wed May 1 02:15:07 2019 @@ -1098,7 +1098,7 @@ acceptable for \fIstate\fR. A useful se stable), and \fBRel\fR (for released). By default, the state of a new revision is set to \fBExp\fR when it is created. The state is visible in the output from -\fIcvs log\fR (see node `log\(aq in the CVS manual), and in the +\fIcvs log\fR (see node `log & rlog\(aq in the CVS manual), and in the \fB$\fP\fPLog$\fR and \fB$\fP\fPState$\fR keywords (see node `Keyword substitution\(aq in the CVS manual). Note that \fBcvs\fR uses the \fBdead\fR state for its own purposes (see node `Attic\(aq in the CVS manual); to @@ -1113,7 +1113,7 @@ Useful with \fBcvs\fR. Write descriptiv contents of the named \fIfile\fR into the RCS file, deleting the existing text. The \fIfile\fR pathname may not begin with \fB-\fR. The descriptive text can be seen in the -output from \fBcvs log\fR (see node `log\(aq in the CVS manual). +output from \fBcvs log\fR (see node `log & rlog\(aq in the CVS manual). There can be no space between \fB-t\fR and its argument. .SP If \fIfile\fR is omitted, @@ -1171,9 +1171,10 @@ files. However, \fBcvs\fR has always re this option has never done anything useful. .SP .SP -.SH "annotate" +.SH "annotate & rannotate" .SS "What revision modified each line of a file?" .IX "annotate (subcommand)" +.IX "rannotate (subcommand)" .SP .IP "\(bu" 2 Synopsis: annotate [options] files\&... @@ -1225,6 +1226,8 @@ existed on \fIdate\fR. See see node `Co Annotate file as of specified date. .SP .SH "annotate example" +.IX "annotate (subcommand)" +.IX "rannotate (subcommand)" .SP For example: .SP @@ -1511,6 +1514,7 @@ $ cvs checkout -D yesterday tc .SH "commit" .SS "Check files into the repository" .IX "commit (subcommand)" +.IX "ci (subcommand)" .SP .IP "\(bu" 2 Synopsis: commit [-lnRf] [-m \(aqlog_message\(aq | @@ -1550,7 +1554,7 @@ enter a log message that will be written logging programs (see node `modules\(aq in the CVS manual, and see node `loginfo\(aq in the CVS manual) and placed in the \fBrcs\fR file inside the repository. This log message can be retrieved with the -\fBlog\fR command; see see node `log\(aq in the CVS manual. You can specify the +\fBlog\fR command (see node `log & rlog\(aq in the CVS manual). You can specify the log message on the command line with the \fB-m \fImessage\fB\fR option, and thus avoid the editor invocation, or use the \fB-F \fIfile\fB\fR option to specify @@ -1559,8 +1563,8 @@ that the argument file contains the log At \fBcommit\fR, a unique commitid is placed in the \fBrcs\fR file inside the repository. All files committed at once get the same commitid. The commitid can be retrieved with -the \fBlog\fR and \fBstatus\fR command; see see node `log\(aq in the CVS manual, -see node `File status\(aq in the CVS manual. +the \fBlog\fR and \fBstatus\fR command (see node `log & rlog\(aq in the CVS manual, +see node `File status\(aq in the CVS manual). .SP .SH "commit options" .SP @@ -2821,6 +2825,12 @@ A file was modified. .IP "" 4 A file was removed. .SP +One record type results from the admin command: +.IP "" 2 +\fBX\fR +.IP "" 4 +The admin command. +.SP The options shown as \fB-flags\fR constrain or expand the report without requiring option arguments: .SP @@ -3117,9 +3127,10 @@ $ cvs -d /usr/local/cvsroot init .PD .IP "" 0 .SP -.SH "log" +.SH "log & rlog" .SS "Print out log information for files" .IX "log (subcommand)" +.IX "rlog (subcommand)" .SP .IP "\(bu" 2 Synopsis: log [options] [files\&...] @@ -3488,7 +3499,7 @@ verifymsg .IX "rdiff (subcommand)" .SP .IP "\(bu" 2 -rdiff [-flags] [-V vn] (-r tag1[:date1] | -D date1) [-r tag2[:date2] | -D date2] modules\&... +rdiff [options] {-r tag1[:date1] | -D date1} [-r tag2[:date2] | -D date2] modules\&... .IP "\(bu" 2 Requires: repository. .IP "\(bu" 2 @@ -3499,10 +3510,7 @@
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Apr 28 07:13:16 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: add a missing section documenting the "tag" and "rtag" commands. This is taken mostly from the upstream project's cvs.texinfo revisions 1.686 and 1.687. Additionally, I've reflected NetBSD's local changes to log "tag" as well as "rtag" in history, and to require admin privileges for destructive tagging commands. This addresses PR bin/33877. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.9 -r1.10 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.8 src/external/gpl2/xcvs/dist/doc/cvs.1:1.9 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.8 Sun Mar 3 21:11:54 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Sun Apr 28 07:13:16 2019 @@ -2779,7 +2779,7 @@ export .IP "" 2 \fBT\fR .IP "" 4 -rtag +tag and rtag .SP One of five record types may result from an update: .SP @@ -3925,6 +3925,154 @@ Load configuration from \fIpath\fR rathe \fB/etc/cvs.conf\fR or prefixed by \fB/etc/cvs/\fR. This option is supported beginning with \fBcvs\fR release 1.12.13. .SP +.SH "tag & rtag" +.SS "Mark project snapshot for later retrieval." +.IX "tag (subcommand)" +.IX "freeze (subcommand)" +.IX "rtag (subcommand)" +.IX "rfreeze (subcommand)" +.SP +.IP "\(bu" 2 +tag [-bBcdFflR] [-r tag] [-D date] new_tag [files\&...] +.IP "\(bu" 2 +Requires: working directory, repository. +.IP "\(bu" 2 +Changes: repository. +.IP "\(bu" 2 +Synonym: ta, freeze +.SP +and +.SP +.IP "\(bu" 2 +rtag [-abBdFflnR] [-r tag | -D date] new_tag module\&... +.IP "\(bu" 2 +Requires: repository. +.IP "\(bu" 2 +Changes: repository. +.IP "\(bu" 2 +Synonym: rt, rfreeze +.SP +Use \fBtag\fR to assign symbolic tags to the revisions of files +checked out into your sandbox. The tags are applied immediately +to the repository, with the revision numbers to attach the tag +to supplied implicitly by the \fBcvs\fR records of your working files. +.SP +\fBrtag\fR works similarly, but does not need a sandbox to operate +in, requiring an explicitly supplied tag or date instead (or assuming +the tip of the trunk when one is not supplied explicitly). \fBcvs\fR +uses this preexisting tag or date to determine which revisions of +files in the repository to attach the new symbolic tag to. +.SP +The symbolic tags are meant to permanently record which +revisions of which files were used for some purpose. The \fBcheckout\fR +and \fBupdate\fR commands allow you to extract an exact +copy of a tagged release at any time in the future, +regardless of whether files have been changed, added, +or removed on the trunk or other branches since the release was tagged. +For more, see node `Branching and merging\(aq in the CVS manual. +.SP +These commands may also be used to delete a symbolic tag, +or to create a branch. See the options section below. +.SP +Note if you wish to run destructive commands such as tag deletion, you may +need to be a member of the group \fBcvsadmin\fR to do this. +.SP +If you attempt to create a tag that already exists, +CVS will complain and not overwrite that tag. Use +the \fB-F\fR option to move the tag to a new set of +revisions. +.SP +These standard options are supported by \fBtag\fR or \fBrtag\fR +(see node `Common options\(aq in the CVS manual, for a complete description of them): +.SP +.IP "" 0 +\fB-D \fIdate\fB\fR +.IP "" 2 +Tag the most recent revision no later than \fIdate\fR. This option is +not valid when deleting tags (see \fB-d\fR option, below). +.SP +.IP "" 0 +\fB-l\fR +.IP "" 2 +Local; run only in current working directory. see node `Recursive behavior\(aq in the CVS manual. +.SP +.IP "" 0 +\fB-R\fR +.IP "" 2 +Update directories recursively (default). see node `Recursive behavior\(aq in the CVS manual. +.SP +.IP "" 0 +\fB-r \fItag\fB[:\fIdate\fB]\fR +.IP "" 2 +Tag the revisions specified by \fItag\fR or, when \fIdate\fR is specified +and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it +existed on \fIdate\fR. This option is not valid when deleting tags +(see \fB-d\fR option, below). +.SP +Several tag specific options are also available. When an option is only +available with one of \fBtag\fR or \fBrtag\fR, it is noted below: +.SP +.IP "" 0 +\fB-a\fR +.IP "" 2 +Clear \fInew_tag\fR from removed files that would not otherwise be tagged +(\fBrtag\fR only). +.SP +.IP "" 0 +\fB-B\fR +.IP "" 2 +Allows \fB-d\fR or \fB-F\fR to delete or move branch tags. +.SP +\fBWARNING: Recovering the information stored by branch tags is +a very hard problem, more so than regular tags. Be absolutely sure you +understand what you are doing before using this
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Mar 3 21:26:18 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.texinfo Log Message: cvs.texinfo: add minor formatting fix for Texinfo >5.0 Pull over a tiny fix from pkgsrc's devel/scmcvs patch-ab to support generating info files with newer versions of Texinfo than what's shipped in base presently. (Should base be updated at some point, or for those using an external toolchain here.) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.8 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.9 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.8 Sun Mar 3 21:11:54 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Sun Mar 3 21:26:18 2019 @@ -111,9 +111,9 @@ approved by the Free Software Foundation @sp 4 @comment The title is printed in a large font. @center @titlefont{Version Management} -@sp +@sp 1 @center @titlefont{with} -@sp +@sp 1 @center @titlefont{CVS} @sp 2 @center for @sc{cvs} @value{VERSION}
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Mar 3 21:11:54 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: minor amendments and cvs.1 regen Put a cross-reference to "init" back in "Creating a Repository" and other minor formatting tweaks, and regenerate cvs.1 to reflect the previous changes by christos@ in cvs.texinfo r. 1.7. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl2/xcvs/dist/doc/cvs.1 \ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.7 src/external/gpl2/xcvs/dist/doc/cvs.1:1.8 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.7 Sat Mar 2 21:30:40 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Sun Mar 3 21:11:54 2019 @@ -3086,7 +3086,7 @@ See see node `Tracking sources\(aq in th .IX "init (subcommand)" .SP .IP "\(bu" 2 -init +Synopsis: init .IP "\(bu" 2 Requires: working directory. .IP "\(bu" 2 @@ -3096,10 +3096,16 @@ The \fBinit\fR command initializes a rep \fBCVSROOT\fR subdirectory and some default control files. You must use this command or initialize the repository in some other way before you can use it. Specify the root of the repository with the general -\fB-d\fR option. +\fB-d\fR option. This will set up an empty repository in the +\fBcvs\fR root specified in the usual way (see node `Repository\(aq in the CVS manual). +.SP +\fBinit\fR is careful to never overwrite any existing files in the +repository, so no harm is done if you run \fBinit\fR on an already +set-up repository. Note you may need to be a member of the group +\fBcvsadmin\fR to do this. .SP Note \fBinit\fR will enable history logging; if you don\(aqt want that, -remove the history file after running \fBinit\fR. +remove the history file after running \fBinit\fR (see node `history file\(aq in the CVS manual). .SP .SH "init examples" .SP Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.7 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.8 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.7 Sun Mar 3 02:21:07 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Sun Mar 3 21:11:54 2019 @@ -1939,6 +1939,9 @@ possible to use @sc{cvs} to read from a which one only has read access to; @sc{cvs} needs to be able to create lock files (@pxref{Concurrency}). +To create a repository, run the @code{cvs init} +command (@pxref{init}). + @node Backing up @section Backing up a repository @cindex Repository, backing up @@ -10868,21 +10871,20 @@ use this command or initialize the repos you can use it. Specify the root of the repository with the general @code{-d} option. This will set up an empty repository in the @sc{cvs} root specified in the usual way (@pxref{Repository}). -For example, -@code{cvs init} is careful to never overwrite any -existing files in the repository, so no harm is done if -you run @code{cvs init} on an already set-up -repository. Note you may need to be a member of the -group @code{cvsadmin} to do this. +@code{init} is careful to never overwrite any existing files in the +repository, so no harm is done if you run @code{init} on an already +set-up repository. Note you may need to be a member of the group +@code{cvsadmin} to do this. Note @code{init} will enable history logging; if you don't want that, -remove the history file after running @code{init}. @xref{history file}. +remove the history file after running @code{init} (@pxref{history file}). @menu * init examples: init examples @end menu +@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @node init examples @appendixsubsec init examples
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: christos Date: Sun Mar 3 02:21:07 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.texinfo Log Message: Fix the build by merging duplicate "init" sections. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.6 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.7 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.6 Sat Mar 2 16:30:40 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Sat Mar 2 21:21:07 2019 @@ -1939,26 +1939,6 @@ possible to use @sc{cvs} to read from a which one only has read access to; @sc{cvs} needs to be able to create lock files (@pxref{Concurrency}). -@cindex init (subcommand) -To create a repository, run the @code{cvs init} -command. It will set up an empty repository in the -@sc{cvs} root specified in the usual way -(@pxref{Repository}). For example, - -@example -cvs -d /usr/local/cvsroot init -@end example - -@code{cvs init} is careful to never overwrite any -existing files in the repository, so no harm is done if -you run @code{cvs init} on an already set-up -repository. Note you may need to be a member of the -group @code{cvsadmin} to do this. - -@code{cvs init} will enable history logging; if you -don't want that, remove the history file after running -@code{cvs init}. @xref{history file}. - @node Backing up @section Backing up a repository @cindex Repository, backing up @@ -10875,7 +10855,7 @@ See @ref{Tracking sources}, and @ref{Fro @itemize @bullet @item -init +Synopsis: init @item Requires: working directory. @item @@ -10886,12 +10866,23 @@ The @code{init} command initializes a re @file{CVSROOT} subdirectory and some default control files. You must use this command or initialize the repository in some other way before you can use it. Specify the root of the repository with the general -@code{-d} option. +@code{-d} option. This will set up an empty repository in the +@sc{cvs} root specified in the usual way (@pxref{Repository}). +For example, + +@code{cvs init} is careful to never overwrite any +existing files in the repository, so no harm is done if +you run @code{cvs init} on an already set-up +repository. Note you may need to be a member of the +group @code{cvsadmin} to do this. Note @code{init} will enable history logging; if you don't want that, -remove the history file after running @code{init}. +remove the history file after running @code{init}. @xref{history file}. + +@menu +* init examples: init examples +@end menu -@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @node init examples @appendixsubsec init examples
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Sat Mar 2 21:30:40 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: add details about "init" Add a section about the "init" command that has been missing all this time. Part of the basic description is resurrected from r. 1.20 of cvs.1 (in its prior incarnation in the CVS project tree under /man rather than /doc), contributed by Tom Lees back in 1999. The caveat about the history file is copied from elsewhere in the current cvs.texinfo file. Additional fragments written by me. Addresses the PR bin/45446. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.6 src/external/gpl2/xcvs/dist/doc/cvs.1:1.7 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.6 Tue Feb 12 01:32:08 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Sat Mar 2 21:30:40 2019 @@ -3081,6 +3081,36 @@ see node `modules\(aq in the CVS manual. .SP See see node `Tracking sources\(aq in the CVS manual, and see node `From files\(aq in the CVS manual. .SP +.SH "init" +.SS "Initialize a repository" +.IX "init (subcommand)" +.SP +.IP "\(bu" 2 +init +.IP "\(bu" 2 +Requires: working directory. +.IP "\(bu" 2 +Changes: repository, working directory. +.SP +The \fBinit\fR command initializes a repository by adding the +\fBCVSROOT\fR subdirectory and some default control files. You must +use this command or initialize the repository in some other way before +you can use it. Specify the root of the repository with the general +\fB-d\fR option. +.SP +Note \fBinit\fR will enable history logging; if you don\(aqt want that, +remove the history file after running \fBinit\fR. +.SP +.SH "init examples" +.SP +.PD 0 +.SP +.IP "" 2 +$ cvs -d /usr/local/cvsroot init + +.PD +.IP "" 0 +.SP .SH "log" .SS "Print out log information for files" .IX "log (subcommand)" Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.5 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.6 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.5 Tue Feb 12 01:32:08 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Sat Mar 2 21:30:40 2019 @@ -1952,7 +1952,8 @@ cvs -d /usr/local/cvsroot init @code{cvs init} is careful to never overwrite any existing files in the repository, so no harm is done if you run @code{cvs init} on an already set-up -repository. +repository. Note you may need to be a member of the +group @code{cvsadmin} to do this. @code{cvs init} will enable history logging; if you don't want that, remove the history file after running @@ -8126,6 +8127,7 @@ reference to @sc{cvs} commands, @pxref{I * export:: Export sources from CVS, similar to checkout * history:: Show status of files and users * import:: Import sources into CVS, using vendor branches +* init::Initialize a repository * log:: Show log messages for files * ls & rls::List files in the repository * rdiff:: 'patch' format diffs between releases @@ -10867,6 +10869,37 @@ to recreate symbolic links on checkout, See @ref{Tracking sources}, and @ref{From files}. @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@node init +@appendixsec init---Initialize a repository +@cindex init (subcommand) + +@itemize @bullet +@item +init +@item +Requires: working directory. +@item +Changes: repository, working directory. +@end itemize + +The @code{init} command initializes a repository by adding the +@file{CVSROOT} subdirectory and some default control files. You must +use this command or initialize the repository in some other way before +you can use it. Specify the root of the repository with the general +@code{-d} option. + +Note @code{init} will enable history logging; if you don't want that, +remove the history file after running @code{init}. + +@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +@node init examples +@appendixsubsec init examples + +@example +$ cvs -d /usr/local/cvsroot init +@end example + +@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node log @appendixsec log---Print out log information for files @cindex log (subcommand)
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Tue Feb 12 01:32:08 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: add information about the "update" command's "-t" flag to cvs.texinfo, so the installed man and info documentation match here. This makes cvs.1 auto-generable from cvs.texinfo again, which I plan to leverage with further additions later. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.5 src/external/gpl2/xcvs/dist/doc/cvs.1:1.6 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.5 Sun Feb 10 22:36:27 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Tue Feb 12 01:32:08 2019 @@ -3900,7 +3900,7 @@ Requires: repository, working directory. .IP "\(bu" 2 Changes: working directory. .SP -After you\(aqve run checkout to create your private copy +After you\(aqve run \fBcheckout\fR to create your private copy of source from the common repository, other developers will continue changing the central source. From time to time, when it is convenient in your development @@ -3954,19 +3954,6 @@ Local; run only in current working direc Prune empty directories. See see node `Moving directories\(aq in the CVS manual. .SP .IP "" 0 -\fB-t\fR -.IP "" 2 -Preserve source timestamps. Unlike \fBcheckout\fR where files are created -using the original timestamp of the file in the repository, \fBupdate\fR -updates files using the current time of the machine. This is convenient -because updated files appear newer than any other files on the system so -.BR make ( 1 ) -knows that are their corresponding built artifacts are out of date and -they will get rebuilt. The \fB-t\fR flag instead preserves the timestamps -of the original repository files, behaving exactly like \fBcheckout\fR. -This is useful for maintaining a tree in the original checked-out state. -.SP -.IP "" 0 \fB-p\fR .IP "" 2 Pipe files to the standard output. @@ -3986,6 +3973,18 @@ existed on \fIdate\fR. This option is s See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates. Also see see node `Common options\(aq in the CVS manual. .SP +.IP "" 0 +\fB-t\fR +.IP "" 2 +Preserve source timestamps. Unlike \fBcheckout\fR, where files are created +using the original timestamp of the file in the repository, \fBupdate\fR +updates files using the current time of the machine. This is convenient +because updated files appear newer than any other files on the system so +\fBmake(1)\fR knows that their corresponding built artifacts are out of date +and they will get rebuilt. The \fB-t\fR flag instead preserves the timestamps +of the original repository files, behaving exactly like \fBcheckout\fR. +This is useful for maintaining a tree in the original checked-out state. +.SP These special options are also available with \fBupdate\fR. .SP Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.4 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.5 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.4 Sun Feb 10 22:36:27 2019 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Tue Feb 12 01:32:08 2019 @@ -11595,14 +11595,14 @@ supported beginning with @sc{cvs} releas @itemize @bullet @item -update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D date] [-W spec] files@dots{} +update [-ACdflPpRt] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D date] [-W spec] files@dots{} @item Requires: repository, working directory. @item Changes: working directory. @end itemize -After you've run checkout to create your private copy +After you've run @code{checkout} to create your private copy of source from the common repository, other developers will continue changing the central source. From time to time, when it is convenient in your development @@ -11666,6 +11666,16 @@ and @var{tag} is a branch tag, the versi existed on @var{date}. This option is sticky, and implies @samp{-P}. See @ref{Sticky tags}, for more information on sticky tags/dates. Also see @ref{Common options}. + +@item -t +Preserve source timestamps. Unlike @code{checkout}, where files are created +using the original timestamp of the file in the repository, @code{update} +updates files using the current time of the machine. This is convenient +because updated files appear newer than any other files on the system so +@code{make(1)} knows that their corresponding built artifacts are out of date +and they will get rebuilt. The @samp{-t} flag instead preserves the timestamps +of the original repository files, behaving exactly like @code{checkout}. +This is useful
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Feb 10 22:36:27 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: add missing sections documenting the "add" and "remove" commands. These were never present upstream on the branch NetBSD imported, but were subsequently added on other branches (against upstream's HEAD: cvs.1: r. 1.53 & cvs.texinfo: r. 1.697). XXX While cvs.texinfo is supposed to be used to auto-generate cvs.1, that isn't safe at present, because content has been added direct to cvs.1 in NetBSD's tree. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.4 src/external/gpl2/xcvs/dist/doc/cvs.1:1.5 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.4 Fri Jan 20 16:54:11 2017 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Sun Feb 10 22:36:27 2019 @@ -674,6 +674,111 @@ Available with the following commands: \ and \fBupdate\fR. .SP .SP +.SH "add" +.SS "Add files and directories to the repository" +.IX "add (subcommand)" +.SP +.IP "\(bu" 2 +Synopsis: add [-k rcs-kflag] [-m message] files... +.IP "\(bu" 2 +Requires: repository, working directory. +.IP "\(bu" 2 +Changes: repository, working directory. +.SP +The \fBadd\fR command is used to present new files +and directories for addition into the \fBcvs\fR +repository. When \fBadd\fR is used on a directory, +a new directory is created in the repository +immediately. When used on a file, only the working +directory is updated. Changes to the repository are +not made until the \fBcommit\fR command is used on +the newly added file. +.SP +The \fBadd\fR command also resurrects files that +have been previously removed. This can be done +before or after the \fBcommit\fR command is used +to finalize the removal of files. Resurrected files +are restored into the working directory at the time +the \fBadd\fR command is executed. +.SP +.SH "add options" +.SP +These standard options are supported by \fBadd\fR +(see node `Common options\(aq in the CVS manual, for a complete description of +them): +.SP +.IP "" 0 +\fB-k \fIkflag\fB\fR +.IP "" 2 +Process keywords according to \fIkflag\fR. See +see node `Keyword substitution\(aq in the CVS manual. +This option is sticky; future updates of +this file in this working directory will use the same +\fIkflag\fR. The \fBstatus\fR command can be viewed +to see the sticky options. For more information on +the \fBstatus\fR command, see node `Invoking CVS\(aq in the CVS manual. +.SP +.IP "" 0 +\fB-m \fImessage\fB\fR +.IP "" 2 +Use \fImessage\fR as the log message, instead of +invoking an editor. +.SP +.SH "add examples" +.SP +.SS "Adding a directory" +.SP +.PD 0 +.SP +.IP "" 2 +$ mkdir doc +.IP "" 2 +$ cvs add doc +.IP "" 2 +Directory /path/to/repository/doc added to the repository + +.PD +.IP "" 0 +.SP +.SS "Adding a file" +.SP +.PD 0 +.SP +.SP +.IP "" 2 +$ >TODO +.IP "" 2 +$ cvs add TODO +.IP "" 2 +cvs add: scheduling file \`TODO\(aq for addition +.IP "" 2 +cvs add: use \(aqcvs commit\(aq to add this file permanently + +.PD +.IP "" 0 +.SP +.SS "Undoing a \fBremove\fR command" +.SP +.PD 0 +.SP +.IP "" 2 +$ rm -f makefile +.IP "" 2 +$ cvs remove makefile +.IP "" 2 +cvs remove: scheduling \`makefile\(aq for removal +.IP "" 2 +cvs remove: use \(aqcvs commit\(aq to remove this file permanently +.IP "" 2 +$ cvs add makefile +.IP "" 2 +U makefile +.IP "" 2 +cvs add: makefile, version 1.2, resurrected + +.PD +.IP "" 0 +.SP .SH "admin" .SS "Administration" .IX "Admin (subcommand)" @@ -3624,6 +3729,131 @@ $ .PD .IP "" 0 .SP +.SH "remove" +.SS "Remove files from active use" +.IX "remove (subcommand)" +.SP +.IP "\(bu" 2 +Synopsis: remove [-flR] [files...] +.IP "\(bu" 2 +Requires: repository, working directory. +.IP "\(bu" 2 +Changes: working directory. +.SP +The \fBremove\fR command is used to remove unwanted +files from active use. The user normally deletes the +files from the working directory prior to invocation +of the \fBremove\fR command. Only the working +directory is updated. Changes to the repository are +not made until the \fBcommit\fR command is run. +.SP +The \fBremove\fR command does not delete files from +from the repository. \fBcvs\fR keeps all historical +data in the repository so that it is possible to +reconstruct previous states of the projects under +revision control. +.SP +To undo \fBcvs\fR \fBremove\fR or to resurrect files +that were previously removed, see node `add\(aq in the CVS manual. +.SP +.SH "remove options" +.SP +These standard options are supported by \fBremove\fR +(see node `Common options\(aq in the CVS manual for a complete description of +them): +.SP +.IP "" 0 +\fB-l\fR
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Sat Jan 5 00:27:58 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/src: tag.c Log Message: When we we fail to remove tags, print an error message since we are going to be exiting with an error anyway. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/tag.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/tag.c diff -u src/external/gpl2/xcvs/dist/src/tag.c:1.4 src/external/gpl2/xcvs/dist/src/tag.c:1.5 --- src/external/gpl2/xcvs/dist/src/tag.c:1.4 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/tag.c Fri Jan 4 19:27:58 2019 @@ -17,7 +17,7 @@ * the modules database, if necessary. */ #include -__RCSID("$NetBSD: tag.c,v 1.4 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: tag.c,v 1.5 2019/01/05 00:27:58 christos Exp $"); #include "cvs.h" #include @@ -1189,7 +1189,7 @@ rtag_delete (RCSNode *rcsfile) if ((isbranch && !disturb_branch_tags) || (!isbranch && disturb_branch_tags)) { - if (!quiet) + if (!really_quiet) error (0, 0, "Not removing %s tag `%s' from `%s'%s.", isbranch ? "branch" : "non-branch", @@ -1200,7 +1200,7 @@ rtag_delete (RCSNode *rcsfile) if ((retcode = RCS_deltag(rcsfile, symtag)) != 0) { - if (!quiet) + if (!really_quiet) error (0, retcode == -1 ? errno : 0, "failed to remove tag `%s' from `%s'", symtag, rcsfile->path); @@ -1275,7 +1275,7 @@ tag_fileproc (void *callerdat, struct fi if ((isbranch && !disturb_branch_tags) || (!isbranch && disturb_branch_tags)) { - if (!quiet) + if (!really_quiet) error(0, 0, "Not removing %s tag `%s' from `%s'%s.", isbranch ? "branch" : "non-branch", @@ -1287,7 +1287,7 @@ tag_fileproc (void *callerdat, struct fi if ((retcode = RCS_deltag (vers->srcfile, symtag)) != 0) { - if (!quiet) + if (!really_quiet) error (0, retcode == -1 ? errno : 0, "failed to remove tag %s from %s", symtag, vers->srcfile->path);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Aug 21 15:37:34 UTC 2018 Modified Files: src/external/gpl2/xcvs/dist/src: main.c run.c Log Message: support SIGINFO To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/src/main.c cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/main.c diff -u src/external/gpl2/xcvs/dist/src/main.c:1.6 src/external/gpl2/xcvs/dist/src/main.c:1.7 --- src/external/gpl2/xcvs/dist/src/main.c:1.6 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/main.c Tue Aug 21 11:37:33 2018 @@ -17,7 +17,7 @@ * */ #include -__RCSID("$NetBSD: main.c,v 1.6 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.7 2018/08/21 15:37:33 christos Exp $"); #include "cvs.h" @@ -498,6 +498,32 @@ divide_by (unsigned char buf[COMMITID_RA return carry; } +#ifdef SIGINFO +#include + +static void +show_status (int n) +{ + char wd[PATH_MAX]; + char buf[2048]; + static int ttyfd = -2; + + if (ttyfd == -2) + ttyfd = open(_PATH_TTY, O_RDWR, O_CLOEXEC); + + if (ttyfd == -1) + return; + + if (getcwd(wd, sizeof(wd)) == NULL) + return; + n = snprintf(buf, sizeof(buf), "%s[%d]: working in %s\n", getprogname(), + (int)getpid(), wd); + if (n <= 0) + return; + write(ttyfd, buf, (size_t)n); +} +#endif + static void convert (char const input[COMMITID_RAW_SIZE], char *output) { @@ -967,6 +993,9 @@ cause intermittent sandbox corruption.") /* make sure we clean up on error */ signals_register (main_cleanup); +#ifdef SIGINFO + signal (SIGINFO, show_status); +#endif #ifdef KLUDGE_FOR_WNT_TESTSUITE /* Probably the need for this will go away at some point once Index: src/external/gpl2/xcvs/dist/src/run.c diff -u src/external/gpl2/xcvs/dist/src/run.c:1.3 src/external/gpl2/xcvs/dist/src/run.c:1.4 --- src/external/gpl2/xcvs/dist/src/run.c:1.3 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/run.c Tue Aug 21 11:37:33 2018 @@ -12,7 +12,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include -__RCSID("$NetBSD: run.c,v 1.3 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: run.c,v 1.4 2018/08/21 15:37:33 christos Exp $"); #include "cvs.h" @@ -239,6 +239,9 @@ run_exec (const char *stin, const char * #endif if (pid == 0) { +#ifdef SIGINFO + signal (SIGINFO, SIG_DFL); +#endif #ifdef SETXID_SUPPORT if (flags & RUN_UNSETXID) { (void) setgid (getgid ()); @@ -570,6 +573,9 @@ piped_child (char *const *command, int * error (1, errno, "cannot fork"); if (pid == 0) { +#ifdef SIGINFO + signal (SIGINFO, SIG_DFL); +#endif if (dup2 (to_child_pipe[0], STDIN_FILENO) < 0) error (1, errno, "cannot dup2 pipe"); if (close (to_child_pipe[1]) < 0)
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Sun Apr 29 15:47:01 UTC 2018 Modified Files: src/external/gpl2/xcvs/dist/src: create_adm.c Log Message: keep going if there is a CVS directory already, but warn To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/create_adm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/create_adm.c diff -u src/external/gpl2/xcvs/dist/src/create_adm.c:1.2 src/external/gpl2/xcvs/dist/src/create_adm.c:1.3 --- src/external/gpl2/xcvs/dist/src/create_adm.c:1.2 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/create_adm.c Sun Apr 29 11:47:01 2018 @@ -16,7 +16,7 @@ * "Entries" file is prefilled from the "initrecord" argument. */ #include -__RCSID("$NetBSD: create_adm.c,v 1.2 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: create_adm.c,v 1.3 2018/04/29 15:47:01 christos Exp $"); #include "cvs.h" @@ -49,7 +49,9 @@ Create_Admin (const char *dir, const cha tmp = Xasprintf ("%s/%s", dir, CVSADM); if (isfile (tmp)) - error (1, 0, "there is a version in %s already", update_dir); +{ + error (0, 0, "there is a version in %s already", update_dir); +} if (CVS_MKDIR (tmp, 0777) < 0) {
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Fri Sep 15 21:03:26 UTC 2017 Modified Files: src/external/gpl2/xcvs/dist/src: cvs.h filesubr.c find_names.c import.c rcs.c subr.c update.c vers_ts.c Log Message: 1/2 the number of {l,s}stat(2) calls by exposing the stat data found when calling islink()! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/cvs.h \ src/external/gpl2/xcvs/dist/src/subr.c cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/filesubr.c cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/find_names.c cvs rdiff -u -r1.7 -r1.8 src/external/gpl2/xcvs/dist/src/import.c cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/src/rcs.c cvs rdiff -u -r1.11 -r1.12 src/external/gpl2/xcvs/dist/src/update.c cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/vers_ts.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/cvs.h diff -u src/external/gpl2/xcvs/dist/src/cvs.h:1.4 src/external/gpl2/xcvs/dist/src/cvs.h:1.5 --- src/external/gpl2/xcvs/dist/src/cvs.h:1.4 Thu Mar 8 15:50:26 2012 +++ src/external/gpl2/xcvs/dist/src/cvs.h Fri Sep 15 17:03:26 2017 @@ -516,7 +516,7 @@ typedef RETSIGTYPE (*SIGCLEANUPPROC) (in int SIG_register (int sig, SIGCLEANUPPROC sigcleanup); bool isdir (const char *file); bool isfile (const char *file); -ssize_t islink (const char *file); +ssize_t islink (const char *file, struct stat *stp); bool isdevice (const char *file); bool isreadable (const char *file); bool iswritable (const char *file); Index: src/external/gpl2/xcvs/dist/src/subr.c diff -u src/external/gpl2/xcvs/dist/src/subr.c:1.4 src/external/gpl2/xcvs/dist/src/subr.c:1.5 --- src/external/gpl2/xcvs/dist/src/subr.c:1.4 Mon May 30 13:49:51 2016 +++ src/external/gpl2/xcvs/dist/src/subr.c Fri Sep 15 17:03:26 2017 @@ -13,7 +13,7 @@ * Various useful functions for the CVS support code. */ #include -__RCSID("$NetBSD: subr.c,v 1.4 2016/05/30 17:49:51 christos Exp $"); +__RCSID("$NetBSD: subr.c,v 1.5 2017/09/15 21:03:26 christos Exp $"); #include "cvs.h" @@ -719,7 +719,7 @@ resolve_symlink (char **filename) if (filename == NULL || *filename == NULL) return; -while ((rsize = islink (*filename)) > 0) +while ((rsize = islink (*filename, NULL)) > 0) { #ifdef HAVE_READLINK /* The clean thing to do is probably to have each filesubr.c Index: src/external/gpl2/xcvs/dist/src/filesubr.c diff -u src/external/gpl2/xcvs/dist/src/filesubr.c:1.5 src/external/gpl2/xcvs/dist/src/filesubr.c:1.6 --- src/external/gpl2/xcvs/dist/src/filesubr.c:1.5 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/filesubr.c Fri Sep 15 17:03:26 2017 @@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include -__RCSID("$NetBSD: filesubr.c,v 1.5 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: filesubr.c,v 1.6 2017/09/15 21:03:26 christos Exp $"); /* These functions were moved out of subr.c because they need different definitions under operating systems (like, say, Windows NT) with different @@ -25,6 +25,13 @@ __RCSID("$NetBSD: filesubr.c,v 1.5 2016/ #include "xsize.h" static int deep_remove_dir (const char *path); +#ifndef S_ISBLK +#define S_ISBLK(a) 0 +#endif +#ifndef S_ISCHR +#define S_ISCHR(a) 0 +#endif +#define IS_DEVICE(sbp) (S_ISBLK((sbp)->st_mode) || S_ISCHR((sbp)->st_mode)) /* * Copies "from" to "to". @@ -44,7 +51,7 @@ copy_file (const char *from, const char /* If the file to be copied is a link or a device, then just create the new link or device appropriately. */ -if ((rsize = islink (from)) > 0) +if ((rsize = islink (from, )) > 0) { char *source = Xreadlink (from, rsize); if (symlink (source, to) == -1) @@ -53,11 +60,9 @@ copy_file (const char *from, const char return; } -if (isdevice (from)) +if (sb.st_ino != -1 && IS_DEVICE ()) { #if defined(HAVE_MKNOD) && defined(HAVE_STRUCT_STAT_ST_RDEV) - if (stat (from, ) < 0) - error (1, errno, "cannot stat %s", from); mknod (to, sb.st_mode, sb.st_rdev); #else error (1, 0, "cannot copy device files on this system (%s)", from); @@ -136,14 +141,22 @@ isdir (const char *file) * Returns size of the link if it is a symbolic link. */ ssize_t -islink (const char *file) +islink (const char *file, struct stat *sbp) { ssize_t retsize = 0; #ifdef S_ISLNK struct stat sb; +if (sbp == NULL) + sbp = -if ((lstat (file, ) >= 0) && S_ISLNK (sb.st_mode)) - retsize = sb.st_size; +if (lstat (file, sbp) < 0) { + sbp->st_ino = -1; + return 0; +} +if (S_ISLNK (sbp->st_mode)) + retsize = sbp->st_size; +#else +sbp->st_ino = -1; #endif return retsize; } @@ -161,15 +174,7 @@ isdevice (const char *file) if (lstat (file, ) < 0) return false;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Aug 22 10:06:57 UTC 2017 Modified Files: src/external/gpl2/xcvs/dist/src: rsh-client.c Log Message: Fix for CVE-2017-12836; (cvs command injection) from MirBSD. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/rsh-client.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/rsh-client.c diff -u src/external/gpl2/xcvs/dist/src/rsh-client.c:1.2 src/external/gpl2/xcvs/dist/src/rsh-client.c:1.3 --- src/external/gpl2/xcvs/dist/src/rsh-client.c:1.2 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/rsh-client.c Tue Aug 22 06:06:57 2017 @@ -10,7 +10,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include -__RCSID("$NetBSD: rsh-client.c,v 1.2 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: rsh-client.c,v 1.3 2017/08/22 10:06:57 christos Exp $"); #include @@ -55,11 +55,11 @@ start_rsh_server (cvsroot_t *root, struc char *cvs_server = (root->cvs_server != NULL ? root->cvs_server : getenv ("CVS_SERVER")); int i = 0; -/* This needs to fit "rsh", "-b", "-l", "USER", "host", +/* This needs to fit "rsh", "-b", "-l", "USER", "--", "host", "cmd (w/ args)", and NULL. We leave some room to grow. */ -char *rsh_argv[10]; +char *rsh_argv[16]; -if (!cvs_rsh) +if (!cvs_rsh || !*cvs_rsh) /* People sometimes suggest or assume that this should default to "remsh" on systems like HPUX in which that is the system-supplied name for the rsh program. However, that @@ -99,6 +99,9 @@ start_rsh_server (cvsroot_t *root, struc rsh_argv[i++] = root->username; } +/* Only non-option arguments from here. (CVE-2017-12836) */ +rsh_argv[i++] = "--"; + rsh_argv[i++] = root->hostname; rsh_argv[i++] = cvs_server; rsh_argv[i++] = "server"; @@ -159,7 +162,7 @@ start_rsh_server (cvsroot_t *root, struc command = Xasprintf ("%s server", cvs_server); { -char *argv[10]; +char *argv[16]; char **p = argv; *p++ = cvs_rsh; @@ -173,6 +176,8 @@ start_rsh_server (cvsroot_t *root, struc *p++ = root->username; } + *p++ = "--"; + *p++ = root->hostname; *p++ = command; *p++ = NULL;
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: abhinav Date: Fri Jan 20 16:54:11 UTC 2017 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: Fix a spelling: s/regestring/registering To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.3 src/external/gpl2/xcvs/dist/doc/cvs.1:1.4 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.3 Wed Dec 21 21:26:28 2016 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Fri Jan 20 16:54:11 2017 @@ -1490,7 +1490,7 @@ cannot commit to a specific revision on Refuse to commit files unless the user has registered a valid edit on the file via \fBcvs edit\fR. This is most useful when \fBcommit -c\fR and \fBedit -c\fR have been placed in all \fB.cvsrc\fR files. -A commit can be forced anyways by either regestering an edit retroactively +A commit can be forced anyways by either registering an edit retroactively via \fBcvs edit\fR (no changes to the file will be lost) or using the \fB-f\fR option to commit. Support for \fBcommit -c\fR requires both client and a server versions 1.12.10 or greater. Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.2 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.3 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.2 Sat Sep 24 12:02:58 2011 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Fri Jan 20 16:54:11 2017 @@ -9541,7 +9541,7 @@ cannot commit to a specific revision on Refuse to commit files unless the user has registered a valid edit on the file via @code{cvs edit}. This is most useful when @samp{commit -c} and @samp{edit -c} have been placed in all @file{.cvsrc} files. -A commit can be forced anyways by either regestering an edit retroactively +A commit can be forced anyways by either registering an edit retroactively via @code{cvs edit} (no changes to the file will be lost) or using the @code{-f} option to commit. Support for @code{commit -c} requires both client and a server versions 1.12.10 or greater.
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Wed Jan 4 16:11:20 UTC 2017 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: only preserve timestamps on specific revisions if we've been asked to. found by martin@ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.10 src/external/gpl2/xcvs/dist/src/update.c:1.11 --- src/external/gpl2/xcvs/dist/src/update.c:1.10 Mon Dec 19 12:31:47 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Wed Jan 4 11:11:20 2017 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.10 2016/12/19 17:31:47 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.11 2017/01/04 16:11:20 christos Exp $"); #include "cvs.h" #include @@ -1382,7 +1382,6 @@ VERS: ", 0); xvers_ts = Version_TS (finfo, options, tag, date, force_tag_match, set_time); - if (strcmp (xvers_ts->options, "-V4") == 0) xvers_ts->options[0] = '\0'; @@ -1777,7 +1776,7 @@ patch_file (struct file_info *finfo, Ver /* This stuff is just copied blindly from checkout_file. I don't really know what it does. */ xvers_ts = Version_TS (finfo, options, tag, date, - force_tag_match, 1); + force_tag_match, preserve_timestamps_on_update); if (strcmp (xvers_ts->options, "-V4") == 0) xvers_ts->options[0] = '\0';
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: christos Date: Wed Dec 21 21:26:28 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 Log Message: document -t for update To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/doc/cvs.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.2 src/external/gpl2/xcvs/dist/doc/cvs.1:1.3 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.2 Sat Sep 24 08:02:58 2011 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Wed Dec 21 16:26:28 2016 @@ -3664,7 +3664,7 @@ supported beginning with \fBcvs\fR relea .IX "update (subcommand)" .SP .IP "\(bu" 2 -update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D date] [-W spec] files\&... +update [-ACdflPpRt] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D date] [-W spec] files\&... .IP "\(bu" 2 Requires: repository, working directory. .IP "\(bu" 2 @@ -3724,6 +3724,19 @@ Local; run only in current working direc Prune empty directories. See see node `Moving directories\(aq in the CVS manual. .SP .IP "" 0 +\fB-t\fR +.IP "" 2 +Preserve source timestamps. Unlike \fBcheckout\fR where files are created +using the original timestamp of the file in the repository, \fBupdate\fR +updates files using the current time of the machine. This is convenient +because updated files appear newer than any other files on the system so +.BR make ( 1 ) +knows that are their corresponding built artifacts are out of date and +they will get rebuilt. The \fB-t\fR flag instead preserves the timestamps +of the original repository files, behaving exactly like \fBcheckout\fR. +This is useful for maintaining a tree in the original checked-out state. +.SP +.IP "" 0 \fB-p\fR .IP "" 2 Pipe files to the standard output.
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Dec 19 17:31:47 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: fix the usage message To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.9 src/external/gpl2/xcvs/dist/src/update.c:1.10 --- src/external/gpl2/xcvs/dist/src/update.c:1.9 Sun Dec 18 23:54:49 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Mon Dec 19 12:31:47 2016 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.9 2016/12/19 04:54:49 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.10 2016/12/19 17:31:47 christos Exp $"); #include "cvs.h" #include @@ -127,12 +127,12 @@ static const char *const update_usage[] "\t-l\tLocal directory only, no recursion.\n", "\t-R\tProcess directories recursively.\n", "\t-p\tSend updates to standard output (avoids stickiness).\n", +"\t-t\tPreserve timestamps on update.\n", "\t-k kopt\tUse RCS kopt -k option on checkout. (is sticky)\n", "\t-r rev\tUpdate using specified revision/tag (is sticky).\n", "\t-D date\tSet date to update from (is sticky).\n", "\t-j rev\tMerge in changes made between current revision and rev.\n", "\t-I ign\tMore files to ignore (! to reset).\n", -"\t-t Preserve timestamps on update.\n", "\t-W spec\tWrappers specification line.\n", "(Specify the --help global option for a list of other help options)\n", NULL
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Dec 19 04:54:49 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: remove obsolete comment, flip polarity. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.8 src/external/gpl2/xcvs/dist/src/update.c:1.9 --- src/external/gpl2/xcvs/dist/src/update.c:1.8 Sun Dec 18 23:44:35 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Sun Dec 18 23:54:49 2016 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.8 2016/12/19 04:44:35 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.9 2016/12/19 04:54:49 christos Exp $"); #include "cvs.h" #include @@ -1373,11 +1373,7 @@ VERS: ", 0); /* set the time from the RCS file iff it was unknown before */ set_time = (!noexec - /* - * always pass the time to the client, and let it decide - * if it is going to set the time - */ - && (!preserve_timestamps_on_update || + && (preserve_timestamps_on_update || vers_ts->vn_user == NULL || strncmp (vers_ts->ts_rcs, "Initial", 7) == 0) && !file_is_dead);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Dec 19 04:44:35 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: fix reversed logic To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.7 src/external/gpl2/xcvs/dist/src/update.c:1.8 --- src/external/gpl2/xcvs/dist/src/update.c:1.7 Sun Dec 18 23:37:13 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Sun Dec 18 23:44:35 2016 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.7 2016/12/19 04:37:13 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.8 2016/12/19 04:44:35 christos Exp $"); #include "cvs.h" #include @@ -1377,7 +1377,7 @@ VERS: ", 0); * always pass the time to the client, and let it decide * if it is going to set the time */ - && (preserve_timestamps_on_update || + && (!preserve_timestamps_on_update || vers_ts->vn_user == NULL || strncmp (vers_ts->ts_rcs, "Initial", 7) == 0) && !file_is_dead);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Dec 19 04:37:13 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: add -t to preserve timestamps. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.6 src/external/gpl2/xcvs/dist/src/update.c:1.7 --- src/external/gpl2/xcvs/dist/src/update.c:1.6 Sun Dec 18 22:15:31 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Sun Dec 18 23:37:13 2016 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.6 2016/12/19 03:15:31 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.7 2016/12/19 04:37:13 christos Exp $"); #include "cvs.h" #include @@ -106,6 +106,7 @@ static int toss_local_changes = 0; static int force_tag_match = 1; static int update_build_dirs = 0; static int update_prune_dirs = 0; +static int preserve_timestamps_on_update = 0; static int pipeout = 0; static int dotemplate = 0; #ifdef SERVER_SUPPORT @@ -131,6 +132,7 @@ static const char *const update_usage[] "\t-D date\tSet date to update from (is sticky).\n", "\t-j rev\tMerge in changes made between current revision and rev.\n", "\t-I ign\tMore files to ignore (! to reset).\n", +"\t-t Preserve timestamps on update.\n", "\t-W spec\tWrappers specification line.\n", "(Specify the --help global option for a list of other help options)\n", NULL @@ -162,7 +164,7 @@ update (int argc, char **argv) /* parse the args */ getoptreset (); -while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:D:j:I:W:")) != -1) +while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:tD:j:I:W:")) != -1) { switch (c) { @@ -218,6 +220,9 @@ update (int argc, char **argv) pipeout = 1; noexec = 1; /* so no locks will be created */ break; + case 't': + preserve_timestamps_on_update = 1; + break; case 'j': if (join_orig2) error (1, 0, "only two -j options can be specified"); @@ -281,6 +286,8 @@ update (int argc, char **argv) send_arg("-C"); if (update_prune_dirs) send_arg("-P"); + if (preserve_timestamps_on_update) + send_arg("-t"); client_prune_dirs = update_prune_dirs; option_with_arg ("-r", tag); if (options && options[0] != '\0') @@ -1366,18 +1373,20 @@ VERS: ", 0); /* set the time from the RCS file iff it was unknown before */ set_time = (!noexec -#if 0 /* * always pass the time to the client, and let it decide * if it is going to set the time */ - && (vers_ts->vn_user == NULL || + && (preserve_timestamps_on_update || + vers_ts->vn_user == NULL || strncmp (vers_ts->ts_rcs, "Initial", 7) == 0) -#endif && !file_is_dead); + wrap_fromcvs_process_file (finfo->file); + xvers_ts = Version_TS (finfo, options, tag, date, force_tag_match, set_time); + if (strcmp (xvers_ts->options, "-V4") == 0) xvers_ts->options[0] = '\0';
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Dec 19 03:15:31 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: Always pass the modification time of the file to the client and let it decide if it is going to use it to set the time. This makes update work like checkout with respect to time setting. The time of the updated file is set to the repository modification time of the file as opposed to the the time that the file was checked out. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.5 src/external/gpl2/xcvs/dist/src/update.c:1.6 --- src/external/gpl2/xcvs/dist/src/update.c:1.5 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Sun Dec 18 22:15:31 2016 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.5 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.6 2016/12/19 03:15:31 christos Exp $"); #include "cvs.h" #include @@ -1366,12 +1366,16 @@ VERS: ", 0); /* set the time from the RCS file iff it was unknown before */ set_time = (!noexec +#if 0 + /* + * always pass the time to the client, and let it decide + * if it is going to set the time + */ && (vers_ts->vn_user == NULL || strncmp (vers_ts->ts_rcs, "Initial", 7) == 0) +#endif && !file_is_dead); - wrap_fromcvs_process_file (finfo->file); - xvers_ts = Version_TS (finfo, options, tag, date, force_tag_match, set_time); if (strcmp (xvers_ts->options, "-V4") == 0) @@ -1768,7 +1772,7 @@ patch_file (struct file_info *finfo, Ver /* This stuff is just copied blindly from checkout_file. I don't really know what it does. */ xvers_ts = Version_TS (finfo, options, tag, date, - force_tag_match, 0); + force_tag_match, 1); if (strcmp (xvers_ts->options, "-V4") == 0) xvers_ts->options[0] = '\0';
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon May 30 17:49:51 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: import.c subr.c Log Message: Make sure that all messages end in '\n' in make_message_rcsvalid() and compensate for it in add_rcs_file(). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/src/import.c cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/import.c diff -u src/external/gpl2/xcvs/dist/src/import.c:1.6 src/external/gpl2/xcvs/dist/src/import.c:1.7 --- src/external/gpl2/xcvs/dist/src/import.c:1.6 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/import.c Mon May 30 13:49:51 2016 @@ -21,7 +21,7 @@ * Additional arguments specify more Vendor Release Tags. */ #include -__RCSID("$NetBSD: import.c,v 1.6 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: import.c,v 1.7 2016/05/30 17:49:51 christos Exp $"); #include "cvs.h" #include "lstat.h" @@ -1409,7 +1409,7 @@ add_rcs_file (const char *message, const /* We are going to put the log message in the revision on the branch. So putting it here too seems kind of redundant, I guess (and that is what CVS has always done, anyway). */ - if (fprintf (fprcs, "Initial revision") < 0) + if (fprintf (fprcs, "Initial revision\n") < 0) goto write_error; } else @@ -1417,7 +1417,7 @@ add_rcs_file (const char *message, const if (expand_at_signs (message, (off_t) strlen (message), fprcs) < 0) goto write_error; } - if (fprintf (fprcs, "\012@\012") < 0 || + if (fprintf (fprcs, "@\012") < 0 || fprintf (fprcs, "text\012@") < 0) { goto write_error; @@ -1443,7 +1443,7 @@ add_rcs_file (const char *message, const fprintf (fprcs, "log\012@") < 0 || expand_at_signs (message, (off_t) strlen (message), fprcs) < 0 || - fprintf (fprcs, "\012@\012text\012") < 0 || + fprintf (fprcs, "@\012text\012") < 0 || fprintf (fprcs, "@@\012") < 0) goto write_error; } Index: src/external/gpl2/xcvs/dist/src/subr.c diff -u src/external/gpl2/xcvs/dist/src/subr.c:1.3 src/external/gpl2/xcvs/dist/src/subr.c:1.4 --- src/external/gpl2/xcvs/dist/src/subr.c:1.3 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/subr.c Mon May 30 13:49:51 2016 @@ -13,7 +13,7 @@ * Various useful functions for the CVS support code. */ #include -__RCSID("$NetBSD: subr.c,v 1.3 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: subr.c,v 1.4 2016/05/30 17:49:51 christos Exp $"); #include "cvs.h" @@ -542,7 +542,8 @@ make_message_rcsvalid (const char *messa if (message == NULL) message = ""; /* Strip whitespace from end of lines and end of string. */ -dp = dst = (char *) xmalloc (strlen (message) + 1); +/* One for NUL, one for \n */ +dp = dst = xmalloc (strlen (message) + 2); for (mp = message; *mp != '\0'; ++mp) { if (*mp == '\n') @@ -564,7 +565,12 @@ make_message_rcsvalid (const char *messa if (*dst == '\0') { free (dst); - dst = xstrdup ("*** empty log message ***"); + dst = xstrdup ("*** empty log message ***\n"); +} +else if (dp > dst && dp[-1] != '\n') +{ + *dp++ = '\n'; + *dp++ = '\0'; } return dst;
CVS commit: src/external/gpl2/xcvs/dist
Module Name:src Committed By: christos Date: Tue May 17 14:00:09 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/lib: __fpending.c alloca.c allocsa.c asnprintf.c asprintf.c atexit.c basename.c canon-host.c canonicalize.c chdir-long.c closeout.c cycle-check.c dirname.c dup-safer.c dup2.c error.c exitfail.c fd-safer.c filenamecat.c fncase.c fnmatch.c fnmatch_loop.c fseeko.c ftello.c ftruncate.c gai_strerror.c getaddrinfo.c getcwd.c getdate.c getdelim.c gethostname.c getline.c getlogin_r.c getndelim2.c getnline.c getopt.c getopt1.c getpass.c gettime.c gettimeofday.c glob.c lstat.c malloc.c mbchar.c md5.c memchr.c memmove.c mempcpy.c memrchr.c mkdir.c mkstemp.c mktime.c nanosleep.c openat.c pagealign_alloc.c pipe-safer.c printf-args.c printf-parse.c progname.c quotearg.c readlink.c realloc.c regcomp.c regex.c regex_internal.c regexec.c rename.c rpmatch.c save-cwd.c setenv.c sighandle.c strcasecmp.c strdup.c strerror.c strftime.c stripslash.c strncasecmp.c strnlen1.c strstr.c strtol.c strtoul.c sunos57-select.c tempname.c time_r.c unsetenv.c vasnprintf.c vasprintf.c waitpid.c xalloc-die.c xgetcwd.c xgethostname.c xmalloc.c xreadlink.c yesno.c src/external/gpl2/xcvs/dist/src: acl.c add.c admin.c annotate.c buffer.c checkin.c checkout.c classify.c client.c commit.c create_adm.c cvsrc.c diff.c edit.c entries.c error.c exithandle.c expand_path.c fileattr.c filesubr.c find_names.c gssapi-client.c hardlink.c hash.c history.c ignore.c import.c kerberos4-client.c lock.c log-buffer.c log.c login.c logmsg.c ls.c main.c mkmodules.c modules.c ms-buffer.c myndbm.c no_diff.c parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c root.c rsh-client.c run.c scramble.c server.c socket-client.c stack.c status.c subr.c tag.c update.c vers_ts.c version.c watch.c wrapper.c zlib.c Log Message: Add RCSID's To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/lib/__fpending.c \ src/external/gpl2/xcvs/dist/lib/alloca.c \ src/external/gpl2/xcvs/dist/lib/allocsa.c \ src/external/gpl2/xcvs/dist/lib/asnprintf.c \ src/external/gpl2/xcvs/dist/lib/asprintf.c \ src/external/gpl2/xcvs/dist/lib/atexit.c \ src/external/gpl2/xcvs/dist/lib/basename.c \ src/external/gpl2/xcvs/dist/lib/canon-host.c \ src/external/gpl2/xcvs/dist/lib/canonicalize.c \ src/external/gpl2/xcvs/dist/lib/chdir-long.c \ src/external/gpl2/xcvs/dist/lib/closeout.c \ src/external/gpl2/xcvs/dist/lib/cycle-check.c \ src/external/gpl2/xcvs/dist/lib/dirname.c \ src/external/gpl2/xcvs/dist/lib/dup-safer.c \ src/external/gpl2/xcvs/dist/lib/dup2.c \ src/external/gpl2/xcvs/dist/lib/error.c \ src/external/gpl2/xcvs/dist/lib/exitfail.c \ src/external/gpl2/xcvs/dist/lib/fd-safer.c \ src/external/gpl2/xcvs/dist/lib/filenamecat.c \ src/external/gpl2/xcvs/dist/lib/fncase.c \ src/external/gpl2/xcvs/dist/lib/fnmatch.c \ src/external/gpl2/xcvs/dist/lib/fnmatch_loop.c \ src/external/gpl2/xcvs/dist/lib/fseeko.c \ src/external/gpl2/xcvs/dist/lib/ftello.c \ src/external/gpl2/xcvs/dist/lib/ftruncate.c \ src/external/gpl2/xcvs/dist/lib/gai_strerror.c \ src/external/gpl2/xcvs/dist/lib/getaddrinfo.c \ src/external/gpl2/xcvs/dist/lib/getcwd.c \ src/external/gpl2/xcvs/dist/lib/getdelim.c \ src/external/gpl2/xcvs/dist/lib/gethostname.c \ src/external/gpl2/xcvs/dist/lib/getline.c \ src/external/gpl2/xcvs/dist/lib/getlogin_r.c \ src/external/gpl2/xcvs/dist/lib/getndelim2.c \ src/external/gpl2/xcvs/dist/lib/getnline.c \ src/external/gpl2/xcvs/dist/lib/getopt.c \ src/external/gpl2/xcvs/dist/lib/getopt1.c \ src/external/gpl2/xcvs/dist/lib/getpass.c \ src/external/gpl2/xcvs/dist/lib/gettime.c \ src/external/gpl2/xcvs/dist/lib/gettimeofday.c \ src/external/gpl2/xcvs/dist/lib/glob.c \ src/external/gpl2/xcvs/dist/lib/lstat.c \ src/external/gpl2/xcvs/dist/lib/malloc.c \ src/external/gpl2/xcvs/dist/lib/mbchar.c \ src/external/gpl2/xcvs/dist/lib/md5.c \ src/external/gpl2/xcvs/dist/lib/memchr.c \ src/external/gpl2/xcvs/dist/lib/memmove.c \ src/external/gpl2/xcvs/dist/lib/mempcpy.c \ src/external/gpl2/xcvs/dist/lib/memrchr.c \ src/external/gpl2/xcvs/dist/lib/mkdir.c \ src/external/gpl2/xcvs/dist/lib/mkstemp.c \ src/external/gpl2/xcvs/dist/lib/mktime.c \ src/external/gpl2/xcvs/dist/lib/nanosleep.c \ src/external/gpl2/xcvs/dist/lib/openat.c \ src/external/gpl2/xcvs/dist/lib/pagealign_alloc.c \ src/external/gpl2/xcvs/dist/lib/pipe-safer.c \ src/external/gpl2/xcvs/dist/lib/printf-args.c \
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Sun Feb 21 00:56:44 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: import.c Log Message: Handle the last newline in the "special" import for new file like RCS does. I.e. make_message_rcsvalid() removes it, and we put it back. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/import.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/import.c diff -u src/external/gpl2/xcvs/dist/src/import.c:1.4 src/external/gpl2/xcvs/dist/src/import.c:1.5 --- src/external/gpl2/xcvs/dist/src/import.c:1.4 Sat Jan 30 11:21:47 2016 +++ src/external/gpl2/xcvs/dist/src/import.c Sat Feb 20 19:56:44 2016 @@ -1407,7 +1407,7 @@ add_rcs_file (const char *message, const /* We are going to put the log message in the revision on the branch. So putting it here too seems kind of redundant, I guess (and that is what CVS has always done, anyway). */ - if (fprintf (fprcs, "Initial revision\012") < 0) + if (fprintf (fprcs, "Initial revision") < 0) goto write_error; } else @@ -1415,7 +1415,7 @@ add_rcs_file (const char *message, const if (expand_at_signs (message, (off_t) strlen (message), fprcs) < 0) goto write_error; } - if (fprintf (fprcs, "@\012") < 0 || + if (fprintf (fprcs, "\012@\012") < 0 || fprintf (fprcs, "text\012@") < 0) { goto write_error; @@ -1441,7 +1441,7 @@ add_rcs_file (const char *message, const fprintf (fprcs, "log\012@") < 0 || expand_at_signs (message, (off_t) strlen (message), fprcs) < 0 || - fprintf (fprcs, "@\012text\012") < 0 || + fprintf (fprcs, "\012@\012text\012") < 0 || fprintf (fprcs, "@@\012") < 0) goto write_error; }
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Sat Jan 30 16:21:47 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: import.c Log Message: Remove trailing whitespace from imported messages when adding now files. This is done in RCS_checkin() but we have a "fast path" for new files here that does not do it. Hooray for specialized code. XXX: pullup 6, 7 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/import.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/import.c diff -u src/external/gpl2/xcvs/dist/src/import.c:1.3 src/external/gpl2/xcvs/dist/src/import.c:1.4 --- src/external/gpl2/xcvs/dist/src/import.c:1.3 Thu Mar 8 15:47:45 2012 +++ src/external/gpl2/xcvs/dist/src/import.c Sat Jan 30 11:21:47 2016 @@ -579,7 +579,7 @@ static int process_import_file (char *message, char *vfile, char *vtag, int targc, char **targv) { -char *rcs; +char *rcs, *cleanmessage; int inattic = 0; rcs = Xasprintf ("%s/%s%s", repository, vfile, RCSEXT); @@ -654,13 +654,14 @@ process_import_file (char *message, char Entries_Close (entries); } #endif - - retval = add_rcs_file (message, rcs, vfile, vhead, our_opt, + cleanmessage = make_message_rcsvalid (message); + retval = add_rcs_file (cleanmessage, rcs, vfile, vhead, our_opt, vbranch, vtag, targc, targv, NULL, 0, logfp, killnew); if (free_opt != NULL) free (free_opt); free (rcs); + free (cleanmessage); return retval; } free (attic_name);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: tls Date: Sun Aug 10 07:09:51 UTC 2014 Modified Files: src/external/gpl2/xcvs/dist/src: server.c Log Message: Relax arbitrary limit of 10,000 changed files per commit idiotically introduced in CVS 1.11.17. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/server.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/server.c diff -u src/external/gpl2/xcvs/dist/src/server.c:1.5 src/external/gpl2/xcvs/dist/src/server.c:1.6 --- src/external/gpl2/xcvs/dist/src/server.c:1.5 Thu Sep 13 17:45:07 2012 +++ src/external/gpl2/xcvs/dist/src/server.c Sun Aug 10 07:09:51 2014 @@ -1130,7 +1130,7 @@ serve_max_dotdot (char *arg) if (proxy_log) return; #endif /* PROXY_SUPPORT */ -if (lim 0 || lim 1) +if (lim 0 || lim 100) return; p = xmalloc (strlen (server_temp_dir) + 2 * lim + 10); if (p == NULL) @@ -2989,7 +2989,7 @@ serve_argument (char *arg) if (error_pending()) return; -if (argument_count = 1) +if (argument_count = 100) { if (alloc_pending (80)) sprintf (pending_error_text,
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: apb Date: Sun Aug 10 07:33:37 UTC 2014 Modified Files: src/external/gpl2/xcvs/dist/src: server.c Log Message: Move the arbitrary limit on number of files per commit into #define MAXARGS. The limit used to be 1, but was changed to 100 earlier today. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/src/server.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/server.c diff -u src/external/gpl2/xcvs/dist/src/server.c:1.6 src/external/gpl2/xcvs/dist/src/server.c:1.7 --- src/external/gpl2/xcvs/dist/src/server.c:1.6 Sun Aug 10 07:09:51 2014 +++ src/external/gpl2/xcvs/dist/src/server.c Sun Aug 10 07:33:37 2014 @@ -153,6 +153,8 @@ static int argument_count; static char **argument_vector; static int argument_vector_size; +#define MAXARGS 100 /* arbitrary limit */ + /* * This is where we stash stuff we are going to use. Format string * which expects a single directory within it, starting with a slash. @@ -1130,7 +1132,7 @@ serve_max_dotdot (char *arg) if (proxy_log) return; #endif /* PROXY_SUPPORT */ -if (lim 0 || lim 100) +if (lim 0 || lim MAXARGS) return; p = xmalloc (strlen (server_temp_dir) + 2 * lim + 10); if (p == NULL) @@ -2989,7 +2991,7 @@ serve_argument (char *arg) if (error_pending()) return; -if (argument_count = 100) +if (argument_count = MAXARGS) { if (alloc_pending (80)) sprintf (pending_error_text,
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Nov 7 20:09:55 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: exithandle.c Log Message: Don't use SIG_register to register a SIG_IGN handler. It thinks it registers a fucntion, but then it ends up calling (*1)(13) with all signals blocked so cvs spins (with all signal blocked, getting SEGV). Use plain signal instead To reproduce: cvs log file | less and quit. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/exithandle.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/exithandle.c diff -u src/external/gpl2/xcvs/dist/src/exithandle.c:1.2 src/external/gpl2/xcvs/dist/src/exithandle.c:1.3 --- src/external/gpl2/xcvs/dist/src/exithandle.c:1.2 Wed Oct 30 10:25:47 2013 +++ src/external/gpl2/xcvs/dist/src/exithandle.c Thu Nov 7 15:09:55 2013 @@ -30,7 +30,7 @@ signals_register (RETSIGTYPE (*handler)( (void) SIG_register (SIGQUIT, handler); #endif #ifdef SIGPIPE - (void) SIG_register (SIGPIPE, SIG_IGN); + (void) signal (SIGPIPE, SIG_IGN); #endif #ifdef SIGTERM (void) SIG_register (SIGTERM, handler);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Wed Oct 30 14:25:47 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: exithandle.c Log Message: Ignore SIGPIPE; this is silly, we are getting EOF from a client, then while processing the error SIGPIPE comes because the client closed the connection, and then we end up calling error() while processing the error which prints silly messages on the console because it logs with LOG_EMERG. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/exithandle.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/exithandle.c diff -u src/external/gpl2/xcvs/dist/src/exithandle.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/exithandle.c:1.2 --- src/external/gpl2/xcvs/dist/src/exithandle.c:1.1.1.1 Tue Apr 7 18:10:26 2009 +++ src/external/gpl2/xcvs/dist/src/exithandle.c Wed Oct 30 10:25:47 2013 @@ -30,7 +30,7 @@ signals_register (RETSIGTYPE (*handler)( (void) SIG_register (SIGQUIT, handler); #endif #ifdef SIGPIPE - (void) SIG_register (SIGPIPE, handler); + (void) SIG_register (SIGPIPE, SIG_IGN); #endif #ifdef SIGTERM (void) SIG_register (SIGTERM, handler);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu May 9 15:25:44 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: acl.c Log Message: When checking for membership in the system group file don't forget to check the primary group of the user. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/acl.c diff -u src/external/gpl2/xcvs/dist/src/acl.c:1.4 src/external/gpl2/xcvs/dist/src/acl.c:1.5 --- src/external/gpl2/xcvs/dist/src/acl.c:1.4 Wed Oct 3 18:28:20 2012 +++ src/external/gpl2/xcvs/dist/src/acl.c Thu May 9 11:25:44 2013 @@ -30,6 +30,7 @@ */ #include cvs.h #include getline.h +#include pwd.h #include grp.h static int acl_fileproc (void *callerdat, struct file_info *finfo); @@ -556,18 +557,24 @@ check_default: if (debug) fprintf (stderr, usesystemgroups=%d\n, use_system_groups); if (use_system_groups) { struct group *griter; + struct passwd *pwd; + gid_t gid = (pwd = getpwnam(username)) != NULL ? pwd-pw_gid : -1; setgrent (); while (griter = getgrent ()) { - char **users=griter-gr_mem; - int index = 0; - char *userchk = users [index++]; - while(userchk != NULL) { - if(strcmp (userchk, username) == 0) - break; - userchk = users[index++]; + char *userchk; + if (gid == griter-gr_gid) { + userchk = username; + } else { + char **users = griter-gr_mem; + int index = 0; + userchk = users [index++]; + while(userchk != NULL) { + if(strcmp (userchk, username) == 0) + break; + userchk = users[index++]; + } } - if (debug) fprintf (stderr, usercheck=%s\n, userchk); if (userchk != NULL) { char *grp; if ((grp = findusername (part_perms, griter-gr_name)))
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: jakllsch Date: Sun Apr 21 19:34:14 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: error.c Log Message: Use LOG_ERR instead of LOG_EMERG, as LOG_EMERG causes syslogd to tell all ttys. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/error.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/error.c diff -u src/external/gpl2/xcvs/dist/src/error.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/error.c:1.2 --- src/external/gpl2/xcvs/dist/src/error.c:1.1.1.1 Tue Apr 7 22:10:26 2009 +++ src/external/gpl2/xcvs/dist/src/error.c Sun Apr 21 19:34:13 2013 @@ -208,7 +208,7 @@ memerror: * with the message here. */ #if HAVE_SYSLOG_H -syslog (LOG_DAEMON | LOG_EMERG, Memory exhausted. Aborting.); +syslog (LOG_DAEMON | LOG_ERR, Memory exhausted. Aborting.); #endif /* HAVE_SYSLOG_H */ goto sidestep_done; @@ -219,18 +219,18 @@ recursion_error: * error while attempting to send the last error message to the client. */ -syslog (LOG_DAEMON | LOG_EMERG, +syslog (LOG_DAEMON | LOG_ERR, error (%d, %d) called recursively. Original message was:, last_status, last_errnum); -syslog (LOG_DAEMON | LOG_EMERG, %s, last_message); +syslog (LOG_DAEMON | LOG_ERR, %s, last_message); -syslog (LOG_DAEMON | LOG_EMERG, +syslog (LOG_DAEMON | LOG_ERR, error (%d, %d) called recursively. Second message was:, status, errnum); -syslog (LOG_DAEMON | LOG_EMERG, %s, buf2); +syslog (LOG_DAEMON | LOG_ERR, %s, buf2); -syslog (LOG_DAEMON | LOG_EMERG, Aborting.); +syslog (LOG_DAEMON | LOG_ERR, Aborting.); #endif /* HAVE_SYSLOG_H */ sidestep_done:
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Wed Mar 27 18:15:13 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: lock.c Log Message: Don't abort with an assertion when a directory cannot be found in a repository. This could happen when someone copies from one directory to another CVS files or when things get corrupted. Provide an explanatory error message instead. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/lock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/lock.c diff -u src/external/gpl2/xcvs/dist/src/lock.c:1.2 src/external/gpl2/xcvs/dist/src/lock.c:1.3 --- src/external/gpl2/xcvs/dist/src/lock.c:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/lock.c Wed Mar 27 14:15:13 2013 @@ -230,6 +230,9 @@ lock_name (const char *repository, const * might have symlinks present */ len = find_root(repository, current_parsed_root-directory); + if (len == -1) + error (1, 0, %s not found in %s, + repository, current_parsed_root-directory); assert(len != -1); short_repos = repository + len + 1;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Wed Mar 27 19:23:28 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: lock.c Log Message: delete the assert as we'll never get there anyway. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/lock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/lock.c diff -u src/external/gpl2/xcvs/dist/src/lock.c:1.3 src/external/gpl2/xcvs/dist/src/lock.c:1.4 --- src/external/gpl2/xcvs/dist/src/lock.c:1.3 Wed Mar 27 14:15:13 2013 +++ src/external/gpl2/xcvs/dist/src/lock.c Wed Mar 27 15:23:28 2013 @@ -233,7 +233,6 @@ lock_name (const char *repository, const if (len == -1) error (1, 0, %s not found in %s, repository, current_parsed_root-directory); - assert(len != -1); short_repos = repository + len + 1; if (strcmp (repository, current_parsed_root-directory) == 0)
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Wed Oct 3 22:28:20 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: acl.c Log Message: - add more debugging - don't return memory we did not allocate, which the caller will then free! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/acl.c diff -u src/external/gpl2/xcvs/dist/src/acl.c:1.3 src/external/gpl2/xcvs/dist/src/acl.c:1.4 --- src/external/gpl2/xcvs/dist/src/acl.c:1.3 Fri Mar 9 10:24:34 2012 +++ src/external/gpl2/xcvs/dist/src/acl.c Wed Oct 3 18:28:20 2012 @@ -279,16 +279,26 @@ access_allowed (const char *file, const if (debug) fprintf(stderr, perm %d\n, perm); if (valid_perm (part_perms, perm)) { +if (debug) fprintf(stderr, signlevel=%d + x=%d, aclconfig_default_used=%d\n, +signlevel, x, aclconfig_default_used); if (signlevel == x) { if (strcmp(part_tag, ALL) != 0 - !aclconfig_default_used) + !aclconfig_default_used) { retval = 1; + if (debug) fprintf(stderr, + %s, %d: %d\n, __FILE__, __LINE__, + retval); +} } else if (!aclconfig_default_used) { signlevel = x; retval = 1; +if (debug) fprintf(stderr, + %s, %d: %d\n, __FILE__, __LINE__, + retval); } else { /* nothing... */ @@ -299,13 +309,20 @@ access_allowed (const char *file, const if (signlevel == x) { if (strcmp(part_tag, ALL) != 0 - !aclconfig_default_used) + !aclconfig_default_used) { retval = 0; + if (debug) fprintf(stderr, + %s, %d: %d\n, __FILE__, __LINE__, + retval); +} } else if (!aclconfig_default_used) { signlevel = x; retval = 0; +if (debug) fprintf(stderr, + %s, %d: %d\n, __FILE__, __LINE__, + retval); if (strncmp (part_type, f, 1) == 0) founddeniedfile = 1; @@ -334,11 +351,18 @@ access_allowed (const char *file, const if (valid_perm (part_perms, perm)) { retval = 1; + if (debug) fprintf(stderr, +%s, %d: %d\n, __FILE__, __LINE__, +retval); if (perm == 8) dadmin = 1; } - else + else { retval = 0; + if (debug) fprintf(stderr, +%s, %d: %d\n, __FILE__, __LINE__, +retval); + } } } @@ -353,10 +377,17 @@ access_allowed (const char *file, const { if (debug) fprintf(stderr, not found line\n); /* DEFAULT */ - if (valid_perm (NULL, perm)) + if (valid_perm (NULL, perm)) { retval = 1; - else + if (debug) fprintf(stderr, + %s, %d: %d\n, __FILE__, __LINE__, + retval); + } else { retval = 0; + if (debug) fprintf(stderr, + %s, %d: %d\n, __FILE__, __LINE__, + retval); + } } /* acl admin rigths 'p' */ @@ -491,7 +522,7 @@ get_perms (const char *part_perms) aclconfig_default_used = 1; if (debug) fprintf (stderr, default %s\n, cvs_acl_default_permissions); - return (cvs_acl_default_permissions); + return xstrdup(cvs_acl_default_permissions); } else { if (debug) fprintf (stderr, early %s\n, xperms);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Sep 13 17:45:07 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: server.c Log Message: Don't fail if we don't have a current_parsed_root, makes: 'echo version | cvs server' work again. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/server.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/server.c diff -u src/external/gpl2/xcvs/dist/src/server.c:1.4 src/external/gpl2/xcvs/dist/src/server.c:1.5 --- src/external/gpl2/xcvs/dist/src/server.c:1.4 Thu Mar 8 15:41:48 2012 +++ src/external/gpl2/xcvs/dist/src/server.c Thu Sep 13 13:45:07 2012 @@ -582,8 +582,6 @@ supported_response (char *name) static inline bool isProxyServer (void) { -assert (current_parsed_root); - /*** *** The following is done as a series of if/return combinations an an *** optimization. @@ -595,7 +593,7 @@ isProxyServer (void) if (!config || !config-PrimaryServer) return false; /* The directory must not match for all methods. */ -if (!isSamePath (config-PrimaryServer-directory, +if (current_parsed_root !isSamePath (config-PrimaryServer-directory, current_parsed_root-directory)) return true;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 22 20:49:55 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: sanity.sh Log Message: From Garo Taft: - Add a -w flag which will make the sanity script sleep for a second before and after checkouts, commits, and updates. - Fix expected output to look for the right default action on empty log message. It's now abort. - Add new requests Checkin-prog and Update-prog to expectation values. - Add new access�and group files to CVSROOT admin database expectation values. - All tests pass except client-20, which hangs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/sanity.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/sanity.sh diff -u src/external/gpl2/xcvs/dist/src/sanity.sh:1.2 src/external/gpl2/xcvs/dist/src/sanity.sh:1.3 --- src/external/gpl2/xcvs/dist/src/sanity.sh:1.2 Thu Mar 8 15:42:21 2012 +++ src/external/gpl2/xcvs/dist/src/sanity.sh Thu Mar 22 16:49:53 2012 @@ -22,7 +22,7 @@ usage () { echo Usage: `basename $0` --help -echo Usage: `basename $0` [--eklr] [-c CONFIG-FILE] [-f FROM-TEST] \\ +echo Usage: `basename $0` [--eklrw] [-c CONFIG-FILE] [-f FROM-TEST] \\ echo [-h HOSTNAME] [-s CVS-FOR-CVS-SERVER] CVS-TO-TEST \\ echo [TESTS-TO-RUN...] } @@ -69,6 +69,11 @@ exit_help () echo -p|--proxy test a secondary/primary CVS server (writeproxy) echo configuration (implies --remote). echo -r|--remote test client/server, as opposed to local, CVS +echo -w|--wait automatically sleep for a second before and after +echo checkouts, commits, and updates. Use this option +echo if you have fast cores and a slow disk. (For example, +echo you may need this flag if you see tests fail because +echo they think they have nothing to commit.) echo -s CVS-FOR-CVS-SERVER echo --server=CVS-FOR-CVS-SERVER echo use CVS-FOR-CVS-SERVER as the path to the CVS SERVER @@ -132,7 +137,8 @@ proxy=false remote=false servercvs=false skipfail=false -while getopts Hc:ef:h:klnprs:-: option ; do +waitforslowdisk=false +while getopts Hc:ef:h:klnprs:w-: option ; do # convert the long opts to short opts if test x$option = x-; then # remove any argument @@ -198,6 +204,10 @@ while getopts Hc:ef:h:klnprs:-: option ; option=e OPTARG= ;; + w|wa|wai|wait) + option=w + OPTARG= + ;; *) option=\? OPTARG= @@ -250,6 +260,9 @@ while getopts Hc:ef:h:klnprs:-: option ; servercvs=$OPTARG remote=: ;; + w) + waitforslowdisk=: + ;; \?) exit_usage ;; @@ -1488,6 +1501,17 @@ run_filter () fi } +maybe_sleep_if_ci_co_or_up () +{ + if $waitforslowdisk; then +case $@ in +* ci *|* ci|* commit *|* commit) sleep 1;; +* co *|* co|* checkout *|* checkout) sleep 1;; +* up *|* up|* update *|* update) sleep 1;; +esac + fi +} + # Usage: # dotest TESTNAME COMMAND OUTPUT [OUTPUT2] # TESTNAME is the name used in the log to identify the test. @@ -1503,6 +1527,7 @@ run_filter () # lack \|). dotest () { + maybe_sleep_if_ci_co_or_up $2 rm -f $TESTDIR/dotest.ex? 21 eval $2 $TESTDIR/dotest.tmp 21 status=$? @@ -1512,12 +1537,14 @@ dotest () echo exit status was $status ${LOGFILE} fail $1 fi + maybe_sleep_if_ci_co_or_up $2 dotest_internal $@ } # Like dotest except only 2 args and result must exactly match stdin dotest_lit () { + maybe_sleep_if_ci_co_or_up $2 rm -f $TESTDIR/dotest.ex? 21 eval $2 $TESTDIR/dotest.tmp 21 status=$? @@ -1527,6 +1554,7 @@ dotest_lit () echo exit status was $status $LOGFILE fail $1 fi + maybe_sleep_if_ci_co_or_up $2 cat $TESTDIR/dotest.exp if cmp $TESTDIR/dotest.exp $TESTDIR/dotest.tmp /dev/null 21; then pass $1 @@ -1543,6 +1571,7 @@ dotest_lit () # Like dotest except exitstatus should be nonzero. dotest_fail () { + maybe_sleep_if_ci_co_or_up $2 rm -f $TESTDIR/dotest.ex? 21 eval $2 $TESTDIR/dotest.tmp 21 status=$? @@ -1552,12 +1581,14 @@ dotest_fail () echo exit status was $status $LOGFILE fail $1 fi + maybe_sleep_if_ci_co_or_up $2 dotest_internal $@ } # Like dotest except output is sorted. dotest_sort () { + maybe_sleep_if_ci_co_or_up $2 rm -f $TESTDIR/dotest.ex? 21 eval $2 $TESTDIR/dotest.tmp1 21 status=$? @@ -1568,12 +1599,14 @@ dotest_sort () fail $1 fi $TR ' ' ' ' $TESTDIR/dotest.tmp1 | sort $TESTDIR/dotest.tmp + maybe_sleep_if_ci_co_or_up $2 dotest_internal $@ } # Like dotest_fail except output is sorted. dotest_fail_sort () { + maybe_sleep_if_ci_co_or_up $2 rm -f $TESTDIR/dotest.ex? 21 eval $2 $TESTDIR/dotest.tmp1 21 status=$? @@ -1584,6 +1617,7 @@ dotest_fail_sort () fail $1 fi $TR ' ' ' '
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Mar 13 17:12:30 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: mkmodules.c Log Message: Entries to the file contents need to be NULL terminated. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/mkmodules.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/mkmodules.c diff -u src/external/gpl2/xcvs/dist/src/mkmodules.c:1.5 src/external/gpl2/xcvs/dist/src/mkmodules.c:1.6 --- src/external/gpl2/xcvs/dist/src/mkmodules.c:1.5 Thu Mar 8 15:45:28 2012 +++ src/external/gpl2/xcvs/dist/src/mkmodules.c Tue Mar 13 13:12:30 2012 @@ -99,6 +99,7 @@ static const char *const access_contents }; static const char *const group_contents[] = { + NULL }; /* Structure which describes an administrative file. */
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Fri Mar 9 15:24:34 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: acl.c Log Message: remove statement with no effect. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/acl.c diff -u src/external/gpl2/xcvs/dist/src/acl.c:1.2 src/external/gpl2/xcvs/dist/src/acl.c:1.3 --- src/external/gpl2/xcvs/dist/src/acl.c:1.2 Thu Mar 8 15:37:29 2012 +++ src/external/gpl2/xcvs/dist/src/acl.c Fri Mar 9 10:24:34 2012 @@ -208,7 +208,7 @@ access_allowed (const char *file, const dirs[intcount] = xstrdup(filefullname); } -for (accessfilecount; accessfilecount = 0 flag; accessfilecount--) +for (; accessfilecount = 0 flag; accessfilecount--) { if (!use_separate_acl_file_for_each_dir) { flag = 0;
CVS commit: src/external/gpl2/xcvs/dist/acl
Module Name:src Committed By: christos Date: Thu Mar 8 20:30:38 UTC 2012 Added Files: src/external/gpl2/xcvs/dist/acl: COPYING COPYING.LIB INSTALL README aclconfig.default Log Message: add acl info To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/xcvs/dist/acl/COPYING \ src/external/gpl2/xcvs/dist/acl/COPYING.LIB \ src/external/gpl2/xcvs/dist/acl/INSTALL \ src/external/gpl2/xcvs/dist/acl/README \ src/external/gpl2/xcvs/dist/acl/aclconfig.default Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl2/xcvs/dist/acl/COPYING diff -u /dev/null src/external/gpl2/xcvs/dist/acl/COPYING:1.1 --- /dev/null Thu Mar 8 15:30:39 2012 +++ src/external/gpl2/xcvs/dist/acl/COPYING Thu Mar 8 15:30:38 2012 @@ -0,0 +1,248 @@ + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +Program, below, refers to any such program or work, and a work based +on the Program means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as you. + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + +a) cause the modified files to carry prominent notices stating that +you changed the files and the date of any change; and + +b) cause the whole of any work that you distribute or publish, that +in whole or in part contains the Program or any part thereof, either +with or without modifications, to be licensed at no charge to all +third parties under the terms of this General Public License (except +that you may choose to grant warranty protection to some or
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:32:18 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: version.c Log Message: announce acl support To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/version.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/version.c diff -u src/external/gpl2/xcvs/dist/src/version.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/version.c:1.2 --- src/external/gpl2/xcvs/dist/src/version.c:1.1.1.1 Tue Apr 7 18:10:29 2009 +++ src/external/gpl2/xcvs/dist/src/version.c Thu Mar 8 15:32:18 2012 @@ -30,7 +30,9 @@ char *config_string = \n; #endif #endif - +/* cvsacl patch */ +static const char aclpatch_string[] = +with CVSACL Patch 1.2.5 (cvsacl.sourceforge.net)\n; static const char *const version_usage[] = { @@ -63,6 +65,8 @@ version (int argc, char **argv) released. */ (void) fputs (PACKAGE_STRING, stdout); (void) fputs (config_string, stdout); +/* cvsacl patch */ +(void) fputs (aclpatch_string, stdout); #ifdef CLIENT_SUPPORT if (current_parsed_root current_parsed_root-isremote)
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:32:31 UTC 2012 Added Files: src/external/gpl2/xcvs/dist/src: acl.c Log Message: acl support To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl2/xcvs/dist/src/acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl2/xcvs/dist/src/acl.c diff -u /dev/null src/external/gpl2/xcvs/dist/src/acl.c:1.1 --- /dev/null Thu Mar 8 15:32:31 2012 +++ src/external/gpl2/xcvs/dist/src/acl.c Thu Mar 8 15:32:31 2012 @@ -0,0 +1,2162 @@ +/* + * Copyright (C) 2006 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 2006, Baris Sahin sbaris at users.sourceforge.net + * http://cvsacl.sourceforge.net + * + * + * You may distribute under the terms of the GNU General Public License as + * specified in the README file that comes with the CVS source distribution. + * + * + * + * CVS ACCESS CONTROL LIST EXTENSION + * + * It provides advanced access control definitions per modules, + * directories, and files on branch/tag for remote cvs repository + * connections.Execution of all CVS subcommands can be controlled + * with eight different permissions. + * + * Permission Types: + * - no permission (n) (1) + * - all permissions(a) (2) + * - write permission (w) (3) + * - tag permission (t) (4) + * - read permission(r) (5) + * - add permission (c) (6) + * - remove permission (d) (7) + * - permission change (p) (8) + * + */ +#include cvs.h +#include getline.h +#include grp.h + +#define free(x) (void)(x) + +static int acl_fileproc (void *callerdat, struct file_info *finfo); + +static Dtype acl_dirproc (void *callerdat, const char *dir, const char *repos, + const char *update_dir, List *entries); + +static int acllist_fileproc (void *callerdat, struct file_info *finfo); +static Dtype acllist_dirproc (void *callerdat, const char *dir, + const char *repos, const char *update_dir, + List *entries); + +static void acllist_print (char *line, const char *obj); + +static int racl_proc (int argc, char **argv, char *xwhere, + char *mwhere, char *mfile, int shorten, + int local_specified, char *mname, char *msg); + +static FILE *open_accessfile (char *xmode, const char *repos, char **fname); +static FILE *open_groupfile (char *xmode); + +static char *get_perms (const char *xperms); +static char *make_perms (char *xperms, char *xfounduserpart, char **xerrmsg); + +static char *findusername (const char *string1, const char *string2); +static char *findgroupname (const char *string1, const char *string2); +static int valid_tag (const char *part_tag, const char *tag); +static int valid_perm (const char *part_perms, int perm); +static int write_perms (const char *user, const char *perms, + const char *founduserpart, int foundline, + char *otheruserparts, const char *part_type, + const char *part_object, const char *part_tag, int pos, + const char *arepos); + +static char *cache_repository; +static int cache_retval; +static int founddeniedfile; +static int cache_perm; + +static int is_racl; +static int debug = 0; + +int use_cvs_acl = 0; +char *cvs_acl_default_permissions; +int use_cvs_groups = 0; +int use_system_groups = 0; +int use_separate_acl_file_for_each_dir = 0; +char *cvs_acl_file_location = NULL; +char *cvs_groups_file_location = NULL; +char *cvs_server_run_as = NULL; +int stop_at_first_permission_denied = 0; + +char *tag = NULL; + +char *muser; +char *mperms; +static int defaultperms; + +static char *default_perms_object; +char *default_part_perms_accessfile; +int aclconfig_default_used; + +int acldir = 0; +int aclfile = 0; +int listacl = 0; + +int userfound = 0; +int groupfound = 0; + +/* directory depth ... */ +char *dirs[255]; + +static const char *const acl_usage[] = +{ +Usage: %s %s [user||group:permissions] [-Rl] [-r tag] [directories...] [files...]\n, +\t-R\tProcess directories recursively.\n, +\t-r rev\tExisting revision/tag.\n, +\t-l\tList defined ACLs.\n, +(Specify the --help global option for a list of other help options)\n, +NULL +}; + +static const char *const racl_usage[] = +{ +Usage: %s %s [user||group:permissions] [-Rl] [-r tag] [directories...] + [files...]\n, +\t-R\tProcess directories recursively.\n, +\t-r rev\tExisting revision/tag.\n, +\t-l\tList defined ACLs.\n, +(Specify the --help global option for a list of other help options)\n, +NULL +}; + + +int +access_allowed (const char *file, const char *repos, const char *tag, + int perm, char **mline, int *mpos, int usecache) +{ +int retval = 0; +int foundline = 0; +FILE *accessfp; + +int flag = 1; + +char *iline; +char *tempv; +char *tempc; +size_t tempsize; + +int
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:33:02 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: - acl support - check chdir return To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.3 src/external/gpl2/xcvs/dist/src/update.c:1.4 --- src/external/gpl2/xcvs/dist/src/update.c:1.3 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/update.c Thu Mar 8 15:33:02 2012 @@ -596,6 +596,25 @@ update_fileproc (void *callerdat, struct status = Classify_File (finfo, tag, date, options, force_tag_match, aflag, vers, pipeout); +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (finfo-file, finfo-repository, vers-tag, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } +} +#endif + /* Keep track of whether TAG is a branch tag. Note that if it is a branch tag in some files and a nonbranch tag in others, treat it as a nonbranch tag. */ @@ -1039,7 +1058,8 @@ update_dirleave_proc (void *callerdat, c { /* FIXME: chdir (..) loses with symlinks. */ /* Prune empty dirs on the way out - if necessary */ - (void) CVS_CHDIR (..); + if (CVS_CHDIR (..) == -1) + error (0, errno, Cannot chdir to ..); if (update_prune_dirs isemptydir (dir, 0)) { /* I'm not sure the existence_error is actually possible (except
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:34:35 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: tag.c Log Message: - restrict tag command to non-destructive operations for non-admins. [deletion, moving is dissallowed] - add history for tag commands - cvs acl support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/tag.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/tag.c diff -u src/external/gpl2/xcvs/dist/src/tag.c:1.2 src/external/gpl2/xcvs/dist/src/tag.c:1.3 --- src/external/gpl2/xcvs/dist/src/tag.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/tag.c Thu Mar 8 15:34:35 2012 @@ -18,6 +18,7 @@ */ #include cvs.h +#include grp.h #include save-cwd.h static int rtag_proc (int argc, char **argv, char *xwhere, @@ -106,15 +107,17 @@ static const char *const tag_usage[] = NULL }; - +char *UserTagOptions = bcflRrD; int cvstag (int argc, char **argv) { +struct group *grp; bool local = false; /* recursive by default */ int c; int err = 0; bool run_module_prog = true; +int only_allowed_options; is_rtag = (strcmp (cvs_cmd_name, rtag) == 0); @@ -122,8 +125,11 @@ cvstag (int argc, char **argv) usage (is_rtag ? rtag_usage : tag_usage); getoptreset (); +only_allowed_options = 1; while ((c = getopt (argc, argv, is_rtag ? rtag_opts : tag_opts)) != -1) { + if (!strchr(UserTagOptions, c)) + only_allowed_options = 0; switch (c) { case 'a': @@ -193,6 +199,42 @@ cvstag (int argc, char **argv) error (0, 0, warning: -b ignored with -d options); RCS_check_tag (symtag); +#ifdef CVS_ADMIN_GROUP +if (!only_allowed_options + (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL) +{ +#ifdef HAVE_GETGROUPS + gid_t *grps; + int i, n; + + /* get number of auxiliary groups */ + n = getgroups (0, NULL); + if (n 0) + error (1, errno, unable to get number of auxiliary groups); + grps = (gid_t *) xmalloc((n + 1) * sizeof *grps); + n = getgroups (n, grps); + if (n 0) + error (1, errno, unable to get list of auxiliary groups); + grps[n] = getgid(); + for (i = 0; i = n; i++) + if (grps[i] == grp-gr_gid) break; + free (grps); + if (i n) + error (1, 0, usage is restricted to members of the group %s, + CVS_ADMIN_GROUP); +#else + char *me = getcaller(); + char **grnam; + + for (grnam = grp-gr_mem; *grnam; grnam++) + if (strcmp (*grnam, me) == 0) break; + if (!*grnam getgid() != grp-gr_gid) + error (1, 0, usage is restricted to members of the group %s, + CVS_ADMIN_GROUP); +#endif +} +#endif /* defined CVS_ADMIN_GROUP */ + #ifdef CLIENT_SUPPORT if (current_parsed_root-isremote) { @@ -271,6 +313,13 @@ cvstag (int argc, char **argv) } else { + int i; + for (i = 0; i argc; i++) + { + /* XXX last arg should be repository, but doesn't make sense here */ + history_write ('T', (delete_flag ? D : (numtag ? numtag : + (date ? date : A))), symtag, argv[i], ); + } err = rtag_proc (argc + 1, argv - 1, NULL, NULL, NULL, 0, local, NULL, NULL); } @@ -948,6 +997,25 @@ rtag_fileproc (void *callerdat, struct f * correctly without breaking your link! */ +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (finfo-file, finfo-repository, numtag, 4, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } +} +#endif + if (delete_flag) { retval = rtag_delete (rcsfile); @@ -1167,6 +1235,21 @@ tag_fileproc (void *callerdat, struct fi if (!nversion) goto free_vars_and_return; } + +/* cvsacl patch */ +#ifdef SERVER_SUPPORT + if (use_cvs_acl /* server_active */) + { + if (!access_allowed (finfo-file, finfo-repository, vers-tag, 4, + NULL, NULL, 1)) + { + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + return (0); + } +} +#endif + if (delete_flag) {
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:37:29 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: acl.c Log Message: fix malloc botches in the original code To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/xcvs/dist/src/acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/acl.c diff -u src/external/gpl2/xcvs/dist/src/acl.c:1.1 src/external/gpl2/xcvs/dist/src/acl.c:1.2 --- src/external/gpl2/xcvs/dist/src/acl.c:1.1 Thu Mar 8 15:32:31 2012 +++ src/external/gpl2/xcvs/dist/src/acl.c Thu Mar 8 15:37:29 2012 @@ -32,8 +32,6 @@ #include getline.h #include grp.h -#define free(x) (void)(x) - static int acl_fileproc (void *callerdat, struct file_info *finfo); static Dtype acl_dirproc (void *callerdat, const char *dir, const char *repos, @@ -488,7 +486,7 @@ get_perms (const char *part_perms) /* no defined acl, no default acl in access file, * or no access file at all */ if (part_perms == NULL) { -if (cvs_acl_default_permissions) + if (cvs_acl_default_permissions) { aclconfig_default_used = 1; if (debug) fprintf (stderr, default %s\n, @@ -515,10 +513,12 @@ check_default: usr = strtok (founduser, !\t); per = strtok (NULL, ,\t); + free(xperms); xperms = xstrdup (per); xperms_len = strlen (xperms); userfound = 1; + free (founduser); } else { @@ -548,6 +548,7 @@ check_default: xrealloc_and_strcat (xperms, xperms_len, gperm); groupfound = 1; + free (grp); } } } @@ -566,19 +567,23 @@ check_default: while ((read = getline (line, line_allocated, groupfp)) = 0) { + char *user; if (line[0] == '#' || line[0] == '\0' || line[0] == '\n') continue; if (line[read - 1] == '\n') line[--read] = '\0'; - if (grp = findusername (part_perms, - findgroupname (line, username))) + if ((grp = findgroupname (line, username)) + (user = findusername (part_perms, grp))) + { - gperm = strtok (grp, !\t); + gperm = strtok (user, !\t); gperm = strtok (NULL, ,\t); xrealloc_and_strcat (xperms, xperms_len, gperm); groupfound = 1; + free (grp); + free (user); } } @@ -607,8 +612,6 @@ check_default: xperms_len = strlen (xperms); } - free(foundall); - /* You don't free pointers from strtok()! */ //free(usr); //free(per); @@ -819,7 +822,7 @@ racl_proc (int argc, char **argv, char * char *myargv[2]; int err = 0; int which; -char *repository = NULL; +char *repository; char *where; char *obj; size_t objlen = 0; @@ -832,11 +835,10 @@ racl_proc (int argc, char **argv, char * if (is_racl) { + char *v; repository = Xasprintf (%s/%s, current_parsed_root-directory, argv[0]); - where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : - strlen (mfile) + 1) + 1); - (void) strcpy (where, argv[0]); + where = xstrdup (argv[0]); /* if mfile isn't null, we need to set up to do only part of the * module */ @@ -850,10 +852,12 @@ racl_proc (int argc, char **argv, char * if ((cp = strrchr (mfile, '/')) != NULL) { *cp = '\0'; - (void) strcat (repository, /); - (void) strcat (repository, mfile); - (void) strcat (where, /); - (void) strcat (where, mfile); + v = Xasprintf (%s/%s, repository, mfile); + free (repository); + repository = v; + v = Xasprintf (%s/%s, where, mfile); + free(where); + where = v; mfile = cp + 1; } @@ -862,18 +866,20 @@ racl_proc (int argc, char **argv, char * if (isdir (path)) { /* directory means repository gets the dir tacked on */ - (void) strcpy (repository, path); - (void) strcat (where, /); - (void) strcat (where, mfile); + free(repository); + repository = path; + v = Xasprintf (%s/%s, where, mfile); + free(where); + where = v; } else { + free (path); myargv[0] = argv[0]; myargv[1] = mfile; argc = 2; argv = myargv; } - free (path); } /* cd to the starting repository */ @@ -901,6 +907,7 @@ racl_proc (int argc, char **argv, char * else { where = NULL; + repository = NULL; which = W_LOCAL | W_REPOS | W_ATTIC; obj = xstrdup (argv[1]); @@ -918,14 +925,16 @@ racl_proc (int argc, char **argv, char * if (listacl) err = start_recursion (acllist_fileproc, NULL, acllist_dirproc, NULL, NULL, argc - 1, argv + 1, local, which, 0, 0, - (char *) where, 1, repository); + where, 1, repository); else err = start_recursion (acl_fileproc, NULL, acl_dirproc, NULL, NULL, argc - 1, argv + 1, local, which, 0, 0, - (char *) where, 1, repository); + where, 1, repository); if (repository != NULL) free (repository); +if (where != NULL) + free (where); return err; } @@
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:39:28 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: Makefile.am Log Message: add acl.c To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/Makefile.am Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/Makefile.am diff -u src/external/gpl2/xcvs/dist/src/Makefile.am:1.1.1.1 src/external/gpl2/xcvs/dist/src/Makefile.am:1.2 --- src/external/gpl2/xcvs/dist/src/Makefile.am:1.1.1.1 Tue Apr 7 18:10:23 2009 +++ src/external/gpl2/xcvs/dist/src/Makefile.am Thu Mar 8 15:39:28 2012 @@ -26,6 +26,7 @@ bin_SCRIPTS = cvsbug # The cvs executable cvs_SOURCES = \ + acl.c \ add.c \ admin.c \ annotate.c \
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:41:04 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: subr.c Log Message: - Put back %, which was removed from the new format strings [with reversed meaning, so that we are still compatible with the new format] - Fix format strings To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/subr.c diff -u src/external/gpl2/xcvs/dist/src/subr.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/subr.c:1.2 --- src/external/gpl2/xcvs/dist/src/subr.c:1.1.1.1 Tue Apr 7 18:10:28 2009 +++ src/external/gpl2/xcvs/dist/src/subr.c Thu Mar 8 15:41:04 2012 @@ -1285,7 +1285,7 @@ format_cmdline (const char *format, ...) dellist(pflist); free(b); error (1, 0, -internal error: unknown integer arg size (%d), +internal error: unknown integer arg size (%zu), length); break; } @@ -1328,7 +1328,7 @@ format_cmdline (const char *format, ...) dellist(pflist); free(b); error (1, 0, -internal error: unknown floating point arg size (%d), +internal error: unknown floating point arg size (%zu), length); break; } @@ -1458,6 +1458,7 @@ format_cmdline (const char *format, ...) *output string into separate arguments * * %X means sub var X into location + * NB: The meaning of the following 2 formats is reversed in the new mode * %{VWXYZ} means sub V,W,X,Y,Z into location as a single arg. The shell *|| would be to quote the comma separated arguments. Each list *that V, W, X, Y, and Z represent attributes of will cause a new @@ -1567,6 +1568,12 @@ format_cmdline (const char *format, ...) } } #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ + if (*s == ',') { +#ifdef SUPPORT_OLD_INFO_FMT_STRINGS + if (!oldway) +#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ + s++, onearg = 1; + } /* parse the format string and sub in... */ if (*s == '{')
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:41:20 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: status.c Log Message: Add cvs acl support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/status.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/status.c diff -u src/external/gpl2/xcvs/dist/src/status.c:1.2 src/external/gpl2/xcvs/dist/src/status.c:1.3 --- src/external/gpl2/xcvs/dist/src/status.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/status.c Thu Mar 8 15:41:20 2012 @@ -127,6 +127,26 @@ status_fileproc (void *callerdat, struct Node *node; status = Classify_File (finfo, NULL, NULL, NULL, 1, 0, vers, 0); + +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (finfo-file, finfo-repository, vers-tag, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } +} +#endif + sstat = Classify Error; switch (status) {
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:41:48 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: server.c Log Message: - check return value of write(2) - add acl support To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/server.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/server.c diff -u src/external/gpl2/xcvs/dist/src/server.c:1.3 src/external/gpl2/xcvs/dist/src/server.c:1.4 --- src/external/gpl2/xcvs/dist/src/server.c:1.3 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/server.c Thu Mar 8 15:41:48 2012 @@ -692,7 +692,8 @@ error ENOMEM Virtual memory exhausted.\n */ /* If this gives an error, not much we could do. syslog() it? */ -write (STDOUT_FILENO, msg, sizeof (msg) - 1); +if (write (STDOUT_FILENO, msg, sizeof (msg) - 1) == -1) + exit(EXIT_FAILURE); # ifdef HAVE_SYSLOG_H syslog (LOG_DAEMON | LOG_ERR, virtual memory exhausted); # endif /* HAVE_SYSLOG_H */ @@ -977,12 +978,16 @@ error ENOMEM Virtual memory exhausted.\n if (forced !quiet alloc_pending_warning (120 + strlen (program_name))) sprintf (pending_warning_text, -E %s server: Forcing compression level %d (allowed: %d = z = %d)., +E %s server: Forcing compression level %d (allowed: %zu = z = %zu)., program_name, gzip_level, config-MinCompressionLevel, config-MaxCompressionLevel); } -if (!nolock) { +/* cvsacl patch */ +parse_aclconfig (current_parsed_root-directory); + +if (!nolock) +{ path = xmalloc (strlen (current_parsed_root-directory) + sizeof (CVSROOTADM) + 2); @@ -4623,7 +4628,20 @@ serve_rls (char *arg) do_cvs_command (rls, ls); } - +/* cvsacl patch */ +static void +serve_acl (char *arg) +{ +do_cvs_command (acl, cvsacl); +} + +/* cvsacl patch */ +static void +serve_racl (char *arg) +{ +cvs_cmd_name = racl; +do_cvs_command (racl, cvsacl); +} static void serve_add (char *arg) @@ -5488,7 +5506,7 @@ serve_gzip_contents (char *arg) if (forced !quiet alloc_pending_warning (120 + strlen (program_name))) sprintf (pending_warning_text, -E %s server: Forcing compression level %d (allowed: %d = z = %d)., +E %s server: Forcing compression level %d (allowed: %zu = z = %zu)., program_name, level, config-MinCompressionLevel, config-MaxCompressionLevel); @@ -5519,7 +5537,7 @@ serve_gzip_stream (char *arg) if (forced !quiet alloc_pending_warning (120 + strlen (program_name))) sprintf (pending_warning_text, -E %s server: Forcing compression level %d (allowed: %d = z = %d)., +E %s server: Forcing compression level %d (allowed: %zu = z = %zu)., program_name, level, config-MinCompressionLevel, config-MaxCompressionLevel); @@ -5936,6 +5954,11 @@ struct request requests[] = REQ_LINE(diff, serve_diff, 0), REQ_LINE(log, serve_log, 0), REQ_LINE(rlog, serve_rlog, 0), + + /* cvsacl patch */ + REQ_LINE(acl, serve_acl, 0), + REQ_LINE(racl, serve_racl, 0), + REQ_LINE(list, serve_ls, 0), REQ_LINE(rlist, serve_rls, 0), /* This allows us to avoid sending `-q' as a command argument to `cvs ls', @@ -6232,7 +6255,8 @@ server_cleanup (void) /* Make sure our working directory isn't inside the tree we're going to delete. */ - CVS_CHDIR (get_cvs_tmp_dir ()); + if (CVS_CHDIR (get_cvs_tmp_dir ()) == -1) + error (0, errno, Cannot chdir to `%s', get_cvs_tmp_dir ()); /* Temporarily clear noexec, so that we clean up our temp directory regardless of it (this could more cleanly be handled by moving @@ -6553,6 +6577,10 @@ switch_to_user (const char *cvs_username } #endif +/* cvsacl patch */ +if (use_cvs_acl cvs_server_run_as) + username = cvs_server_run_as; + pw = getpwnam (username); if (pw == NULL) { @@ -7252,6 +7280,9 @@ pserver_authenticate_connection (void) in a new CVSROOT/config file to fix the broken one! */ config = get_root_allow_config (repository, gConfigPath); +/* cvsacl patch */ +parse_aclconfig (repository); + /* We need the real cleartext before we hash it. */ descrambled_password = descramble (password); host_user = check_password (username, descrambled_password, repository);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:42:21 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: sanity.sh Log Message: attempt to fix the unit tests To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/sanity.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/sanity.sh diff -u src/external/gpl2/xcvs/dist/src/sanity.sh:1.1.1.1 src/external/gpl2/xcvs/dist/src/sanity.sh:1.2 --- src/external/gpl2/xcvs/dist/src/sanity.sh:1.1.1.1 Tue Apr 7 18:10:33 2009 +++ src/external/gpl2/xcvs/dist/src/sanity.sh Thu Mar 8 15:42:21 2012 @@ -2801,7 +2801,7 @@ for what in $tests; do # so we might as well test it dotest version-1 ${testcvs} --version \ ' -Concurrent Versions System (CVS) [0-9.]*.* +Concurrent Versions System (CVS) [0-9.]*.*with CVSACL Patch [0-9.]*.* Copyright (C) [0-9]* Free Software Foundation, Inc. @@ -2823,7 +2823,9 @@ Specify the --help option for further in if $remote; then dotest version-2r ${testcvs} version \ 'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*) -Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)' +with CVSACL Patch [0-9p.]* (.*) +Server: Concurrent Versions System (CVS) [0-9p.]* (.*server) +with CVSACL Patch [0-9p.]* (.*)' else dotest version-2 ${testcvs} version \ 'Concurrent Versions System (CVS) [0-9.]*.*' @@ -3328,9 +3330,9 @@ ${SPROG} \[admin aborted\]: attempt to d # lib/getopt.c will use POSIX when __posixly_correct # otherwise the other, so accept both of them. -- mdb dotest_fail basicb-21 ${testcvs} -q admin -H \ -admin: invalid option -- H +admin: invalid option -- '*H'* ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information \ -admin: illegal option -- H +admin: illegal option -- '*H'* ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information cd .. rmdir 1 @@ -4637,6 +4639,7 @@ A [0-9-]* [0-9:]* ${PLUS} ${username A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file7 first-dir/dir1 == ${TESTDIR} A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file6 first-dir/dir1/dir2 == ${TESTDIR} A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file7 first-dir/dir1/dir2 == ${TESTDIR} +T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[second-dive:A\] A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file14first-dir == ${TESTDIR} M [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file6 first-dir == ${TESTDIR} R [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file7 first-dir == ${TESTDIR} @@ -4646,6 +4649,7 @@ R [0-9-]* [0-9:]* ${PLUS} ${username A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file14first-dir/dir1/dir2 == ${TESTDIR} M [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file6 first-dir/dir1/dir2 == ${TESTDIR} R [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file7 first-dir/dir1/dir2 == ${TESTDIR} +T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[third-dive:A\] F [0-9-]* [0-9:]* ${PLUS} ${username} =first-dir= ${TESTDIR}/\* T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[rtagged-by-head:A\] T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[rtagged-by-tag:rtagged-by-head\] @@ -4660,6 +4664,7 @@ A [0-9-]* [0-9:]* ${PLUS} ${username A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file7 first-dir/dir1 == remote A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file6 first-dir/dir1/dir2 == remote A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file7 first-dir/dir1/dir2 == remote +T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[second-dive:A\] A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file14first-dir == remote M [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file6 first-dir == remote R [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file7 first-dir == remote @@ -4669,6 +4674,7 @@ R [0-9-]* [0-9:]* ${PLUS} ${username A [0-9-]* [0-9:]* ${PLUS} ${username} 1\.1 file14first-dir/dir1/dir2 == remote M [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file6 first-dir/dir1/dir2 == remote R [0-9-]* [0-9:]* ${PLUS} ${username} 1\.2 file7 first-dir/dir1/dir2 == remote +T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[third-dive:A\] F [0-9-]* [0-9:]* ${PLUS} ${username} =first-dir= remote/\* T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[rtagged-by-head:A\] T [0-9-]* [0-9:]* ${PLUS} ${username} first-dir \[rtagged-by-tag:rtagged-by-head\] @@ -4692,7 +4698,8 @@ W [0-9-]* [0-9:]* ${PLUS} ${username dotest ls-init-1 $testcvs -Q co -dtop . cd top dotest ls-1 $testcvs ls CVSROOT \ -checkoutlist +aclconfig +checkoutlist commitinfo config cvswrappers @@ -4712,6 +4719,7 @@ verifymsg CVSROOT CVSROOT: +aclconfig
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:42:57 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: recurse.c Log Message: restore lost fix: add nolock To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/recurse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/recurse.c diff -u src/external/gpl2/xcvs/dist/src/recurse.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/recurse.c:1.2 --- src/external/gpl2/xcvs/dist/src/recurse.c:1.1.1.1 Tue Apr 7 18:10:27 2009 +++ src/external/gpl2/xcvs/dist/src/recurse.c Thu Mar 8 15:42:56 2012 @@ -619,7 +619,7 @@ do_recursion (struct recursion_frame *fr if (frame-flags == R_SKIP_ALL) return 0; -locktype = noexec ? CVS_LOCK_NONE : frame-locktype; +locktype = (nolock || noexec) ? CVS_LOCK_NONE : frame-locktype; /* The fact that locks are not active here is what makes us fail to have the
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:43:19 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: rcs.c Log Message: use the result of strtoul To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/rcs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/rcs.c diff -u src/external/gpl2/xcvs/dist/src/rcs.c:1.4 src/external/gpl2/xcvs/dist/src/rcs.c:1.5 --- src/external/gpl2/xcvs/dist/src/rcs.c:1.4 Tue Apr 21 14:43:52 2009 +++ src/external/gpl2/xcvs/dist/src/rcs.c Thu Mar 8 15:43:19 2012 @@ -823,7 +823,7 @@ warning: duplicate key `%s' in version ` error (1, 0, \ unrecognized operation '\\x%x' in %s, op, rcs-print_path); - (void) strtoul (cp, (char **) cp, 10); + count = strtoul (cp, (char **) cp, 10); if (*cp++ != ' ') error (1, 0, space expected in %s revision %s, rcs-print_path, vnode-version);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:43:48 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: patch.c Log Message: - better handling of binary files - add acl support To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/patch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/patch.c diff -u src/external/gpl2/xcvs/dist/src/patch.c:1.5 src/external/gpl2/xcvs/dist/src/patch.c:1.6 --- src/external/gpl2/xcvs/dist/src/patch.c:1.5 Sat Sep 24 08:02:58 2011 +++ src/external/gpl2/xcvs/dist/src/patch.c Thu Mar 8 15:43:48 2012 @@ -498,6 +498,43 @@ patch_fileproc (void *callerdat, struct goto out2; } +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (rev1) + { + if (!access_allowed (finfo-file, finfo-repository, rev1, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } + } + if (rev2) + { + if (!access_allowed (finfo-file, finfo-repository, rev2, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } + } +} +#endif + /* Create 3 empty files. I'm not really sure there is any advantage * to doing so now rather than just waiting until later. * @@ -619,14 +656,18 @@ patch_fileproc (void *callerdat, struct if (getline (line1, line1_chars_allocated, fp) 0 || getline (line2, line2_chars_allocated, fp) 0) { - if (feof (fp)) - error (0, 0, \ + if (line1 strncmp(Binary files , line1, 13) == 0) { + cvs_output (Binary files are different\n, 0); + } else { + if (feof (fp)) + error (0, 0, \ failed to read diff file header %s for %s: end of file, tmpfile3, rcs); - else - error (0, errno, - failed to read diff file header %s for %s, - tmpfile3, rcs); - ret = 1; + else + error (0, errno, + failed to read diff file header %s for %s, + tmpfile3, rcs); + ret = 1; + } if (fclose (fp) 0) error (0, errno, error closing %s, tmpfile3); goto out;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:44:06 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: parseinfo.c Log Message: add acl function prototype To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/parseinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/parseinfo.c diff -u src/external/gpl2/xcvs/dist/src/parseinfo.c:1.2 src/external/gpl2/xcvs/dist/src/parseinfo.c:1.3 --- src/external/gpl2/xcvs/dist/src/parseinfo.c:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/parseinfo.c Thu Mar 8 15:44:06 2012 @@ -250,7 +250,7 @@ readSizeT (const char *infopath, const c infopath, option, p[strlen(p)]); return false; } - TRACE (TRACE_DATA, readSizeT(): Found factor %u for %s, + TRACE (TRACE_DATA, readSizeT(): Found factor %zu for %s, factor, option); } @@ -274,9 +274,9 @@ readSizeT (const char *infopath, const c /* Don't return an error, just max out. */ num = SIZE_MAX; -TRACE (TRACE_DATA, readSizeT(): read number %u for %s, num, option); +TRACE (TRACE_DATA, readSizeT(): read number %zu for %s, num, option); *val = xtimes (strtoul (p, NULL, 10), factor); -TRACE (TRACE_DATA, readSizeT(): returnning %u for %s, *val, option); +TRACE (TRACE_DATA, readSizeT(): returnning %zu for %s, *val, option); return true; } @@ -731,3 +731,191 @@ parse_config (const char *cvsroot, const return retval; } + +/* cvsacl patch */ +int +parse_aclconfig (const char *cvsroot) +{ +char *infopath; +FILE *fp_info; +char *line = NULL; +size_t line_allocated = 0; +size_t len; +char *p; +/* FIXME-reentrancy: If we do a multi-threaded server, this would need + to go to the per-connection data structures. */ +static int parsed = 0; + +/* Authentication code and serve_root might both want to call us. + Let this happen smoothly. */ +if (parsed) + return 0; +parsed = 1; + +infopath = xmalloc (strlen (cvsroot) + + sizeof (CVSROOTADM_ACLCONFIG) + + sizeof (CVSROOTADM) + + 10); +if (infopath == NULL) +{ + error (0, 0, out of memory; cannot allocate infopath); + goto error_return; +} + +strcpy (infopath, cvsroot); +strcat (infopath, /); +strcat (infopath, CVSROOTADM); +strcat (infopath, /); +strcat (infopath, CVSROOTADM_ACLCONFIG); + +fp_info = CVS_FOPEN (infopath, r); +if (fp_info == NULL) +{ + /* If no file, don't do anything special. */ + if (!existence_error (errno)) + { + /* Just a warning message; doesn't affect return + value, currently at least. */ + error (0, errno, cannot open %s, infopath); + } + free (infopath); + return 0; +} + +while (getline (line, line_allocated, fp_info) = 0) +{ + /* Skip comments. */ + if (line[0] == '#') + continue; + + len = strlen (line) - 1; + if (line[len] == '\n') + line[len] = '\0'; + + /* Skip blank lines. */ + if (line[0] == '\0') + continue; + + /* The first '=' separates keyword from value. */ + p = strchr (line, '='); + if (p == NULL) + { + /* Probably should be printing line number. */ + error (0, 0, syntax error in %s: line '%s' is missing '=', + infopath, line); + goto error_return; + } + + *p++ = '\0'; + + if (strcmp (line, UseCVSACL) == 0) + { + if (strcmp (p, no) == 0) + use_cvs_acl = 0; + else if (strcmp (p, yes) == 0) + use_cvs_acl = 1; + else + { + error (0, 0, unrecognized value '%s' for UseCVSACL, p); + goto error_return; + } + } + else if (strcmp (line, UseSeperateACLFileForEachDir) == 0) + { + if (strcmp (p, no) == 0) + use_separate_acl_file_for_each_dir = 0; + else if (strcmp (p, yes) == 0) + use_separate_acl_file_for_each_dir = 1; + else + { + error (0, 0, unrecognized value '%s' for UseSeperateACLFileForEachDir, p); + goto error_return; + } + } + else if (strcmp (line, StopAtFirstPermissionDenied) == 0) + { + if (strcmp (p, no) == 0) + stop_at_first_permission_denied = 0; + else if (strcmp (p, yes) == 0) + stop_at_first_permission_denied = 1; + else + { + error (0, 0, unrecognized value '%s' for StopAtFirstPermissionDenied, p); + goto error_return; + } + } + else if (strcmp (line, CVSACLDefaultPermissions) == 0) + { + if (cvs_acl_default_permissions != NULL) + free (cvs_acl_default_permissions); + if (!given_perms_valid (p)) +error (1,0,Invalid CVS ACL Default Permissions: '%s' in CVSROOT/aclconfig, p); + cvs_acl_default_permissions = xstrdup (p); + } + else if (strcmp (line, UseCVSGroups) == 0) + { + if (strcmp (p, no) == 0) + use_cvs_groups = 0; + else if (strcmp (p, yes) == 0) + use_cvs_groups = 1; + else + { + error (0, 0, unrecognized value '%s' for UseCVSGroups, p); + goto error_return; + } + } + else if
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:44:32 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: parseinfo.h Log Message: add acl prototype To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/parseinfo.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/parseinfo.h diff -u src/external/gpl2/xcvs/dist/src/parseinfo.h:1.2 src/external/gpl2/xcvs/dist/src/parseinfo.h:1.3 --- src/external/gpl2/xcvs/dist/src/parseinfo.h:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/parseinfo.h Thu Mar 8 15:44:32 2012 @@ -65,4 +65,5 @@ struct config bool parse_error (const char *, unsigned int); struct config *parse_config (const char *, const char *); void free_config (struct config *data); +int parse_aclconfig (const char *cvsroot); #endif /* !PARSEINFO_H */
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:45:28 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: mkmodules.c Log Message: - add acl support - document availability of tag commands. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/mkmodules.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/mkmodules.c diff -u src/external/gpl2/xcvs/dist/src/mkmodules.c:1.4 src/external/gpl2/xcvs/dist/src/mkmodules.c:1.5 --- src/external/gpl2/xcvs/dist/src/mkmodules.c:1.4 Fri Jul 29 14:47:11 2011 +++ src/external/gpl2/xcvs/dist/src/mkmodules.c Thu Mar 8 15:45:28 2012 @@ -28,6 +28,79 @@ static void rename_dbmfile (char *temp); static void write_dbmfile (char *temp); #endif/* !MY_NDBM */ +/* cvsacl patch */ +static const char *const aclconfig_contents[] = { + # Set `UseCVSACL' to yes to use CVSACL feature.\n, + UseCVSACL=yes\n, + \n, + # Default CVSACL Permission to use.\n, + #CVSACLDefaultPermissions=p\n, + \n, + # Default file location for CVS ACL file (access) is CVSROOT/access.\n, + # If you want to use a different location, define it below.\n, + #CVSACLFileLocation=/path/to/cvs/access\n, + \n, + # Set `UseSystemGroups' to yes to use system group definitions (/etc/group).\n, + UseSystemGroups=yes\n, + \n, + # Set `UseCVSGroups' to yes to use another group file.\n, + #UseCVSGroups=yes\n, + \n, + # Default file location for CVS groups file is CVSROOT/group.\n, + # If you want to use a different location, define it below.\n, + #CVSGroupsFileLocation=/path/to/cvs/group\n, + \n, + # Set UseSeperateACLFileForEachDir to yes in order to use a\n, + # seperate 'access' file for each directory.\n, + # This increased the performance if you have really big repository.\n, + #UseSeperateACLFileForEachDir=no\n, + \n, + # If StopAtFirstPermissionDenied is set to yes\n, + # operation will stop at first permission denied message.\n, + # Default is no.\n, + #StopAtFirstPermissionDenied=no\n, + \n, + # Set CVSServerRunAsUser to a system user, in order CVS server\n, + # to run as.\n, + #CVSServerRunAsUser=runascvsuser, + NULL +}; + +static const char *const access_contents[] = { + # CVS ACL definitions file. DO NOT EDIT MANUALLY\n, + #\n, + # BNF:\n, + # entry: + filetype:path:tag-branch:permission-list:\n, + # filetype:d|f\n, + # path:ALL | unix-file-path\n, + # tag-branch: ALL | HEAD | name\n, + # permission-list: permission\n, + #| permission-list , permission\n, + # permission: actor!privilege\n, + # actor: ALL | user | group\n, + # privilegen | a | w | t | r | c | d | p\n, + #\n, + # Valid privileges are:\n, + # * - no permission (n) (1)\n, + # * - all permissions(a) (2)\n, + # * - write permission (w) (3)\n, + # * - tag permission (t) (4)\n, + # * - read permission(r) (5)\n, + # * - add permission (c) (6)\n, + # * - remove permission (d) (7)\n, + # * - permission change (p) (8)\n, + #\n, + # Valid filetypes are:\n, + # * - plain file (f)\n, + # * - directory (d)\n, + #\n, + NULL +}; + +static const char *const group_contents[] = { +}; + /* Structure which describes an administrative file. */ struct admin_file { /* Name of the file, within the CVSROOT directory. */ @@ -73,6 +146,7 @@ static const char *const loginfo_content #endif #%p = path relative to repository\n, #%r = repository (path portion of $CVSROOT)\n, +#%t = tagname\n, #%{sVv} = attribute list = file name, old version number (pre-checkin),\n, # new version number (post-checkin). When either old or new revision\n, # is unknown, doesn't exist, or isn't applicable, the string \NONE\\n, @@ -168,6 +242,7 @@ static const char *const commitinfo_cont #endif #%p = path relative to repository\n, #%r = repository (path portion of $CVSROOT)\n, +#%t = tagname\n, #%{s} = file name, file name, ...\n, #\n, # If no format strings are present in the filter string, a default of\n, @@ -677,6 +752,20 @@ static const struct admin_file filelist[ {CVSROOTADM_CONFIG, a %s file configures various behaviors, config_contents}, + + /* cvsacl patch */ +{CVSROOTADM_ACLCONFIG, + a %s file configures Access Control List behaviors, + aclconfig_contents}, + +{CVSROOTADM_ACCESS, + a %s file configures Access Control Lists, + access_contents}, + +{CVSROOTADM_GROUP, + a %s file configures Access Control List group definitions, + group_contents}, + {NULL, NULL, NULL} }; @@ -1259,13 +1348,13 @@ init (int argc, char **argv) fp = xfopen (info, w); if (fclose (fp) 0) error (1, errno, cannot close %s, info); - + /* Make the new history file world-writeable, since every CVS
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:45:52 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: main.c Log Message: - fix printf format string - add acl support To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/main.c diff -u src/external/gpl2/xcvs/dist/src/main.c:1.4 src/external/gpl2/xcvs/dist/src/main.c:1.5 --- src/external/gpl2/xcvs/dist/src/main.c:1.4 Mon Apr 20 13:13:42 2009 +++ src/external/gpl2/xcvs/dist/src/main.c Thu Mar 8 15:45:52 2012 @@ -138,6 +138,9 @@ static const struct cmd } cmds[] = { +/* cvsacl patch */ +{ acl, NULL, NULL, cvsacl,CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, +{ racl, NULL, NULL, cvsacl,CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, { add, ad, new, add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, { admin,adm, rcs, admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, { annotate, ann, NULL,annotate, CVS_CMD_USES_WORK_DIR }, @@ -231,6 +234,7 @@ static const char *const usg[] = static const char *const cmd_usage[] = { CVS commands are:\n, +acl Add/modify/delete ACLs in files and directories\n, add Add a new file/directory to the repository\n, adminAdministration front end for rcs\n, annotate Show last revision where each line was modified\n, @@ -255,6 +259,7 @@ static const char *const cmd_usage[] = #if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) defined(SERVER_SUPPORT) pserver Password server mode\n, #endif +racl Add/modify/delete ACLs in files and directories\n, rannotateShow last revision where each line of module was modified\n, rdiffCreate 'patch' format diffs between releases\n, release Indicate that a Module is no longer in use\n, @@ -1127,6 +1132,9 @@ cause intermittent sandbox corruption.) * if it was set in config, we now know it. */ push_env_temp_dir (); + + /* cvsacl patch */ + parse_aclconfig (current_parsed_root-directory); } #ifdef CLIENT_SUPPORT @@ -1506,7 +1514,7 @@ usage (register const char *const *cpp) { (void) fprintf (stderr, *cpp++, program_name, cvs_cmd_name); for (; *cpp; cpp++) - (void) fprintf (stderr, *cpp); + (void) fprintf (stderr, %s, *cpp); exit (EXIT_FAILURE); }
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:46:08 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: ls.c Log Message: check chdir return To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/ls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/ls.c diff -u src/external/gpl2/xcvs/dist/src/ls.c:1.2 src/external/gpl2/xcvs/dist/src/ls.c:1.3 --- src/external/gpl2/xcvs/dist/src/ls.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/ls.c Thu Mar 8 15:46:08 2012 @@ -546,7 +546,8 @@ ls_dirleaveproc (void *callerdat, const set_tag = false; } - (void)CVS_CHDIR (..); + if (CVS_CHDIR (..) == -1) + error (0, errno, Failed to chdir ..); if (unlink_file_dir (dir)) error (0, errno, Failed to remove directory `%s', created_dir);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:46:35 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: logmsg.c Log Message: in new format strings, formats are actually checked, so put tag commands in. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/logmsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/logmsg.c diff -u src/external/gpl2/xcvs/dist/src/logmsg.c:1.3 src/external/gpl2/xcvs/dist/src/logmsg.c:1.4 --- src/external/gpl2/xcvs/dist/src/logmsg.c:1.3 Fri Feb 19 18:50:55 2010 +++ src/external/gpl2/xcvs/dist/src/logmsg.c Thu Mar 8 15:46:35 2012 @@ -808,7 +808,7 @@ logfile_write (const char *repository, c #endif /* SERVER_SUPPORT */ p, s, srepos, r, s, current_parsed_root-directory, - sVv, ,, changes, + sVvTt, ,, changes, logmsg_list_to_args_proc, (void *) NULL, (char *) NULL); if (!cmdline || !strlen (cmdline)) @@ -933,7 +933,7 @@ verifymsg_proc (const char *repository, r, s, current_parsed_root-directory, l, s, vpd-fname, - sV, ,, vpd-changes, + sVTt, ,, vpd-changes, logmsg_list_to_args_proc, (void *) NULL, (char *) NULL);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:46:59 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: log.c Log Message: add acl support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/log.c diff -u src/external/gpl2/xcvs/dist/src/log.c:1.2 src/external/gpl2/xcvs/dist/src/log.c:1.3 --- src/external/gpl2/xcvs/dist/src/log.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/log.c Thu Mar 8 15:46:59 2012 @@ -834,6 +834,25 @@ log_fileproc (void *callerdat, struct fi return 1; } +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (finfo-file, finfo-repository, NULL, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } +} +#endif + if (log_data-sup_header || !log_data-nameonly) {
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:47:17 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: filesubr.c Log Message: check symlink return To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/filesubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/filesubr.c diff -u src/external/gpl2/xcvs/dist/src/filesubr.c:1.3 src/external/gpl2/xcvs/dist/src/filesubr.c:1.4 --- src/external/gpl2/xcvs/dist/src/filesubr.c:1.3 Sat Sep 5 02:18:55 2009 +++ src/external/gpl2/xcvs/dist/src/filesubr.c Thu Mar 8 15:47:17 2012 @@ -45,7 +45,8 @@ copy_file (const char *from, const char if ((rsize = islink (from)) 0) { char *source = Xreadlink (from, rsize); - symlink (source, to); + if (symlink (source, to) == -1) + error (1, errno, cannot symlink %s to %s, source, to); free (source); return; }
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:47:45 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: import.c Log Message: - put back missing noexec check - add cvs acl support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/import.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/import.c diff -u src/external/gpl2/xcvs/dist/src/import.c:1.2 src/external/gpl2/xcvs/dist/src/import.c:1.3 --- src/external/gpl2/xcvs/dist/src/import.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/import.c Thu Mar 8 15:47:45 2012 @@ -320,6 +320,20 @@ import (int argc, char **argv) error (1, 0, attempt to import the repository); } +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (NULL, repository, argv[1], 6, NULL, NULL, 1)) + { + error (stop_at_first_permission_denied, 0, + permission denied for %s, Short_Repository (repository)); + + return (0); + } +} +#endif + ulist = getlist (); p = getnode (); p-type = UPDATE; @@ -595,7 +609,7 @@ process_import_file (char *message, char /* Attempt to make the Attic directory, in case it does not exist. */ (void) sprintf (rcs, %s/%s, repository, CVSATTIC); - if (CVS_MKDIR (rcs, 0777 ) != 0 errno != EEXIST) + if (noexec == 0 CVS_MKDIR (rcs, 0777 ) != 0 errno != EEXIST) error (1, errno, cannot make directory `%s', rcs); /* Note that the above clobbered the path name, so we
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:48:02 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: diff.c Log Message: add acl support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/diff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/diff.c diff -u src/external/gpl2/xcvs/dist/src/diff.c:1.2 src/external/gpl2/xcvs/dist/src/diff.c:1.3 --- src/external/gpl2/xcvs/dist/src/diff.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/diff.c Thu Mar 8 15:48:02 2012 @@ -498,6 +498,46 @@ diff_fileproc (void *callerdat, struct f { /* Skip all the following checks regarding the user file; we're not using it. */ + +/* cvsacl patch */ +#ifdef SERVER_SUPPORT + if (use_cvs_acl /* server_active */) + { + if (diff_rev1) + { + if (!access_allowed (NULL, finfo-repository, diff_rev1, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), + finfo-file); + + return (0); + } + } + if (diff_rev2) + { + if (!access_allowed (NULL, finfo-repository, diff_rev2, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), + finfo-file); + + return (0); + } + } + } +#endif + } else if (vers-vn_user == NULL) { @@ -840,6 +880,40 @@ diff_dirproc (void *callerdat, const cha if (!isdir (dir)) return R_SKIP_ALL; +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (diff_rev1) + { + if (!access_allowed (NULL, update_dir, diff_rev1, 5, NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (update_dir)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (update_dir), update_dir); + + return (0); + } + } + if (diff_rev2) + { + if (!access_allowed (NULL, update_dir, diff_rev2, 5, NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (update_dir)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (update_dir), update_dir); + + return (0); + } + } +} +#endif if (!quiet) error (0, 0, Diffing %s, update_dir); return R_PROCESS;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:48:22 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: add.c admin.c annotate.c commit.c remove.c Log Message: add acl support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/add.c \ src/external/gpl2/xcvs/dist/src/annotate.c \ src/external/gpl2/xcvs/dist/src/remove.c cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/admin.c cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/commit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/add.c diff -u src/external/gpl2/xcvs/dist/src/add.c:1.2 src/external/gpl2/xcvs/dist/src/add.c:1.3 --- src/external/gpl2/xcvs/dist/src/add.c:1.2 Fri Apr 10 07:20:29 2009 +++ src/external/gpl2/xcvs/dist/src/add.c Thu Mar 8 15:48:22 2012 @@ -401,6 +401,25 @@ add (int argc, char **argv) } else { +/* cvsacl patch */ +#ifdef SERVER_SUPPORT + if (use_cvs_acl /* server_active */) + { + if (!access_allowed (finfo.file, repository, + vers-tag, 6, NULL, NULL, 1)) + { +if (stop_at_first_permission_denied) +error (1, 0, permission denied for %s, + Short_Repository (finfo.repository)); +else +error (0, 0, permission denied for %s/%s, + Short_Repository (finfo.repository), + finfo.file); + +return (0); + } + } +#endif /* There is a user file, so build the entry for it */ if (build_entry (repository, finfo.file, vers-options, message, entries, vers-tag) != 0) @@ -675,6 +694,25 @@ add (int argc, char **argv) isdir (finfo.file) !wrap_name_has (finfo.file, WRAP_TOCVS)) { + +/* cvsacl patch */ +#ifdef SERVER_SUPPORT + if (use_cvs_acl /* server_active */) + { + if (!access_allowed (NULL, repository, NULL, 6, NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo.repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo.repository), finfo.file); + + return (0); + } + } +#endif + err += add_directory (finfo); } else Index: src/external/gpl2/xcvs/dist/src/annotate.c diff -u src/external/gpl2/xcvs/dist/src/annotate.c:1.2 src/external/gpl2/xcvs/dist/src/annotate.c:1.3 --- src/external/gpl2/xcvs/dist/src/annotate.c:1.2 Fri Apr 10 07:20:29 2009 +++ src/external/gpl2/xcvs/dist/src/annotate.c Thu Mar 8 15:48:22 2012 @@ -267,6 +267,25 @@ annotate_fileproc (void *callerdat, stru if (version == NULL) return 0; +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (finfo-file, finfo-repository, version, 5, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } +} +#endif + /* Distinguish output for various files if we are processing several files. */ cvs_outerr (\nAnnotations for , 0); Index: src/external/gpl2/xcvs/dist/src/remove.c diff -u src/external/gpl2/xcvs/dist/src/remove.c:1.2 src/external/gpl2/xcvs/dist/src/remove.c:1.3 --- src/external/gpl2/xcvs/dist/src/remove.c:1.2 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/remove.c Thu Mar 8 15:48:22 2012 @@ -241,6 +241,25 @@ cannot remove file `%s' which has a stic { char *fname; +/* cvsacl patch */ +#ifdef SERVER_SUPPORT + if (use_cvs_acl /* server_active */) + { + if (!access_allowed (finfo-file, finfo-repository, vers-tag, 7, + NULL, NULL, 1)) + { + if (stop_at_first_permission_denied) + error (1, 0, permission denied for %s, + Short_Repository (finfo-repository)); + else + error (0, 0, permission denied for %s/%s, + Short_Repository (finfo-repository), finfo-file); + + return (0); + } + } +#endif + /* Re-register it with a negative version number. */ fname = Xasprintf (-%s, vers-vn_user); Register (finfo-entries, finfo-file, fname, vers-ts_rcs, Index: src/external/gpl2/xcvs/dist/src/admin.c diff -u src/external/gpl2/xcvs/dist/src/admin.c:1.4 src/external/gpl2/xcvs/dist/src/admin.c:1.5 --- src/external/gpl2/xcvs/dist/src/admin.c:1.4 Sat Sep 5 08:50:33 2009 +++ src/external/gpl2/xcvs/dist/src/admin.c Thu Mar 8 15:48:22 2012 @@ -690,6 +690,25 @@ admin_fileproc (void *callerdat, struct vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0); +/* cvsacl patch */ +#ifdef SERVER_SUPPORT +if (use_cvs_acl /* server_active */) +{ + if (!access_allowed (finfo-file, finfo-repository, NULL, 2, + NULL, NULL, 1)) + { + if
CVS commit: src/external/gpl2/xcvs/dist/lib
Module Name:src Committed By: christos Date: Thu Mar 8 20:49:29 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/lib: vasnprintf.c Log Message: Don't use %n in the writable data segment. Fortified glibc complains. When the left hand does not communicate with the right hand. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/lib/vasnprintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/lib/vasnprintf.c diff -u src/external/gpl2/xcvs/dist/lib/vasnprintf.c:1.2 src/external/gpl2/xcvs/dist/lib/vasnprintf.c:1.3 --- src/external/gpl2/xcvs/dist/lib/vasnprintf.c:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/lib/vasnprintf.c Thu Mar 8 15:49:29 2012 @@ -562,13 +562,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *l break; } *p = dp-conversion; -#if USE_SNPRINTF - p[1] = '%'; - p[2] = 'n'; - p[3] = '\0'; -#else p[1] = '\0'; -#endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; @@ -596,28 +590,25 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *l { size_t maxlen; int count; - int retcount; maxlen = allocated - length; count = -1; - retcount = 0; #if USE_SNPRINTF # define SNPRINTF_BUF(arg) \ switch (prefix_count)\ { \ case 0: \ - retcount = SNPRINTF (result + length, maxlen, buf, \ - arg, count); \ + count = SNPRINTF (result + length, maxlen, buf, \ + arg); \ break; \ case 1: \ - retcount = SNPRINTF (result + length, maxlen, buf, \ - prefixes[0], arg, count); \ + count = SNPRINTF (result + length, maxlen, buf, \ + prefixes[0], arg); \ break; \ case 2: \ - retcount = SNPRINTF (result + length, maxlen, buf, \ - prefixes[0], prefixes[1], arg, \ - count); \ + count = SNPRINTF (result + length, maxlen, buf, \ + prefixes[0], prefixes[1], arg); \ break; \ default: \ abort (); \ @@ -768,39 +759,6 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *l result. */ if (count maxlen result[length + count] != '\0') abort (); - /* Portability hack. */ - if (retcount count) - count = retcount; - } - else - { - /* snprintf() doesn't understand the '%n' - directive. */ - if (p[1] != '\0') - { - /* Don't use the '%n' directive; instead, look - at the snprintf() return value. */ - p[1] = '\0'; - continue; - } - else - { - /* Look at the snprintf() return value. */ - if (retcount 0) - { -/* HP-UX 10.20 snprintf() is doubly deficient: - It doesn't understand the '%n' directive, - *and* it returns -1 (rather than the length - that would have been required) when the - buffer is too small. */ -size_t bigger_need = - xsum (xtimes (allocated, 2), 12); -ENSURE_ALLOCATION (bigger_need); -continue; - } - else - count = retcount; - } } #endif
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu Mar 8 20:50:26 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: cvs.h Log Message: add cvs acl support To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/cvs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/cvs.h diff -u src/external/gpl2/xcvs/dist/src/cvs.h:1.3 src/external/gpl2/xcvs/dist/src/cvs.h:1.4 --- src/external/gpl2/xcvs/dist/src/cvs.h:1.3 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/cvs.h Thu Mar 8 15:50:26 2012 @@ -19,7 +19,7 @@ #ifdef HAVE_CONFIG_H # include config.h /* this is stuff found via autoconf */ -#endif /* CONFIG_H */ +#endif /* HAVE_CONFIG_H */ /* Add GNU attribute suppport. */ #ifndef __attribute__ @@ -189,6 +189,11 @@ char *strerror (int); #define CVSROOTADM_WRAPPER cvswrappers #define CVSROOTADM_WRITERS writers +/* cvsacl patch */ +#define CVSROOTADM_ACLCONFIG aclconfig +#define CVSROOTADM_ACCESS access +#define CVSROOTADM_GROUP group + #define CVSNULLREPOS Emptydir /* an empty directory */ /* Other CVS file names */ @@ -459,6 +464,22 @@ int diff_exec (const char *file1, const */ extern int error_use_protocol; +/* cvsacl patch */ +/* ACL Patch settings from CVSROOT/config */ +extern int use_cvs_acl; +extern char *cvs_acl_default_permissions; +extern int use_cvs_groups; +extern int use_system_groups; +extern int use_separate_acl_file_for_each_dir; +extern char *cvs_acl_file_location; +extern char *cvs_groups_file_location; +extern char *cvs_server_run_as; +extern int stop_at_first_permission_denied; + +int given_perms_valid (const char *cperms); +int +access_allowed (const char *file, const char *repos, const char *tag, + int perm, char **mline, int *mpos, int usecache); DBM *open_module (void); List *Find_Directories (char *repository, int which, List *entries); @@ -858,6 +879,9 @@ char *expand_path (const char *name, con /* User variables. */ extern List *variable_list; +/* cvsacl patch */ +extern int cvsacl (int argc, char **argv); + void variable_set (char *nameval); int watch (int argc, char **argv);
CVS commit: src/external/gpl2/xcvs/dist/diff
Module Name:src Committed By: christos Date: Thu Mar 8 20:50:47 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/diff: diff3.c Log Message: fix format string To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/diff/diff3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/diff/diff3.c diff -u src/external/gpl2/xcvs/dist/diff/diff3.c:1.2 src/external/gpl2/xcvs/dist/diff/diff3.c:1.3 --- src/external/gpl2/xcvs/dist/diff/diff3.c:1.2 Fri Jan 6 10:16:02 2012 +++ src/external/gpl2/xcvs/dist/diff/diff3.c Thu Mar 8 15:50:46 2012 @@ -1503,7 +1503,7 @@ output_diff3 (diff, mapping, rev_mapping line = 0; do { - printf_output (line_prefix); + printf_output (%s, line_prefix); cp = D_RELNUM (ptr, realfile, line); length = D_RELLEN (ptr, realfile, line); write_output (cp, length);
CVS commit: src/external/gpl2/xcvs/dist/diff
Module Name:src Committed By: christos Date: Thu Mar 8 20:50:55 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/diff: util.c Log Message: prefer NULL over 0 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/diff/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/diff/util.c diff -u src/external/gpl2/xcvs/dist/diff/util.c:1.1.1.1 src/external/gpl2/xcvs/dist/diff/util.c:1.2 --- src/external/gpl2/xcvs/dist/diff/util.c:1.1.1.1 Tue Apr 7 18:10:11 2009 +++ src/external/gpl2/xcvs/dist/diff/util.c Thu Mar 8 15:50:55 2012 @@ -235,7 +235,7 @@ begin_output () close (pipes[0]); } - execl (PR_PROGRAM, PR_PROGRAM, -f, -h, name, 0); + execl (PR_PROGRAM, PR_PROGRAM, -f, -h, name, NULL); pfatal_with_name (PR_PROGRAM); } else
CVS commit: src/external/gpl2/xcvs/dist
Module Name:src Committed By: christos Date: Thu Mar 8 20:54:21 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist: INSTALL Makefile.am Makefile.in aclocal.m4 config.h.in configure configure.in src/external/gpl2/xcvs/dist/build-aux: compile config.guess config.sub depcomp install-sh mdate-sh missing texinfo.tex ylwrap src/external/gpl2/xcvs/dist/contrib: Makefile.in src/external/gpl2/xcvs/dist/contrib/pam: Makefile.in src/external/gpl2/xcvs/dist/diff: Makefile.in src/external/gpl2/xcvs/dist/doc: Makefile.in src/external/gpl2/xcvs/dist/doc/i18n: Makefile.in src/external/gpl2/xcvs/dist/doc/i18n/pt_BR: Makefile.in src/external/gpl2/xcvs/dist/lib: Makefile.in src/external/gpl2/xcvs/dist/m4: chdir-long.m4 extensions.m4 strftime.m4 src/external/gpl2/xcvs/dist/maint-aux: Makefile.in src/external/gpl2/xcvs/dist/man: Makefile.in src/external/gpl2/xcvs/dist/src: Makefile.in Added Files: src/external/gpl2/xcvs/dist/build-aux: mkinstalldirs src/external/gpl2/xcvs/dist/m4: glibc2.m4 glibc21.m4 intdiv0.m4 intmax.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 printf-posix.m4 Log Message: refresh autoconf infrastructure so that it has a fighting chance to work with something not from the previous decade. NB: I should eventually put back the OS specific stuff I've removed so that we can have a complete distribution. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/INSTALL \ src/external/gpl2/xcvs/dist/aclocal.m4 \ src/external/gpl2/xcvs/dist/config.h.in \ src/external/gpl2/xcvs/dist/configure.in cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/Makefile.am \ src/external/gpl2/xcvs/dist/Makefile.in cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/configure cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/build-aux/compile \ src/external/gpl2/xcvs/dist/build-aux/config.guess \ src/external/gpl2/xcvs/dist/build-aux/config.sub \ src/external/gpl2/xcvs/dist/build-aux/depcomp \ src/external/gpl2/xcvs/dist/build-aux/install-sh \ src/external/gpl2/xcvs/dist/build-aux/mdate-sh \ src/external/gpl2/xcvs/dist/build-aux/missing \ src/external/gpl2/xcvs/dist/build-aux/texinfo.tex \ src/external/gpl2/xcvs/dist/build-aux/ylwrap cvs rdiff -u -r0 -r1.1 src/external/gpl2/xcvs/dist/build-aux/mkinstalldirs cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/contrib/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/contrib/pam/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/diff/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/doc/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/doc/i18n/Makefile.in cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl2/xcvs/dist/doc/i18n/pt_BR/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/lib/Makefile.in cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/m4/chdir-long.m4 \ src/external/gpl2/xcvs/dist/m4/extensions.m4 \ src/external/gpl2/xcvs/dist/m4/strftime.m4 cvs rdiff -u -r0 -r1.1 src/external/gpl2/xcvs/dist/m4/glibc2.m4 \ src/external/gpl2/xcvs/dist/m4/glibc21.m4 \ src/external/gpl2/xcvs/dist/m4/intdiv0.m4 \ src/external/gpl2/xcvs/dist/m4/intmax.m4 \ src/external/gpl2/xcvs/dist/m4/inttypes-pri.m4 \ src/external/gpl2/xcvs/dist/m4/isc-posix.m4 \ src/external/gpl2/xcvs/dist/m4/lcmessage.m4 \ src/external/gpl2/xcvs/dist/m4/printf-posix.m4 cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/maint-aux/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/man/Makefile.in cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: drochner Date: Thu Feb 9 16:28:53 UTC 2012 Modified Files: src/external/gpl2/xcvs/dist/src: client.c Log Message: add patch from Redhat bug#784141 which fixes a possible buffer overflow if used with an HTTP proxy (CVE-2012-0804) approved by releng To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/client.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/client.c diff -u src/external/gpl2/xcvs/dist/src/client.c:1.3 src/external/gpl2/xcvs/dist/src/client.c:1.4 --- src/external/gpl2/xcvs/dist/src/client.c:1.3 Sun May 15 17:52:41 2011 +++ src/external/gpl2/xcvs/dist/src/client.c Thu Feb 9 16:28:53 2012 @@ -3550,9 +3550,9 @@ connect_to_pserver (cvsroot_t *root, str * code. */ read_line_via (from_server, to_server, read_buf); - sscanf (read_buf, %s %d, write_buf, codenum); + count = sscanf (read_buf, %*s %d, codenum); - if ((codenum / 100) != 2) + if (count != 1 || (codenum / 100) != 2) error (1, 0, proxy server %s:%d does not support http tunnelling, root-proxy_hostname, proxy_port_number); free (read_buf);
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: mrg Date: Sat Sep 24 11:37:27 UTC 2011 Modified Files: src/external/gpl2/xcvs/dist/src: patch.c Log Message: implement cvs rdiff -p. (someone please upate the manual for me :) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/patch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/patch.c diff -u src/external/gpl2/xcvs/dist/src/patch.c:1.3 src/external/gpl2/xcvs/dist/src/patch.c:1.4 --- src/external/gpl2/xcvs/dist/src/patch.c:1.3 Fri Apr 10 11:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/patch.c Sat Sep 24 11:37:27 2011 @@ -43,16 +43,18 @@ static char *tmpfile2 = NULL; static char *tmpfile3 = NULL; static int unidiff = 0; +static int show_c_func = 0; static const char *const patch_usage[] = { -Usage: %s %s [-flR] [-c|-u] [-s|-t] [-V %%d] [-k kopt]\n, +Usage: %s %s [-flR] [-p] [-c|-u] [-s|-t] [-V %%d] [-k kopt]\n, -r rev|-D date [-r rev2 | -D date2] modules...\n, \t-f\tForce a head revision match if tag/date not found.\n, \t-l\tLocal directory only, not recursive\n, \t-R\tProcess directories recursively.\n, \t-c\tContext diffs (default)\n, \t-u\tUnidiff format.\n, +\t-p\tShow which C function each change is in.\n, /* --show-c-function */ \t-s\tShort patch - one liner per file.\n, \t-t\tTop two diffs - last change made to the file.\n, \t-V vers\tUse RCS Version \vers\ for keyword expansion.\n, @@ -78,7 +80,7 @@ usage (patch_usage); getoptreset (); -while ((c = getopt (argc, argv, +V:k:cuftsQqlRD:r:)) != -1) +while ((c = getopt (argc, argv, +V:k:cuftsQqlRD:r:p)) != -1) { switch (c) { @@ -154,6 +156,9 @@ case 'c': /* Context diff */ unidiff = 0; break; + case 'p': + show_c_func = 1; + break; case '?': default: usage (patch_usage); @@ -202,6 +207,8 @@ send_arg(-s); if (unidiff) send_arg(-u); + if (show_c_func) + send_arg(-p); if (rev1) option_with_arg (-r, rev1); @@ -571,6 +578,8 @@ if (unidiff) run_add_arg_p (dargc, darg_allocated, dargv, -u); else run_add_arg_p (dargc, darg_allocated, dargv, -c); +if (show_c_func) +run_add_arg_p (dargc, darg_allocated, dargv, -p); switch (diff_exec (tmpfile1, tmpfile2, NULL, NULL, dargc, dargv, tmpfile3)) {
CVS commit: src/external/gpl2/xcvs/dist
Module Name:src Committed By: wiz Date: Sat Sep 24 12:02:58 UTC 2011 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo src/external/gpl2/xcvs/dist/src: patch.c Log Message: Document 'cvs rdiff -p'. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/doc/cvs.1 \ src/external/gpl2/xcvs/dist/doc/cvs.texinfo cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/patch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.1.1.1 src/external/gpl2/xcvs/dist/doc/cvs.1:1.2 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.1.1.1 Tue Apr 7 22:10:13 2009 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Sat Sep 24 12:02:58 2011 @@ -3405,6 +3405,11 @@ Local; don\(aqt descend subdirectories. .SP .IP 0 +\fB-p\fR +.IP 2 +Show which C function each change is in. +.SP +.IP 0 \fB-R\fR .IP 2 Examine directories recursively. This option is on by default. Index: src/external/gpl2/xcvs/dist/doc/cvs.texinfo diff -u src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.1.1.1 src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.2 --- src/external/gpl2/xcvs/dist/doc/cvs.texinfo:1.1.1.1 Tue Apr 7 22:10:13 2009 +++ src/external/gpl2/xcvs/dist/doc/cvs.texinfo Sat Sep 24 12:02:58 2011 @@ -11158,6 +11158,9 @@ @item -l Local; don't descend subdirectories. +@item -p +Show which C function each change is in. + @item -R Examine directories recursively. This option is on by default. Index: src/external/gpl2/xcvs/dist/src/patch.c diff -u src/external/gpl2/xcvs/dist/src/patch.c:1.4 src/external/gpl2/xcvs/dist/src/patch.c:1.5 --- src/external/gpl2/xcvs/dist/src/patch.c:1.4 Sat Sep 24 11:37:27 2011 +++ src/external/gpl2/xcvs/dist/src/patch.c Sat Sep 24 12:02:58 2011 @@ -47,7 +47,7 @@ static const char *const patch_usage[] = { -Usage: %s %s [-flR] [-p] [-c|-u] [-s|-t] [-V %%d] [-k kopt]\n, +Usage: %s %s [-flpR] [-c|-u] [-s|-t] [-V %%d] [-k kopt]\n, -r rev|-D date [-r rev2 | -D date2] modules...\n, \t-f\tForce a head revision match if tag/date not found.\n, \t-l\tLocal directory only, not recursive\n,
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Fri Jul 29 18:47:11 UTC 2011 Modified Files: src/external/gpl2/xcvs/dist/src: mkmodules.c Log Message: Allow init for new repository construction! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/mkmodules.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/mkmodules.c diff -u src/external/gpl2/xcvs/dist/src/mkmodules.c:1.3 src/external/gpl2/xcvs/dist/src/mkmodules.c:1.4 --- src/external/gpl2/xcvs/dist/src/mkmodules.c:1.3 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/mkmodules.c Fri Jul 29 14:47:11 2011 @@ -1154,15 +1154,12 @@ char *info_v; /* Exit status. */ int err = 0; +struct stat st; const struct admin_file *fileptr; umask (cvsumask); -if (!admin_group_member ()) - error (1, 0, usage is restricted to members of the group %s, - config-UserAdminGroup); - if (argc == -1 || argc 1) usage (init_usage); @@ -1177,6 +1174,11 @@ } #endif /* CLIENT_SUPPORT */ +if (stat (current_parsed_root-directory, st) != -1) + if (!admin_group_member ()) + error (1, 0, init to an existing repository is restricted to + members of the group %s, config-UserAdminGroup); + /* Note: we do *not* create parent directories as needed like the old cvsinit.sh script did. Few utilities do that, and a non-existent parent directory is as likely to be a typo as something
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Sun May 15 17:52:41 UTC 2011 Modified Files: src/external/gpl2/xcvs/dist/src: client.c Log Message: Add missing prototype. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/client.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/client.c diff -u src/external/gpl2/xcvs/dist/src/client.c:1.2 src/external/gpl2/xcvs/dist/src/client.c:1.3 --- src/external/gpl2/xcvs/dist/src/client.c:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/client.c Sun May 15 13:52:41 2011 @@ -68,6 +68,10 @@ int tag (int argc, char **argv); int update (int argc, char **argv); +#if defined AUTH_CLIENT_SUPPORT || defined HAVE_KERBEROS || defined HAVE_GSSAPI +static int connect_to(char *, unsigned int); +#endif + static size_t try_read_from_server (char *, size_t); static void auth_server (cvsroot_t *, struct buffer *, struct buffer *, @@ -5151,7 +5155,7 @@ #if defined AUTH_CLIENT_SUPPORT || defined HAVE_KERBEROS || defined HAVE_GSSAPI -int +static int connect_to(char *hostname, unsigned int port) { struct addrinfo hints, *res, *res0 = NULL;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Fri Feb 19 23:50:55 UTC 2010 Modified Files: src/external/gpl2/xcvs/dist/src: logmsg.c Log Message: make the default action abort for the empty log message; it used to be continue. requested by joerg. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/logmsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/logmsg.c diff -u src/external/gpl2/xcvs/dist/src/logmsg.c:1.2 src/external/gpl2/xcvs/dist/src/logmsg.c:1.3 --- src/external/gpl2/xcvs/dist/src/logmsg.c:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/logmsg.c Fri Feb 19 18:50:55 2010 @@ -357,7 +357,7 @@ { (void) printf (\nLog message unchanged or not specified\n); (void) printf (a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\n); - (void) printf (Action: (continue) ); + (void) printf (Action: (abort) ); (void) fflush (stdout); line_length = getline (line, line_chars_allocated, stdin); if (line_length 0) @@ -369,14 +369,14 @@ error (1, 0, aborting); } else if (line_length == 0 - || *line == '\n' || *line == 'c' || *line == 'C') - break; - if (*line == 'a' || *line == 'A') + || *line == '\n' || *line == 'a' || *line == 'A') { if (unlink_file (fname) 0) error (0, errno, warning: cannot remove temp file %s, fname); error (1, 0, aborted by user); } + if (*line == 'c' || *line == 'C') + break; if (*line == 'e' || *line == 'E') goto again; if (*line == '!')
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: dsl Date: Fri Nov 27 18:38:29 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: zlib.c Log Message: Fix compressed server accesses. According to http://cvs.savannah.gnu.org/viewvc/ccvs/src/?root=cvs this was broken between revs 1.29 and 1.32 for a perion of 4 months about 4 years ago. Not sure at all why/how we have the broken version. Our old code, the latest gnu code and this fix all differ slightly, but have the same effect. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/zlib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/zlib.c diff -u src/external/gpl2/xcvs/dist/src/zlib.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/zlib.c:1.2 --- src/external/gpl2/xcvs/dist/src/zlib.c:1.1.1.1 Tue Apr 7 22:10:29 2009 +++ src/external/gpl2/xcvs/dist/src/zlib.c Fri Nov 27 18:38:29 2009 @@ -229,7 +229,7 @@ would fetch all the available bytes, and at least one byte. */ status = (*cb-buf-input) (cb-buf-closure, bd-text, -need, BUFFER_DATA_SIZE, nread); +need 0, BUFFER_DATA_SIZE, nread); if (status == -2) /* Don't try to recover from memory allcoation errors. */
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: dholland Date: Sat Sep 5 06:18:55 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: filesubr.c Log Message: Check group membership correctly; ingroup() returns a truth value, not a gid. PR bin/41995. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/filesubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/filesubr.c diff -u src/external/gpl2/xcvs/dist/src/filesubr.c:1.2 src/external/gpl2/xcvs/dist/src/filesubr.c:1.3 --- src/external/gpl2/xcvs/dist/src/filesubr.c:1.2 Wed Apr 8 16:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/filesubr.c Sat Sep 5 06:18:55 2009 @@ -282,8 +282,7 @@ omask |= S_IXOTH; } -mask = sb.st_uid == uid ? umask : sb.st_gid == ingroup(sb.st_gid) ? - gmask : omask; +mask = sb.st_uid == uid ? umask : ingroup(sb.st_gid) ? gmask : omask; if ((sb.st_mode mask) == mask) return true; errno = EACCES;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: apb Date: Sat Sep 5 12:50:33 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: admin.c Log Message: It's expected that config will be NULL in a cvs client, but not in a server or with a local CVSROOT. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/admin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/admin.c diff -u src/external/gpl2/xcvs/dist/src/admin.c:1.3 src/external/gpl2/xcvs/dist/src/admin.c:1.4 --- src/external/gpl2/xcvs/dist/src/admin.c:1.3 Fri Apr 10 11:20:29 2009 +++ src/external/gpl2/xcvs/dist/src/admin.c Sat Sep 5 12:50:33 2009 @@ -327,8 +327,17 @@ while ((c = getopt (argc, argv, +ib::c:a:A:e::l::u::LUn:N:m:o:s:t::IqxV:k:)) != -1) { - if (c != 'q' !strchr (config-UserAdminOptions, c)) + if (config != NULL) { + if (c != 'q' !strchr (config-UserAdminOptions, c)) + only_allowed_options = false; + } else { +#ifdef CLIENT_SUPPORT + assert(current_parsed_root-isremote); only_allowed_options = false; +#else + assert(0); /* config should not be NULL, except in a client */ +#endif + } switch (c) {
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Apr 21 17:27:50 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: rcs.c Log Message: Fix LOCALID expansion (from Anon Ymous) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/rcs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/rcs.c diff -u src/external/gpl2/xcvs/dist/src/rcs.c:1.2 src/external/gpl2/xcvs/dist/src/rcs.c:1.3 --- src/external/gpl2/xcvs/dist/src/rcs.c:1.2 Wed Apr 8 12:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/rcs.c Tue Apr 21 13:27:50 2009 @@ -3511,6 +3511,11 @@ KEYWORD_INIT (new, KEYWORD_REVISION, Revision); KEYWORD_INIT (new, KEYWORD_SOURCE, Source); KEYWORD_INIT (new, KEYWORD_STATE, State); +KEYWORD_INIT (new, KEYWORD_STATE, State); +new[KEYWORD_LOCALID].string = NULL; +new[KEYWORD_LOCALID].len = 0; +new[KEYWORD_LOCALID].expandto = KEYWORD_LOCALID; +new[KEYWORD_LOCALID].expandit = false; return new; }
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Apr 21 18:43:52 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: rcs.c Log Message: remove dup line. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/rcs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/rcs.c diff -u src/external/gpl2/xcvs/dist/src/rcs.c:1.3 src/external/gpl2/xcvs/dist/src/rcs.c:1.4 --- src/external/gpl2/xcvs/dist/src/rcs.c:1.3 Tue Apr 21 13:27:50 2009 +++ src/external/gpl2/xcvs/dist/src/rcs.c Tue Apr 21 14:43:52 2009 @@ -3511,7 +3511,6 @@ KEYWORD_INIT (new, KEYWORD_REVISION, Revision); KEYWORD_INIT (new, KEYWORD_SOURCE, Source); KEYWORD_INIT (new, KEYWORD_STATE, State); -KEYWORD_INIT (new, KEYWORD_STATE, State); new[KEYWORD_LOCALID].string = NULL; new[KEYWORD_LOCALID].len = 0; new[KEYWORD_LOCALID].expandto = KEYWORD_LOCALID;
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Apr 20 17:13:42 UTC 2009 Modified Files: src/external/gpl2/xcvs/dist/src: main.c Log Message: put back -u To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/main.c diff -u src/external/gpl2/xcvs/dist/src/main.c:1.3 src/external/gpl2/xcvs/dist/src/main.c:1.4 --- src/external/gpl2/xcvs/dist/src/main.c:1.3 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/main.c Mon Apr 20 13:13:42 2009 @@ -519,7 +519,7 @@ int help = 0; /* Has the user asked for help? This lets us support the `cvs -H cmd' convention to give help for cmd. */ -static const char short_options[] = +QqrwtlnRvb:T:e:d:D:Hfz:s:xa; +static const char short_options[] = +QqrwtlnRuvb:T:e:d:D:Hfz:s:xa; static struct option long_options[] = { {help, 0, NULL, 'H'},