cvs-nserver-commits Mailing List for CVS with rewritten network layer (Page 6)
Brought to you by:
tyranny
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(41) |
Sep
(69) |
Oct
(12) |
Nov
(35) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(12) |
Feb
(19) |
Mar
(55) |
Apr
(25) |
May
(69) |
Jun
(33) |
Jul
(3) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(35) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Alexey M. <mo...@us...> - 2002-05-10 15:41:09
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv14052 Modified Files: Tag: NCLI-1-11-1 lsmodules.c Log Message: Fixed stupid copy-paste mistake in error condition processing and removed unnecessary (debug) variables declarations Index: lsmodules.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/lsmodules.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- lsmodules.c 3 May 2002 07:54:19 -0000 1.1.2.3 +++ lsmodules.c 10 May 2002 15:41:06 -0000 1.1.2.4 @@ -107,8 +107,6 @@ char *msg; { struct DIR_ACL *dir_acl = NULL; - char ss[100]; - int i; char *xbranch = (tagname) ? tagname : "trunk"; int perm; @@ -132,6 +130,7 @@ } if (mwhere != NULL) { + int i; /* Hmm looks like a regular module, not alias. * argv[1]-argv[argc-1] refer to optional FILES section in * regular module description. @@ -193,7 +192,7 @@ if ((branch_ace = get_file_on_branch_ace(branch_acl, argv[1])) == NULL) error(1, 0, "Error getting file ACE for %s/%s/%s: %s", - current_parsed_root->directory,argv[0], argv[i], + current_parsed_root->directory,argv[0], argv[1], strerror(errno)); perm = branch_permission_granted(branch_ace, CVS_Username, branch_perm_all); @@ -207,7 +206,8 @@ static int -lsmodules_real() { +lsmodules_real(void) +{ char *argv[] = { ".", NULL }; const int argc = 1; @@ -222,9 +222,13 @@ static int -lsmodules_virtual() { - DBM *db, *db1; - datum key, val; +lsmodules_virtual(void) +{ +#if 0 + DBM *db1; +#endif + DBM *db; + datum key; int err = 0; /* Read the whole modules file into allocated records */ @@ -250,7 +254,9 @@ return err; } -static int server_side_lsmodules() { +static int +server_side_lsmodules(void) +{ /* Set to default value */ if (mod_list == UNDEF_MOD_LIST) mod_list = ALL_MOD_LIST; @@ -258,7 +264,6 @@ } int lsmodules(int argc, char **argv) { - int i; int c; mod_list = UNDEF_MOD_LIST; /* Set to initial value */ |
From: Alexey M. <ty...@us...> - 2002-05-09 23:20:42
|
Update of /cvsroot/cvs-nserver/cvs-nserver/scripts In directory usw-pr-cvs1:/tmp/cvs-serv1258 Modified Files: Tag: NCLI-1-11-1 init-nval-tags.pl Log Message: Try to deduce parent tag for each tag Index: init-nval-tags.pl =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/scripts/Attic/init-nval-tags.pl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- init-nval-tags.pl 9 May 2002 22:40:53 -0000 1.1.2.1 +++ init-nval-tags.pl 9 May 2002 23:20:39 -0000 1.1.2.2 @@ -58,7 +58,9 @@ while (my ($name, $tag) = each %tags) { my $what = $tag->{is_branch} ? "B" : "T"; - print "${what}${name} <trunk> 0 <unknown>\n"; + my $parent_tag = defined($tag->{parent_tagname}) ? $tag->{parent_tagname} : "<trunk>"; + + print "${what}${name} $parent_tag 0 <unknown>\n"; } @@ -98,6 +100,8 @@ # in parent close WTR or die "Cannot close WTR: $!"; + my %local_tags = (); + my @found_tags = (); my $state = "before"; while (<RDR>) { if ($state eq "before") { @@ -110,17 +114,30 @@ # process tag my $tagname = $1; my $rev = $2; - if (!exists $tags{$tagname}) { - # even number of non-zero numbers in revision means - # that it is tag, otherwise it's a branch - my $is_branch = 0; - while ($rev =~ /[0-9]+/g) { - $is_branch = !$is_branch if ($& != 0) + # even number of non-zero numbers in revision means + # that it is tag, otherwise it's a branch + my $is_branch = 0; + my $pure_rev = ""; + while ($rev =~ /([0-9]+)/g) { + # calculate the pure revision number, w/o CVS-induced zeros + if ($1 != 0) { + if ($pure_rev eq "") { + $pure_rev = $1; + } else { + $pure_rev .= ".$1"; + } + $is_branch = !$is_branch; } + } + my $tag = { name => $tagname, is_branch => $is_branch, rev => $pure_rev, }; + $local_tags{$tagname} = $tag; + # add tag to global list of tags + if (!exists $tags{$tagname}) { + # find its best-matching parent tag my $what = $is_branch ? "branch" : "tag"; - verbose("Found $what '$tagname' with rev. '$rev'\n"); - my $tag = { name => $tagname, is_branch => $is_branch, }; + verbose("Found $what '$tagname' with rev. '$rev' (pure $pure_rev)\n"); $tags{$tagname} = $tag; + push @found_tags, $tag; } } else { # the list of tags ends @@ -129,6 +146,29 @@ } elsif ($state eq "after") { # do nothing, maybe just kill the running rlog } + } + + # after all tags have been gathered, find their parent tags + foreach my $tag (@found_tags) { + $tag->{parent_length} = 0; + while (my ($parent_name, $parent_tag) = each %local_tags) { + next if ($parent_name eq $tag->{name}); + next if ($parent_tag->{rev} eq $tag->{rev}); + debugging("Considering parent $parent_tag->{rev} ($parent_tag->{name}) for $tag->{rev} ($tag->{name})... "); + if (index($tag->{rev}, $parent_tag->{rev}) == 0) { + if (length($parent_tag->{rev}) > $tag->{parent_length}) { + $tag->{parent_tagname} = $parent_name; + $tag->{parent_length} = length($parent_tag->{rev}); + debugging("yes\n"); + } else { + debugging("no\n"); + } + } else { + debugging("could never be\n"); + } + } + verbose("Using parent tag '$tag->{parent_tagname}' for tag '$tag->{name}'\n") + if (defined $tag->{parent_tagname}); } waitpid $pid, 0 or die "Cannot waitpid() :$!"; |
From: Alexey M. <ty...@us...> - 2002-05-09 22:40:55
|
Update of /cvsroot/cvs-nserver/cvs-nserver/scripts In directory usw-pr-cvs1:/tmp/cvs-serv23450 Modified Files: Tag: NCLI-1-11-1 Makefile.am Makefile.in Added Files: Tag: NCLI-1-11-1 init-nval-tags.pl Log Message: Initial version of init-nval-tags.pl; add scripts to distribution --- NEW FILE: init-nval-tags.pl --- #! /usr/bin/perl -w # # $Id: init-nval-tags.pl,v 1.1.2.1 2002/05/09 22:40:53 tyranny Exp $ # # init-nval-tags.pl -- initialize the CVSROOT/nval-tags for a CVS repository. # # This script is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # Copyright (c) Alexey Mahotkin <al...@hs...> 2002 # use strict; use File::Find; use File::Spec; use Getopt::Long; use POSIX qw(dup2); my $VERSION = '0.01'; my $rlog_command = "rlog"; # # process the command line # my $opt_debug; my $opt_help; my $opt_verbose; my $opt_version; GetOptions( 'debug' => \$opt_debug, 'help' => \$opt_help, 'verbose|v' => \$opt_verbose, 'version' => \$opt_version, ) or usage(2); if ($opt_version) { print "init-nval-tags.pl version $VERSION\n"; exit 0; } usage(0) if $opt_help; my $repos = shift @ARGV; usage(1) unless defined $repos; usage(1) if (@ARGV); # gather all the branches and tags my %tags = (); find(\&wanted, $repos); # output those branches in CVSROOT/nval-tags format while (my ($name, $tag) = each %tags) { my $what = $tag->{is_branch} ? "B" : "T"; print "${what}${name} <trunk> 0 <unknown>\n"; } sub wanted { # ignore files in CVSROOT/, but only mention it to user once if (-d && ($_ eq "CVSROOT")) { verbose("Ignoring the CVSROOT/ subdirectory\n"); } return if ($File::Find::dir eq File::Spec->catfile($repos, "CVSROOT")); # process only files which end with ,v return unless -f $_; return unless /,v$/; # File::Find wants us to preserve the $_ my $filename = $_; local $_; # run the rlog program on file debugging("Running rlog on file $filename in directory $File::Find::dir\n"); pipe RDR, WTR or die "Cannot pipe(): $!"; my $pid = fork(); die "Cannot fork(): $!" unless defined $pid; if ($pid == 0) { # in child close RDR or die "Cannot close RDR: $!"; dup2(fileno(WTR), fileno(STDOUT)) or die "Cannot dup2(): $!"; exec "$rlog_command", File::Spec->catfile($File::Find::dir, $filename); die "Cannot exec $rlog_command: $!"; } else { # in parent close WTR or die "Cannot close WTR: $!"; my $state = "before"; while (<RDR>) { if ($state eq "before") { # list of tags starts here if (/^symbolic names:/) { $state = "inside"; } } elsif ($state eq "inside") { if (/^\s+([^:]+): ([0-9.]+)$/) { # process tag my $tagname = $1; my $rev = $2; if (!exists $tags{$tagname}) { # even number of non-zero numbers in revision means # that it is tag, otherwise it's a branch my $is_branch = 0; while ($rev =~ /[0-9]+/g) { $is_branch = !$is_branch if ($& != 0) } my $what = $is_branch ? "branch" : "tag"; verbose("Found $what '$tagname' with rev. '$rev'\n"); my $tag = { name => $tagname, is_branch => $is_branch, }; $tags{$tagname} = $tag; } } else { # the list of tags ends $state = "after"; } } elsif ($state eq "after") { # do nothing, maybe just kill the running rlog } } waitpid $pid, 0 or die "Cannot waitpid() :$!"; } } # diagnostic routines sub verbose { my $msg = shift; print STDERR $msg if $opt_verbose; } sub debugging { my $msg = shift; print STDERR $msg if $opt_debug; } # # describe usage # sub usage { my $exit_value = shift; print <<EOF; Usage: init-nval-tags.pl /REPOSITORY [--debug] [--verbose|-v] > /REPOSITORY/CVSROOT/nval-tags \tto gather list of tags and branches from the REPOSITORY \t\t--debug\t\tOutput debuging information \t\t--verbose, -v\tBe verbose or init-nval-tags.pl --help \tto see this help or init-nval-tags.pl --version \tto see the version of this script EOF exit $exit_value; } Index: Makefile.am =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/scripts/Attic/Makefile.am,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- Makefile.am 19 Dec 2001 19:54:43 -0000 1.1.2.1 +++ Makefile.am 9 May 2002 22:40:52 -0000 1.1.2.2 @@ -1,2 +1,4 @@ -bin_SCRIPTS = init-cvs-repository.sh +bin_SCRIPTS = init-cvs-repository.sh init-nval-tags.pl + +EXTRA_DIST = $(bin_SCRIPTS) Index: Makefile.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/scripts/Attic/Makefile.in,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- Makefile.in 19 Dec 2001 19:54:43 -0000 1.1.2.1 +++ Makefile.in 9 May 2002 22:40:53 -0000 1.1.2.2 @@ -88,7 +88,9 @@ setuid_group = @setuid_group@ setuid_user = @setuid_user@ -bin_SCRIPTS = init-cvs-repository.sh +bin_SCRIPTS = init-cvs-repository.sh init-nval-tags.pl + +EXTRA_DIST = $(bin_SCRIPTS) subdir = scripts mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h |
From: Alexey M. <ty...@us...> - 2002-05-09 22:40:19
|
Update of /cvsroot/cvs-nserver/cvs-nserver In directory usw-pr-cvs1:/tmp/cvs-serv23219 Modified Files: Tag: NCLI-1-11-1 Makefile.am Makefile.in Log Message: Add scripts/ subdirectory to SUBDIRS Index: Makefile.am =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/Makefile.am,v retrieving revision 1.1.1.1.2.4.2.6 retrieving revision 1.1.1.1.2.4.2.7 diff -u -d -r1.1.1.1.2.4.2.6 -r1.1.1.1.2.4.2.7 --- Makefile.am 7 Apr 2002 21:35:07 -0000 1.1.1.1.2.4.2.6 +++ Makefile.am 9 May 2002 22:40:11 -0000 1.1.1.1.2.4.2.7 @@ -19,7 +19,7 @@ # This is a legacy variable from b4 Automake USOURCE_SUBDIRS = acl lib diff src # All other subdirs: -SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tests tools \ +SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tests tools scripts \ windows-NT os2 emx vms EXTRA_DIST = \ Index: Makefile.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/Makefile.in,v retrieving revision 1.1.1.4.2.5.2.8 retrieving revision 1.1.1.4.2.5.2.9 diff -u -d -r1.1.1.4.2.5.2.8 -r1.1.1.4.2.5.2.9 --- Makefile.in 7 Apr 2002 21:35:07 -0000 1.1.1.4.2.5.2.8 +++ Makefile.in 9 May 2002 22:40:11 -0000 1.1.1.4.2.5.2.9 @@ -107,7 +107,7 @@ # This is a legacy variable from b4 Automake USOURCE_SUBDIRS = acl lib diff src # All other subdirs: -SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tests tools \ +SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tests tools scripts \ windows-NT os2 emx vms |
From: Alexey M. <ty...@us...> - 2002-05-09 18:12:53
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv9529 Modified Files: Tag: NCLI-1-11-1 main.c server.c Makefile.am Makefile.in Added Files: Tag: NCLI-1-11-1 lstags.c lstags.h Log Message: Implement the 'cvs lstags' subcommand --- NEW FILE: lstags.c --- #include <config.h> #include "lstags.h" #include "cvs.h" #include "stringbuf.h" static int server_side_lstags (void) { int retval = 1; struct stringbuf* filename; FILE* nval_tags; filename = new_stringbuf(current_parsed_root->directory); if (!filename) goto nomem; if (!cat_stringbuf(filename, "/" CVSROOTADM "/" CVSROOTADM_NVALTAGS)) goto nomem; /* just open the /repos/CVSROOT/nval-tags (if it exists) and pipe it to a client */ nval_tags = fopen(filename->buf, "r"); if (!nval_tags) { if (!existence_error(errno)) { error(1, errno, "Error opening %s: %s", filename->buf, strerror(errno)); goto out; } } else { char buf[BUFSIZ]; while (fgets(buf, sizeof(buf), nval_tags)) { cvs_output(buf, 0); } if (fclose(nval_tags) == EOF) { error(1, errno, "Error closing %s: %s", filename->buf, strerror(errno)); goto out; } } retval = 0; out: free_stringbuf(filename); return retval; nomem: error(1, 0, "Out of memory"); return 1; } int lstags (int argc, char **argv) { #ifdef CLIENT_SUPPORT if (current_parsed_root->isremote) { start_server(); if (!supported_request ("lstags")) error (1, 0, "server does not support tags listing"); send_to_server("lstags\012", 0); return get_responses_and_close(); } #endif return server_side_lstags(); } --- NEW FILE: lstags.h --- #ifndef LSTAGS_H #define LSTAGS_H 1 #include "PROTO.h" extern int lstags PROTO ((int argc, char **argv)); #endif /* LSTAGS_H */ Index: main.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/main.c,v retrieving revision 1.1.1.6.2.4.2.15 retrieving revision 1.1.1.6.2.4.2.16 diff -u -d -r1.1.1.6.2.4.2.15 -r1.1.1.6.2.4.2.16 --- main.c 3 May 2002 07:42:15 -0000 1.1.1.6.2.4.2.15 +++ main.c 9 May 2002 18:12:50 -0000 1.1.1.6.2.4.2.16 @@ -26,6 +26,7 @@ #include "ls.h" #include "lsacl.h" #include "lsmodules.h" +#include "lstags.h" #include "passwd.h" #include "zlib-client.h" @@ -145,6 +146,7 @@ { "ls", NULL, NULL, ls, 0 }, { "lsacl", NULL, NULL, lsacl, 0 }, { "lsmodules",NULL, NULL, lsmodules, 0 }, + { "lstags", NULL, NULL, lstags, 0 }, { "log", "lo", NULL, cvslog, CVS_CMD_USES_WORK_DIR }, #ifdef AUTH_CLIENT_SUPPORT { "login", "logon", "lgn", login, 0 }, @@ -488,7 +490,7 @@ + 1); if (acladmins == NULL) - error(1, 0, "Out of memory"); + printf("E Out of memory"); strcpy(acladmins, Pserver_Repos); strcat(acladmins, "/CVSROOT/acl-admins"); Index: server.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/server.c,v retrieving revision 1.1.1.7.2.1.2.9 retrieving revision 1.1.1.7.2.1.2.10 diff -u -d -r1.1.1.7.2.1.2.9 -r1.1.1.7.2.1.2.10 --- server.c 3 May 2002 07:42:16 -0000 1.1.1.7.2.1.2.9 +++ server.c 9 May 2002 18:12:50 -0000 1.1.1.7.2.1.2.10 @@ -25,6 +25,7 @@ #include "ls.h" #include "lsacl.h" #include "lsmodules.h" +#include "lstags.h" #include "zlib-client.h" @@ -3626,6 +3627,7 @@ SERVE(ls) SERVE(lsacl) SERVE(lsmodules) + SERVE(lstags) SERVE(passwd) SERVE(racl) SERVE_R(rannotate, annotate) @@ -4666,6 +4668,7 @@ REQ_LINE("ls", serve_ls, 0), REQ_LINE("lsacl", serve_lsacl, 0), REQ_LINE("lsmodules", serve_lsmodules, 0), + REQ_LINE("lstags", serve_lstags, 0), REQ_LINE(NULL, NULL, 0) #undef REQ_LINE Index: Makefile.am =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Makefile.am,v retrieving revision 1.1.1.1.2.6.2.19 retrieving revision 1.1.1.1.2.6.2.20 diff -u -d -r1.1.1.1.2.6.2.19 -r1.1.1.1.2.6.2.20 --- Makefile.am 3 May 2002 07:42:15 -0000 1.1.1.1.2.6.2.19 +++ Makefile.am 9 May 2002 18:12:50 -0000 1.1.1.1.2.6.2.20 @@ -69,6 +69,7 @@ ls.h ls.c \ lsacl.h lsacl.c \ lsmodules.h lsmodules.c \ + lstags.h lstags.c \ main.c \ mkmodules.c \ modules.c \ Index: Makefile.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Makefile.in,v retrieving revision 1.1.1.3.2.7.2.20 retrieving revision 1.1.1.3.2.7.2.21 diff -u -d -r1.1.1.3.2.7.2.20 -r1.1.1.3.2.7.2.21 --- Makefile.in 3 May 2002 07:42:15 -0000 1.1.1.3.2.7.2.20 +++ Makefile.in 9 May 2002 18:12:50 -0000 1.1.1.3.2.7.2.21 @@ -159,6 +159,7 @@ ls.h ls.c \ lsacl.h lsacl.c \ lsmodules.h lsmodules.c \ + lstags.h lstags.c \ main.c \ mkmodules.c \ modules.c \ @@ -331,16 +332,17 @@ import$U.$(OBJEXT) lock$U.$(OBJEXT) lockpasswd$U.$(OBJEXT) \ log$U.$(OBJEXT) login$U.$(OBJEXT) logmsg$U.$(OBJEXT) \ ls$U.$(OBJEXT) lsacl$U.$(OBJEXT) lsmodules$U.$(OBJEXT) \ - main$U.$(OBJEXT) mkmodules$U.$(OBJEXT) modules$U.$(OBJEXT) \ - myndbm$U.$(OBJEXT) no_diff$U.$(OBJEXT) nval-tags$U.$(OBJEXT) \ - parseinfo$U.$(OBJEXT) passwd$U.$(OBJEXT) patch$U.$(OBJEXT) \ - racl$U.$(OBJEXT) rcs$U.$(OBJEXT) rcscmds$U.$(OBJEXT) \ - recurse$U.$(OBJEXT) release$U.$(OBJEXT) remove$U.$(OBJEXT) \ - repos$U.$(OBJEXT) root$U.$(OBJEXT) run$U.$(OBJEXT) \ - scramble$U.$(OBJEXT) server$U.$(OBJEXT) status$U.$(OBJEXT) \ - subr$U.$(OBJEXT) tag$U.$(OBJEXT) update$U.$(OBJEXT) \ - vers_ts$U.$(OBJEXT) watch$U.$(OBJEXT) wrapper$U.$(OBJEXT) \ - zlib$U.$(OBJEXT) cvsroot$U.$(OBJEXT) version$U.$(OBJEXT) + lstags$U.$(OBJEXT) main$U.$(OBJEXT) mkmodules$U.$(OBJEXT) \ + modules$U.$(OBJEXT) myndbm$U.$(OBJEXT) no_diff$U.$(OBJEXT) \ + nval-tags$U.$(OBJEXT) parseinfo$U.$(OBJEXT) passwd$U.$(OBJEXT) \ + patch$U.$(OBJEXT) racl$U.$(OBJEXT) rcs$U.$(OBJEXT) \ + rcscmds$U.$(OBJEXT) recurse$U.$(OBJEXT) release$U.$(OBJEXT) \ + remove$U.$(OBJEXT) repos$U.$(OBJEXT) root$U.$(OBJEXT) \ + run$U.$(OBJEXT) scramble$U.$(OBJEXT) server$U.$(OBJEXT) \ + status$U.$(OBJEXT) subr$U.$(OBJEXT) tag$U.$(OBJEXT) \ + update$U.$(OBJEXT) vers_ts$U.$(OBJEXT) watch$U.$(OBJEXT) \ + wrapper$U.$(OBJEXT) zlib$U.$(OBJEXT) cvsroot$U.$(OBJEXT) \ + version$U.$(OBJEXT) cvs_OBJECTS = $(am_cvs_OBJECTS) cvs_LDFLAGS = am_cvs_nserver_OBJECTS = cvs-nserver$U.$(OBJEXT) cvs-server$U.$(OBJEXT) \ @@ -402,9 +404,10 @@ @AMDEP_TRUE@ $(DEPDIR)/log$U.Po $(DEPDIR)/logging-client$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/login$U.Po $(DEPDIR)/logmsg$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/ls$U.Po $(DEPDIR)/lsacl$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/lsmodules$U.Po $(DEPDIR)/main$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/mkmodules$U.Po $(DEPDIR)/modules$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/myndbm$U.Po $(DEPDIR)/network-client$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/lsmodules$U.Po $(DEPDIR)/lstags$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/main$U.Po $(DEPDIR)/mkmodules$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/modules$U.Po $(DEPDIR)/myndbm$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/network-client$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/no_diff$U.Po $(DEPDIR)/nval-tags$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/parseinfo$U.Po $(DEPDIR)/passwd$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/patch$U.Po $(DEPDIR)/racl$U.Po \ @@ -613,6 +616,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ls$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lsacl$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lsmodules$U.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lstags$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkmodules$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/modules$U.Po@am__quote@ @@ -761,6 +765,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lsacl.c; then echo $(srcdir)/lsacl.c; else echo lsacl.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lsacl_.c || rm -f lsacl_.c lsmodules_.c: lsmodules.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lsmodules.c; then echo $(srcdir)/lsmodules.c; else echo lsmodules.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lsmodules_.c || rm -f lsmodules_.c +lstags_.c: lstags.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lstags.c; then echo $(srcdir)/lstags.c; else echo lstags.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lstags_.c || rm -f lstags_.c main_.c: main.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c || rm -f main_.c mkmodules_.c: mkmodules.c $(ANSI2KNR) @@ -844,11 +850,11 @@ ignore_.$(OBJEXT) import_.$(OBJEXT) lock_.$(OBJEXT) \ lockpasswd_.$(OBJEXT) log_.$(OBJEXT) logging-client_.$(OBJEXT) \ login_.$(OBJEXT) logmsg_.$(OBJEXT) ls_.$(OBJEXT) lsacl_.$(OBJEXT) \ -lsmodules_.$(OBJEXT) main_.$(OBJEXT) mkmodules_.$(OBJEXT) \ -modules_.$(OBJEXT) myndbm_.$(OBJEXT) network-client_.$(OBJEXT) \ -no_diff_.$(OBJEXT) nval-tags_.$(OBJEXT) parseinfo_.$(OBJEXT) \ -passwd_.$(OBJEXT) patch_.$(OBJEXT) racl_.$(OBJEXT) rcs_.$(OBJEXT) \ -rcscmds_.$(OBJEXT) recurse_.$(OBJEXT) release_.$(OBJEXT) \ +lsmodules_.$(OBJEXT) lstags_.$(OBJEXT) main_.$(OBJEXT) \ +mkmodules_.$(OBJEXT) modules_.$(OBJEXT) myndbm_.$(OBJEXT) \ +network-client_.$(OBJEXT) no_diff_.$(OBJEXT) nval-tags_.$(OBJEXT) \ +parseinfo_.$(OBJEXT) passwd_.$(OBJEXT) patch_.$(OBJEXT) racl_.$(OBJEXT) \ +rcs_.$(OBJEXT) rcscmds_.$(OBJEXT) recurse_.$(OBJEXT) release_.$(OBJEXT) \ remove_.$(OBJEXT) repos_.$(OBJEXT) root_.$(OBJEXT) \ rsh-client_.$(OBJEXT) run_.$(OBJEXT) scramble_.$(OBJEXT) \ server_.$(OBJEXT) socket-client_.$(OBJEXT) ssl-client_.$(OBJEXT) \ |
From: Alexey M. <ty...@us...> - 2002-05-09 18:11:01
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv9184 Modified Files: Tag: NCLI-1-11-1 nval-tags.c Log Message: Tiny fixes Index: nval-tags.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/nval-tags.c,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -d -r1.1.2.5 -r1.1.2.6 --- nval-tags.c 9 May 2002 14:48:12 -0000 1.1.2.5 +++ nval-tags.c 9 May 2002 18:10:58 -0000 1.1.2.6 @@ -216,7 +216,7 @@ if (!result) goto nomem; - if (!cat_stringbuf(result, "/" CVSROOTADM "/nval-tags")) + if (!cat_stringbuf(result, "/" CVSROOTADM "/" CVSROOTADM_NVALTAGS)) goto nomem; return result; @@ -266,7 +266,7 @@ nval_tags_file = fopen(nval_tags_filename->buf, "r"); if (!nval_tags_file) { /* CVSROOT/nval-tags could be missing initially */ - if (errno != ENOENT) { + if (!existence_error(errno)) { error(1, errno, "Error opening %s: %s", nval_tags_filename->buf, strerror(errno)); goto err; } |
From: Alexey M. <ty...@us...> - 2002-05-09 18:10:30
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv8898 Modified Files: Tag: NCLI-1-11-1 cvs.h Log Message: Mention the nval-tags file as it should be done Index: cvs.h =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/cvs.h,v retrieving revision 1.1.1.6.2.4.2.4 retrieving revision 1.1.1.6.2.4.2.5 diff -u -d -r1.1.1.6.2.4.2.4 -r1.1.1.6.2.4.2.5 --- cvs.h 25 Nov 2001 20:14:23 -0000 1.1.1.6.2.4.2.4 +++ cvs.h 9 May 2002 18:10:22 -0000 1.1.1.6.2.4.2.5 @@ -165,6 +165,7 @@ #define CVSROOTADM_VERIFYMSG "verifymsg" #define CVSROOTADM_HISTORY "history" #define CVSROOTADM_VALTAGS "val-tags" +#define CVSROOTADM_NVALTAGS "nval-tags" #define CVSROOTADM_IGNORE "cvsignore" #define CVSROOTADM_CHECKOUTLIST "checkoutlist" #define CVSROOTADM_WRAPPER "cvswrappers" |
From: Alexey M. <ty...@us...> - 2002-05-09 15:09:14
|
Update of /cvsroot/cvs-nserver/cvs-nserver/acl In directory usw-pr-cvs1:/tmp/cvs-serv16286 Modified Files: Tag: NCLI-1-11-1 check_stringbuf.c stringbuf.c stringbuf.h Log Message: Handle catc_stringbuf(NULL, ...) gracefully; free_stringbuf should be void and actually free the stringbuf Index: check_stringbuf.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/acl/Attic/check_stringbuf.c,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -d -r1.1.2.4 -r1.1.2.5 --- check_stringbuf.c 16 Sep 2001 15:32:22 -0000 1.1.2.4 +++ check_stringbuf.c 9 May 2002 15:09:11 -0000 1.1.2.5 @@ -59,15 +59,10 @@ assert(buf2->allocated > 0); assert(strcmp(buf2->buf, "") == 0); - /* check freeing empty stringbuf */ - assert(free_stringbuf(buf)); - assert(buf != NULL); - assert(buf->len == 0); - assert(buf->buf == NULL); - assert(buf->allocated == 0); + free_stringbuf(buf); /* free the duplicated stringbuf */ - assert(free_stringbuf(buf2)); + free_stringbuf(buf2); } static void @@ -93,13 +88,9 @@ assert(strcmp(buf->buf, "foo") == 0); /* check freeing non-empty stringbuf */ - assert(free_stringbuf(buf)); - assert(buf != NULL); - assert(buf->len == 0); - assert(buf->buf == NULL); - assert(buf->allocated == 0); + free_stringbuf(buf); - assert(free_stringbuf(buf2)); + free_stringbuf(buf2); } static void @@ -110,6 +101,9 @@ unsigned int old_allocated; unsigned int old_len; + /* handles catc to NULL stringbuf */ + assert(catc_stringbuf(NULL, 'c') == NULL); + buf = new_stringbuf(""); /* check adding a single character to empty stringbuf */ @@ -142,7 +136,7 @@ assert(buf->allocated > old_allocated); assert(buf->len = old_len + 1); - assert(free_stringbuf(buf)); + free_stringbuf(buf); } @@ -154,7 +148,7 @@ unsigned int old_allocated; unsigned int old_len; - /* cannot cat to NULL stringbuf */ + /* handles cat to NULL stringbuf */ tmp = cat_stringbuf(NULL, "foo"); assert(tmp == NULL); @@ -193,7 +187,7 @@ assert(buf->allocated > old_allocated); assert(buf->len = old_len + 3); - assert(free_stringbuf(buf)); + free_stringbuf(buf); } static void Index: stringbuf.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/acl/Attic/stringbuf.c,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -d -r1.1.2.5 -r1.1.2.6 --- stringbuf.c 19 Jan 2002 13:32:44 -0000 1.1.2.5 +++ stringbuf.c 9 May 2002 15:09:12 -0000 1.1.2.6 @@ -47,19 +47,15 @@ } -int +void free_stringbuf (struct stringbuf *buf) { if (buf == NULL) - return 1; + return; free(buf->buf); - buf->buf = NULL; - buf->allocated = 0; - buf->len = 0; - - return 1; + free(buf); } @@ -90,6 +86,9 @@ struct stringbuf * catc_stringbuf (struct stringbuf *buf, char c) { + if (buf == NULL) + return NULL; + if (buf->len + 1 >= buf->allocated) { size_t needs_to_allocate = buf->allocated * 2; char *tmp = (char *) realloc(buf->buf, needs_to_allocate); Index: stringbuf.h =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/acl/Attic/stringbuf.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- stringbuf.h 19 Jan 2002 13:32:44 -0000 1.1.2.3 +++ stringbuf.h 9 May 2002 15:09:12 -0000 1.1.2.4 @@ -21,7 +21,7 @@ struct stringbuf *new_stringbuf (char *str); -int free_stringbuf (struct stringbuf *); +void free_stringbuf (struct stringbuf *buf); struct stringbuf *dup_stringbuf (struct stringbuf *buf); |
From: Alexey M. <ty...@us...> - 2002-05-09 15:08:03
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv9474 Modified Files: Tag: NCLI-1-11-1 nval-tags.c Log Message: Use actual timestamps; tiny 'static' fixes Index: nval-tags.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/nval-tags.c,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -d -r1.1.2.4 -r1.1.2.5 --- nval-tags.c 9 May 2002 14:28:02 -0000 1.1.2.4 +++ nval-tags.c 9 May 2002 14:48:12 -0000 1.1.2.5 @@ -13,6 +13,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> /* @@ -146,7 +147,7 @@ return 1; } -struct nval_tags* +static struct nval_tags* read_nval_tags(FILE* nval_tags_file, char* filename, struct nval_tags* nval_tags) { char buf[BUFSIZ]; @@ -387,8 +388,7 @@ goto out; /* add new tag to nval-tags in memory */ - timestamp = 0; /* mktime(); */ - + timestamp = time(NULL); nval_tag = create_nval_tag (tagname, is_branch, parent_tagname, timestamp, CVS_Username); if (!nval_tag) @@ -398,8 +398,6 @@ goto out; write_out_CVSROOT_nval_tags (nval_tags); - - fprintf(stderr, "Adding %s '%s'\n", is_branch ? "branch" : "tag", tagname); /* unlock */ |
From: Alexey M. <ty...@us...> - 2002-05-09 14:48:58
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv9630 Modified Files: Tag: NCLI-1-11-1 nval-tags.h Log Message: Remove unused prototypes Index: nval-tags.h =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/nval-tags.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- nval-tags.h 9 May 2002 13:22:13 -0000 1.1.2.2 +++ nval-tags.h 9 May 2002 14:48:55 -0000 1.1.2.3 @@ -54,15 +54,6 @@ extern int add_tag_to_nval_tags(struct nval_tags* nval_tags, struct nval_tag *nval_tag); -extern struct nval_tags *read_nval_tags (FILE* nval_tags_file, - char* nval_tags_filename, - struct nval_tags* nval_tags); - -extern int write_nval_tags (struct nval_tags* nval_tags, - FILE* nval_tags_file); - - - extern int add_tag_to_CVSROOT_nval_tags (const char* tagname, const char* parent_tagname, const int is_branch); |
From: Alexey M. <ty...@us...> - 2002-05-09 14:28:07
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv1533 Modified Files: Tag: NCLI-1-11-1 nval-tags.c Log Message: Actually write out the CVSROOT/nval-tags Index: nval-tags.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/nval-tags.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- nval-tags.c 9 May 2002 13:22:13 -0000 1.1.2.3 +++ nval-tags.c 9 May 2002 14:28:02 -0000 1.1.2.4 @@ -72,6 +72,7 @@ const time_t timestamp, const char* username) { struct nval_tag* result = calloc(1, sizeof(struct nval_tag)); + if (!result) return NULL; @@ -81,7 +82,7 @@ result->is_branch = is_branch; - if (strcmp(parent_tagname, "<trunk>") != 0) { + if (parent_tagname && (strcmp(parent_tagname, "<trunk>") != 0)) { result->parent_tagname = strdup(parent_tagname); if (!result->parent_tagname) goto err; @@ -159,7 +160,8 @@ char parent_tagname[BUFSIZ]; time_t timestamp; char username[BUFSIZ]; - if (buf[sizeof(buf) - 1] != '\n') { + int buflen = strlen(buf); + if ((buflen == 0) || (buf[buflen - 1] != '\n')) { error(1, 0, "Invalid line %d in %s", lineno, filename); goto err; } @@ -206,8 +208,25 @@ } -int -write_nval_tags (struct nval_tags* nval_tags, FILE* nval_tags_file) +static struct stringbuf* +get_nval_tags_filename (void) +{ + struct stringbuf *result = new_stringbuf(current_parsed_root->directory); + if (!result) + goto nomem; + + if (!cat_stringbuf(result, "/" CVSROOTADM "/nval-tags")) + goto nomem; + + return result; + + nomem: + free_stringbuf(result); + return NULL; +} + +static int +write_out_nval_tags (FILE* nval_tags_file, const char* filename, struct nval_tags* nval_tags) { struct nval_tag* current; @@ -216,6 +235,11 @@ char* parent_tagname = current->parent_tagname ? current->parent_tagname : "<trunk>"; fprintf(nval_tags_file, "%c%s %s %ld %s\n", tagtype, current->tagname, parent_tagname, current->timestamp, current->username); + + if (ferror(nval_tags_file)) { + error(1, errno, "Error writing to %s: %s", filename, strerror(errno)); + return 0; + } } return 1; @@ -229,32 +253,31 @@ FILE* nval_tags_file; struct nval_tags* nval_tags = NULL; - nval_tags_filename = new_stringbuf(current_parsed_root->directory); + nval_tags_filename = get_nval_tags_filename(); if (!nval_tags_filename) goto nomem; - if (!cat_stringbuf(nval_tags_filename, CVSROOTADM "/nval-tags")) + + nval_tags = create_nval_tags(); + if (!nval_tags) goto nomem; - /* read the nval-tags */ + /* read the nval-tags, if it exists */ nval_tags_file = fopen(nval_tags_filename->buf, "r"); if (!nval_tags_file) { /* CVSROOT/nval-tags could be missing initially */ if (errno != ENOENT) { error(1, errno, "Error opening %s: %s", nval_tags_filename->buf, strerror(errno)); + goto err; } - goto err; - } - - nval_tags = create_nval_tags(); - if (!nval_tags) - goto nomem; - - if (!read_nval_tags(nval_tags_file, nval_tags_filename->buf, nval_tags)) - goto err; + } else { + /* CVSROOT/nval-tags exists */ + if (!read_nval_tags(nval_tags_file, nval_tags_filename->buf, nval_tags)) + goto err; - if (fclose(nval_tags_file) == EOF) { - error(1, errno, "Error closing %s: %s", nval_tags_filename->buf, strerror(errno)); - goto err; + if (fclose(nval_tags_file) == EOF) { + error(1, errno, "Error closing %s: %s", nval_tags_filename->buf, strerror(errno)); + goto err; + } } return nval_tags; @@ -263,18 +286,91 @@ err: destroy_nval_tags(nval_tags); return NULL; - } +/* + + Writes out the CVSROOT/nval-tags.tmp file; + + then renames it to CVSROOT/nval-tags; + + simultaneous access is protected by a lock in + add_tag_to_CVSROOT_nval_tags(); + +*/ + static int write_out_CVSROOT_nval_tags (struct nval_tags* nval_tags) { + int retval = 0; + struct stringbuf* filename = NULL; + struct stringbuf* tmpfilename = NULL; + FILE* nval_tags_file = NULL; - return 1; + filename = get_nval_tags_filename(); + if (!filename) + goto nomem; + + tmpfilename = dup_stringbuf(filename); + if (!tmpfilename) + goto nomem; + + if (!cat_stringbuf(tmpfilename, ".tmp")) + goto nomem; + + nval_tags_file = fopen(tmpfilename->buf, "w"); + if (!nval_tags_file) { + error(1, errno, "Error opening the %s for writing: %s", tmpfilename->buf, strerror(errno)); + goto out; + } + + /* it reports its own errors */ + if (!write_out_nval_tags(nval_tags_file, tmpfilename->buf, nval_tags)) + goto out; + + if (fclose(nval_tags_file) == EOF) { + error(1, errno, "Error closing %s: %s", tmpfilename->buf, strerror(errno)); + goto out; + } + nval_tags_file = NULL; + + if (rename(tmpfilename->buf, filename->buf) == -1) { + error(1, errno, "Error renaming '%s' to '%s': %s", tmpfilename->buf, filename->buf, strerror(errno)); + goto out; + } + + retval = 1; + out: + if (nval_tags_file) + fclose(nval_tags_file); + free_stringbuf(filename); + free_stringbuf(tmpfilename); + return retval; + + nomem: + error(1, 0, "Out of memory!"); + return 0; } +/* + + Highlevel routing for updating the CVSROOT/nval-tags. + + It locks the file for writing; + + reads it in; + + adds the new tag to a list of tags; + + writes out the file; + + unlocks the file; + +*/ + + int add_tag_to_CVSROOT_nval_tags(const char* tagname, const char* parent_tagname, const int is_branch) { @@ -283,21 +379,29 @@ struct nval_tag* nval_tag = NULL; time_t timestamp; + /* lock the file for writing */ + + /* read in the CVSROOT/nval-tags */ nval_tags = open_CVSROOT_nval_tags(); if (!nval_tags) goto out; /* add new tag to nval-tags in memory */ timestamp = 0; /* mktime(); */ + nval_tag = create_nval_tag (tagname, is_branch, parent_tagname, timestamp, CVS_Username); + if (!nval_tag) + goto nomem; if (!add_tag_to_nval_tags(nval_tags, nval_tag)) goto out; write_out_CVSROOT_nval_tags (nval_tags); - /* fprintf(stderr, "Adding %s '%s'\n", is_branch ? "branch" : "tag", tagname); */ + fprintf(stderr, "Adding %s '%s'\n", is_branch ? "branch" : "tag", tagname); + + /* unlock */ retval = 1; @@ -306,7 +410,6 @@ return retval; nomem: - error(1, 0, "Out of memory"); return 0; } |
From: Alexey M. <ty...@us...> - 2002-05-09 13:22:16
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv8181 Modified Files: Tag: NCLI-1-11-1 nval-tags.c nval-tags.h tag.c Log Message: Most (except writing) of the infrastructure for actual writing of CVSROOT/nval-tags Index: nval-tags.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/nval-tags.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- nval-tags.c 23 Apr 2002 11:17:45 -0000 1.1.2.2 +++ nval-tags.c 9 May 2002 13:22:13 -0000 1.1.2.3 @@ -3,6 +3,10 @@ #include "nval-tags.h" +#include "cvs.h" +#include "cvsroot.h" +#include "stringbuf.h" + #include "error.h" #include <errno.h> @@ -42,6 +46,27 @@ return result; } +void +destroy_nval_tags (struct nval_tags* nval_tags) +{ + struct nval_tag* nval_tag; + + if (!nval_tags) + return; + + nval_tag = nval_tags->first_tag; + while (nval_tag) { + struct nval_tag* next = nval_tag->next; + + destroy_nval_tag(nval_tag); + + nval_tag = next; + } + + free(nval_tags); +} + + struct nval_tag* create_nval_tag (const char* tagname, const int is_branch, const char* parent_tagname, const time_t timestamp, const char* username) @@ -194,4 +219,94 @@ } return 1; +} + + +static struct nval_tags* +open_CVSROOT_nval_tags (void) +{ + struct stringbuf* nval_tags_filename; + FILE* nval_tags_file; + struct nval_tags* nval_tags = NULL; + + nval_tags_filename = new_stringbuf(current_parsed_root->directory); + if (!nval_tags_filename) + goto nomem; + if (!cat_stringbuf(nval_tags_filename, CVSROOTADM "/nval-tags")) + goto nomem; + + /* read the nval-tags */ + nval_tags_file = fopen(nval_tags_filename->buf, "r"); + if (!nval_tags_file) { + /* CVSROOT/nval-tags could be missing initially */ + if (errno != ENOENT) { + error(1, errno, "Error opening %s: %s", nval_tags_filename->buf, strerror(errno)); + } + goto err; + } + + nval_tags = create_nval_tags(); + if (!nval_tags) + goto nomem; + + if (!read_nval_tags(nval_tags_file, nval_tags_filename->buf, nval_tags)) + goto err; + + if (fclose(nval_tags_file) == EOF) { + error(1, errno, "Error closing %s: %s", nval_tags_filename->buf, strerror(errno)); + goto err; + } + + return nval_tags; + nomem: + error(1, 0, "Out of memory"); + err: + destroy_nval_tags(nval_tags); + return NULL; + +} + + +static int +write_out_CVSROOT_nval_tags (struct nval_tags* nval_tags) +{ + + return 1; +} + + +int +add_tag_to_CVSROOT_nval_tags(const char* tagname, const char* parent_tagname, const int is_branch) +{ + int retval = 0; + struct nval_tags* nval_tags = NULL; + struct nval_tag* nval_tag = NULL; + time_t timestamp; + + nval_tags = open_CVSROOT_nval_tags(); + if (!nval_tags) + goto out; + + /* add new tag to nval-tags in memory */ + timestamp = 0; /* mktime(); */ + nval_tag = create_nval_tag (tagname, is_branch, parent_tagname, + timestamp, CVS_Username); + + if (!add_tag_to_nval_tags(nval_tags, nval_tag)) + goto out; + + write_out_CVSROOT_nval_tags (nval_tags); + + /* fprintf(stderr, "Adding %s '%s'\n", is_branch ? "branch" : "tag", tagname); */ + + retval = 1; + + out: + destroy_nval_tags(nval_tags); + return retval; + + nomem: + + error(1, 0, "Out of memory"); + return 0; } Index: nval-tags.h =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/nval-tags.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- nval-tags.h 14 Apr 2002 18:05:19 -0000 1.1.2.1 +++ nval-tags.h 9 May 2002 13:22:13 -0000 1.1.2.2 @@ -38,6 +38,7 @@ }; extern struct nval_tags* create_nval_tags (void); +extern void destroy_nval_tags(struct nval_tags* nval_tags); extern struct nval_tag* create_nval_tag (const char* tagname, const int is_branch, @@ -59,5 +60,11 @@ extern int write_nval_tags (struct nval_tags* nval_tags, FILE* nval_tags_file); + + + +extern int add_tag_to_CVSROOT_nval_tags (const char* tagname, + const char* parent_tagname, + const int is_branch); #endif /* NVAL_TAGS_H */ Index: tag.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/tag.c,v retrieving revision 1.1.1.5.4.4 retrieving revision 1.1.1.5.4.5 diff -u -d -r1.1.1.5.4.4 -r1.1.1.5.4.5 --- tag.c 25 Nov 2001 20:45:30 -0000 1.1.1.5.4.4 +++ tag.c 9 May 2002 13:22:13 -0000 1.1.1.5.4.5 @@ -16,6 +16,7 @@ #include "acl.h" #include "module-acl.h" +#include "nval-tags.h" #include "repository.h" #include "recurse.h" #include "savecwd.h" @@ -433,6 +434,12 @@ dellist (&mtlist); if (where != NULL) free (where); + + /* add the tag to CVSROOT/nval-tags */ + if (!delete_flag) { + add_tag_to_CVSROOT_nval_tags(symtag, numtag, branch_mode); + } + return (err); } |
From: Alexey M. <ty...@us...> - 2002-05-09 13:20:34
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv7533 Modified Files: Tag: NCLI-1-11-1 client.c Log Message: Properly use the write() return value; (patch from Karl Wallner <ext...@km...>) Index: client.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/client.c,v retrieving revision 1.1.1.7.2.6.2.16 retrieving revision 1.1.1.7.2.6.2.17 diff -u -d -r1.1.1.7.2.6.2.16 -r1.1.1.7.2.6.2.17 --- client.c 10 Mar 2002 02:37:38 -0000 1.1.1.7.2.6.2.16 +++ client.c 9 May 2002 13:20:31 -0000 1.1.1.7.2.6.2.17 @@ -139,6 +139,7 @@ static void handle_e PROTO((char *, int)); static void handle_f PROTO((char *, int)); static void handle_notified PROTO((char *, int)); +static ssize_t writen(int fd, const void *vptr, size_t n); static size_t try_read_from_server PROTO ((char *, size_t)); #endif /* CLIENT_SUPPORT */ @@ -1536,7 +1537,7 @@ (unsigned char *) buf, size)) error (1, 0, "aborting due to compression error"); } - else if (write (fd, buf, size) != size) + else if (writen (fd, buf, size) != size) error (1, errno, "writing %s", short_pathname); } @@ -5161,3 +5162,21 @@ } #endif /* CLIENT_SUPPORT */ + +static ssize_t +/* Write "n" bytes to a descriptor. */ +writen(int fd, const void *vptr, size_t n) { + size_t nleft, nwritten; + const char *ptr; + + ptr = vptr; /* can't do pointer arithmetic on void* */ + nleft = n; + while (nleft > 0) { + if ( (nwritten = write(fd, ptr, nleft)) <= 0) + return(nwritten); /* error */ + + nleft -= nwritten; + ptr += nwritten; + } + return(n); +} |
From: Alexey M. <ty...@us...> - 2002-05-05 18:02:11
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv7930 Modified Files: Tag: NCLI-1-11-1 subr.c Log Message: Fix to compile under Solaris Index: subr.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/subr.c,v retrieving revision 1.1.1.6.2.1.2.1 retrieving revision 1.1.1.6.2.1.2.2 diff -u -d -r1.1.1.6.2.1.2.1 -r1.1.1.6.2.1.2.2 --- subr.c 18 Sep 2001 19:59:12 -0000 1.1.1.6.2.1.2.1 +++ subr.c 5 May 2002 18:02:08 -0000 1.1.1.6.2.1.2.2 @@ -9,7 +9,6 @@ */ #define _BSD_SOURCE 1 -#define _POSIX_SOURCE 199309L #include "cvs.h" #include "getline.h" |
From: Alexey M. <mo...@us...> - 2002-05-03 07:54:23
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv26603 Modified Files: Tag: NCLI-1-11-1 lsmodules.c Log Message: Added missing ability to specify a tag for lsmodules. Can't say if it's really useful, but anyway it looks harmless :-) Index: lsmodules.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/lsmodules.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- lsmodules.c 3 May 2002 07:49:32 -0000 1.1.2.2 +++ lsmodules.c 3 May 2002 07:54:19 -0000 1.1.2.3 @@ -10,9 +10,10 @@ static const char *const lsmodules_usage[] = { - "Usage: %s %s [-a|-o]\n", + "Usage: %s %s [-a|-o] [-r TAG]\n", "\t-a\tList all registered modules.\n", "\t-o\tList modules available for checkout.\n", + "\t-r TAG\tUse specified tag.\n", NULL }; @@ -263,7 +264,7 @@ mod_list = UNDEF_MOD_LIST; /* Set to initial value */ optind = 0; - while ((c = getopt (argc, argv, "ao")) != -1) + while ((c = getopt (argc, argv, "aor:")) != -1) { switch (c) { @@ -283,6 +284,9 @@ } mod_list = CO_MOD_LIST; break; + case 'r': + tagname = xstrdup(optarg); + break; default: usage(lsmodules_usage); break; @@ -307,6 +311,8 @@ else send_to_server ("Argument -o\012", 0); } + if (tagname != NULL) + option_with_arg ("-r", tagname); send_to_server("lsmodules\012", 0); |
From: Alexey M. <mo...@us...> - 2002-05-03 07:49:35
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv25193 Modified Files: Tag: NCLI-1-11-1 lsmodules.c Log Message: Debug string removed Index: lsmodules.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/lsmodules.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- lsmodules.c 3 May 2002 07:42:15 -0000 1.1.2.1 +++ lsmodules.c 3 May 2002 07:49:32 -0000 1.1.2.2 @@ -241,7 +241,7 @@ for (key = dbm_firstkey (db); key.dptr != NULL; key = dbm_nextkey (db)) { module_dir_perm = dir_perm_none; - err += do_module(db1, key.dptr, MISC, "Some string", lsvm_dirproc, + err += do_module(db1, key.dptr, MISC, "", lsvm_dirproc, NULL, 0, 0, 0, 0, NULL); lsmodules_print(key.dptr,module_dir_perm); } |
From: Alexey M. <mo...@us...> - 2002-05-03 07:42:27
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv23253a Modified Files: Tag: NCLI-1-11-1 Makefile.am Makefile.in ls.c main.c server.c Added Files: Tag: NCLI-1-11-1 lsmodules.c lsmodules.h Log Message: Basic lsmodules implemented. Various code cleanups in ls, shouldn't affect functionality --- NEW FILE: lsmodules.c --- #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #include "acl.h" #include "cvs.h" #include "lsmodules.h" #include "stringbuf.h" #include "recurse.h" static const char *const lsmodules_usage[] = { "Usage: %s %s [-a|-o]\n", "\t-a\tList all registered modules.\n", "\t-o\tList modules available for checkout.\n", NULL }; static enum { UNDEF_MOD_LIST = -1, ALL_MOD_LIST = 0, CO_MOD_LIST = 1, } mod_list; static char *tagname = NULL; static int deep = 0; static int module_dir_perm; static void lsmodules_print(const char *module, int perm) { #if 0 cvs_output("D/", 2); #endif if (mod_list != ALL_MOD_LIST && perm == dir_perm_none) return; cvs_output(module,0); cvs_output("//",2); if (perm == dir_perm_none) { cvs_output("none",0); } else { int need_comma = 0; if (perm & dir_perm_access) { cvs_output("access",0); need_comma = 1; } if (perm & dir_perm_modify) { if (need_comma) cvs_output(",modify",0); else cvs_output("modify",0); } } cvs_output("\n", 1); } /* ARGSUSED */ Dtype lsmodules_dirproc (callerdat, dir, repository, update_dir, entries) void *callerdat; char *dir; char *repository; char *update_dir; List *entries; { /* Should we go this way? AM */ #ifdef SERVER_SUPPORT int perm; char *xbranch = (tagname) ? tagname : "trunk"; struct DIR_ACL *dir_acl = NULL; if ((dir_acl = get_dir_acl(repository,xbranch)) == NULL) error(1, 0, "Error getting directory ACL for %s: %s", repository, strerror(errno)); perm = dir_permission_granted(dir_acl,CVS_Username,dir_perm_all); #else int perm = dir_perm_all; #endif if (deep == 0) { if (! (perm & dir_perm_access) ) { /* prevent unprivileged user from checking if a particular * directory even exists */ error(1, 0, "could not read RCS file for %s",update_dir); /* just in case */ return R_SKIP_ALL; } deep++; return R_PROCESS; } lsmodules_print(update_dir,perm); return R_SKIP_ALL; } static int lsvm_dirproc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg) int argc; char **argv; char *xwhere; char *mwhere; char *mfile; int shorten; int local; char *mname; char *msg; { struct DIR_ACL *dir_acl = NULL; char ss[100]; int i; char *xbranch = (tagname) ? tagname : "trunk"; int perm; /* The module can be either regular or alias. In either case * argv[0] is directory name related to the current directory (hopefully, * repository. So first we retrieve its DIRACL and check if it allows us * to go further (has dir_perm_access) */ if ((dir_acl = get_dir_acl(argv[0],xbranch)) == NULL) error(1, 0, "Error getting directory ACL for %s/%s: %s", current_parsed_root->directory, argv[0], strerror(errno)); perm = dir_permission_granted(dir_acl,CVS_Username,dir_perm_all); if (! (perm & dir_perm_access)) return 0; if (argc == 1) { /* the directory specified in argv[0] is a module [part] * itself. Add its access rights to the module rights and * return */ module_dir_perm |= perm; return 0; } if (mwhere != NULL) { /* Hmm looks like a regular module, not alias. * argv[1]-argv[argc-1] refer to optional FILES section in * regular module description. * The strategy is to store the current dir, chdir to argv[0], * and then check every item ACLs */ struct stat stbuf; char curdir[PATH_MAX+1]; if (getcwd(curdir,PATH_MAX)==NULL) error(1, 0, "unable to get current directory: %s", strerror(errno)); if (CVS_CHDIR(argv[0])!=0) error(1, 0, "unable to change working directory to %s/%s: %s", current_parsed_root->directory, argv[0], strerror(errno)); for(i=1;i<argc;i++) { if (CVS_STAT(argv[i],&stbuf)==-1) continue; /* some elements may refer to non-existing objects */ if (S_ISDIR(stbuf.st_mode)) { struct DIR_ACL *sd_acl; if ((sd_acl = get_dir_acl(argv[i],xbranch)) == NULL) error(1, 0, "unable to get DIR ACL for %s/%s/%s: %s", current_parsed_root->directory, argv[0],argv[i],strerror(errno)); module_dir_perm |= dir_permission_granted(sd_acl,CVS_Username, dir_perm_all); /* should we somehow cleanup sd_acl structure?? */ } else { /* Well, the file is a specific part of the module. So * if a user can checkout it, it means she has access * to the module. If she can checkin the file, she's * able to modify the module */ struct BRANCH_ACL *branch_acl; struct BRANCH_ACE *branch_ace; if ((branch_acl = get_branch_acl(dir_acl,xbranch)) == NULL) error(1, 0, "Error getting branch ACL for %s/%s: %s", current_parsed_root->directory, argv[0], strerror(errno)); if ((branch_ace = get_file_on_branch_ace(branch_acl, argv[i])) == NULL) error(1, 0, "Error getting file ACE for %s/%s/%s: %s", current_parsed_root->directory,argv[0], argv[i], strerror(errno)); perm = branch_permission_granted(branch_ace, CVS_Username, branch_perm_all); if (perm & branch_perm_checkout) module_dir_perm |= dir_perm_access; if (perm & branch_perm_checkin) module_dir_perm |= dir_perm_modify; } } } else if (argc > 1 && argv[1] && *argv[1]) { /* Well, it's an alias. if argv[1] presents it's a file * (not dir) inside argv[0] */ struct BRANCH_ACL *branch_acl; struct BRANCH_ACE *branch_ace; if ((branch_acl = get_branch_acl(dir_acl,xbranch)) == NULL) error(1, 0, "Error getting branch ACL for %s/%s: %s", current_parsed_root->directory, argv[0], strerror(errno)); if ((branch_ace = get_file_on_branch_ace(branch_acl, argv[1])) == NULL) error(1, 0, "Error getting file ACE for %s/%s/%s: %s", current_parsed_root->directory,argv[0], argv[i], strerror(errno)); perm = branch_permission_granted(branch_ace, CVS_Username, branch_perm_all); if (perm & branch_perm_checkout) module_dir_perm |= dir_perm_access; if (perm & branch_perm_checkin) module_dir_perm |= dir_perm_modify; } return 0; } static int lsmodules_real() { char *argv[] = { ".", NULL }; const int argc = 1; const int which = W_REPOS | W_ATTIC; deep = 0; if (CVS_CHDIR(current_parsed_root->directory) < 0) return 1; return start_recursion ((FILEPROC) NULL, (FILESDONEPROC) NULL, lsmodules_dirproc, (DIRLEAVEPROC) NULL, (void *) NULL, argc , argv, 0, which, 0, 1,"", 1); } static int lsmodules_virtual() { DBM *db, *db1; datum key, val; int err = 0; /* Read the whole modules file into allocated records */ if (!(db = open_module ())) error (1, 0, "failed to open the modules file"); /* As soon as do_module doesn't alter DB cursor we could use the * only one opened instance of the DB. But this may change in future * releases so be careful... */ #if 0 if (!(db1 = open_module ())) error (1, 0, "failed to open the modules file"); #else # define db1 db #endif for (key = dbm_firstkey (db); key.dptr != NULL; key = dbm_nextkey (db)) { module_dir_perm = dir_perm_none; err += do_module(db1, key.dptr, MISC, "Some string", lsvm_dirproc, NULL, 0, 0, 0, 0, NULL); lsmodules_print(key.dptr,module_dir_perm); } close_module (db); return err; } static int server_side_lsmodules() { /* Set to default value */ if (mod_list == UNDEF_MOD_LIST) mod_list = ALL_MOD_LIST; return lsmodules_real() + lsmodules_virtual(); } int lsmodules(int argc, char **argv) { int i; int c; mod_list = UNDEF_MOD_LIST; /* Set to initial value */ optind = 0; while ((c = getopt (argc, argv, "ao")) != -1) { switch (c) { case 'a': if (mod_list == CO_MOD_LIST) { cvs_outerr("-a and -o options are mutually exclusive\n",0); usage(lsmodules_usage); break; } mod_list = ALL_MOD_LIST; break; case 'o': if (mod_list == ALL_MOD_LIST) { cvs_outerr("-a and -o options are mutually exclusive\n",0); usage(lsmodules_usage); break; } mod_list = CO_MOD_LIST; break; default: usage(lsmodules_usage); break; } } argc -= optind; argv += optind; if (argc > 0) usage (lsmodules_usage); #ifdef CLIENT_SUPPORT if (current_parsed_root->isremote) { start_server(); if (!supported_request ("lsmodules")) error (1, 0, "server does not support module listing"); if (mod_list != UNDEF_MOD_LIST) { if (mod_list == ALL_MOD_LIST) send_to_server ("Argument -a\012", 0); else send_to_server ("Argument -o\012", 0); } send_to_server("lsmodules\012", 0); return get_responses_and_close(); } #endif /* CLIENT_SUPPORT */ return server_side_lsmodules(); } --- NEW FILE: lsmodules.h --- #ifndef LSMODULES_H #define LSMODULES_H 1 #include "PROTO.h" extern int lsmodules PROTO ((int argc, char **argv)); #endif /* LSMODULES_H */ Index: Makefile.am =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Makefile.am,v retrieving revision 1.1.1.1.2.6.2.18 retrieving revision 1.1.1.1.2.6.2.19 diff -u -d -r1.1.1.1.2.6.2.18 -r1.1.1.1.2.6.2.19 --- Makefile.am 14 Apr 2002 18:05:19 -0000 1.1.1.1.2.6.2.18 +++ Makefile.am 3 May 2002 07:42:15 -0000 1.1.1.1.2.6.2.19 @@ -68,6 +68,7 @@ logmsg.c \ ls.h ls.c \ lsacl.h lsacl.c \ + lsmodules.h lsmodules.c \ main.c \ mkmodules.c \ modules.c \ Index: Makefile.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Makefile.in,v retrieving revision 1.1.1.3.2.7.2.19 retrieving revision 1.1.1.3.2.7.2.20 diff -u -d -r1.1.1.3.2.7.2.19 -r1.1.1.3.2.7.2.20 --- Makefile.in 14 Apr 2002 18:05:19 -0000 1.1.1.3.2.7.2.19 +++ Makefile.in 3 May 2002 07:42:15 -0000 1.1.1.3.2.7.2.20 @@ -158,6 +158,7 @@ logmsg.c \ ls.h ls.c \ lsacl.h lsacl.c \ + lsmodules.h lsmodules.c \ main.c \ mkmodules.c \ modules.c \ @@ -329,17 +330,17 @@ hash$U.$(OBJEXT) history$U.$(OBJEXT) ignore$U.$(OBJEXT) \ import$U.$(OBJEXT) lock$U.$(OBJEXT) lockpasswd$U.$(OBJEXT) \ log$U.$(OBJEXT) login$U.$(OBJEXT) logmsg$U.$(OBJEXT) \ - ls$U.$(OBJEXT) lsacl$U.$(OBJEXT) main$U.$(OBJEXT) \ - mkmodules$U.$(OBJEXT) modules$U.$(OBJEXT) myndbm$U.$(OBJEXT) \ - no_diff$U.$(OBJEXT) nval-tags$U.$(OBJEXT) parseinfo$U.$(OBJEXT) \ - passwd$U.$(OBJEXT) patch$U.$(OBJEXT) racl$U.$(OBJEXT) \ - rcs$U.$(OBJEXT) rcscmds$U.$(OBJEXT) recurse$U.$(OBJEXT) \ - release$U.$(OBJEXT) remove$U.$(OBJEXT) repos$U.$(OBJEXT) \ - root$U.$(OBJEXT) run$U.$(OBJEXT) scramble$U.$(OBJEXT) \ - server$U.$(OBJEXT) status$U.$(OBJEXT) subr$U.$(OBJEXT) \ - tag$U.$(OBJEXT) update$U.$(OBJEXT) vers_ts$U.$(OBJEXT) \ - watch$U.$(OBJEXT) wrapper$U.$(OBJEXT) zlib$U.$(OBJEXT) \ - cvsroot$U.$(OBJEXT) version$U.$(OBJEXT) + ls$U.$(OBJEXT) lsacl$U.$(OBJEXT) lsmodules$U.$(OBJEXT) \ + main$U.$(OBJEXT) mkmodules$U.$(OBJEXT) modules$U.$(OBJEXT) \ + myndbm$U.$(OBJEXT) no_diff$U.$(OBJEXT) nval-tags$U.$(OBJEXT) \ + parseinfo$U.$(OBJEXT) passwd$U.$(OBJEXT) patch$U.$(OBJEXT) \ + racl$U.$(OBJEXT) rcs$U.$(OBJEXT) rcscmds$U.$(OBJEXT) \ + recurse$U.$(OBJEXT) release$U.$(OBJEXT) remove$U.$(OBJEXT) \ + repos$U.$(OBJEXT) root$U.$(OBJEXT) run$U.$(OBJEXT) \ + scramble$U.$(OBJEXT) server$U.$(OBJEXT) status$U.$(OBJEXT) \ + subr$U.$(OBJEXT) tag$U.$(OBJEXT) update$U.$(OBJEXT) \ + vers_ts$U.$(OBJEXT) watch$U.$(OBJEXT) wrapper$U.$(OBJEXT) \ + zlib$U.$(OBJEXT) cvsroot$U.$(OBJEXT) version$U.$(OBJEXT) cvs_OBJECTS = $(am_cvs_OBJECTS) cvs_LDFLAGS = am_cvs_nserver_OBJECTS = cvs-nserver$U.$(OBJEXT) cvs-server$U.$(OBJEXT) \ @@ -401,9 +402,9 @@ @AMDEP_TRUE@ $(DEPDIR)/log$U.Po $(DEPDIR)/logging-client$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/login$U.Po $(DEPDIR)/logmsg$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/ls$U.Po $(DEPDIR)/lsacl$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/main$U.Po $(DEPDIR)/mkmodules$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/modules$U.Po $(DEPDIR)/myndbm$U.Po \ -@AMDEP_TRUE@ $(DEPDIR)/network-client$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/lsmodules$U.Po $(DEPDIR)/main$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/mkmodules$U.Po $(DEPDIR)/modules$U.Po \ +@AMDEP_TRUE@ $(DEPDIR)/myndbm$U.Po $(DEPDIR)/network-client$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/no_diff$U.Po $(DEPDIR)/nval-tags$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/parseinfo$U.Po $(DEPDIR)/passwd$U.Po \ @AMDEP_TRUE@ $(DEPDIR)/patch$U.Po $(DEPDIR)/racl$U.Po \ @@ -611,6 +612,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/logmsg$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ls$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lsacl$U.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lsmodules$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkmodules$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/modules$U.Po@am__quote@ @@ -757,6 +759,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ls.c; then echo $(srcdir)/ls.c; else echo ls.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ls_.c || rm -f ls_.c lsacl_.c: lsacl.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lsacl.c; then echo $(srcdir)/lsacl.c; else echo lsacl.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lsacl_.c || rm -f lsacl_.c +lsmodules_.c: lsmodules.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lsmodules.c; then echo $(srcdir)/lsmodules.c; else echo lsmodules.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lsmodules_.c || rm -f lsmodules_.c main_.c: main.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c || rm -f main_.c mkmodules_.c: mkmodules.c $(ANSI2KNR) @@ -840,17 +844,17 @@ ignore_.$(OBJEXT) import_.$(OBJEXT) lock_.$(OBJEXT) \ lockpasswd_.$(OBJEXT) log_.$(OBJEXT) logging-client_.$(OBJEXT) \ login_.$(OBJEXT) logmsg_.$(OBJEXT) ls_.$(OBJEXT) lsacl_.$(OBJEXT) \ -main_.$(OBJEXT) mkmodules_.$(OBJEXT) modules_.$(OBJEXT) \ -myndbm_.$(OBJEXT) network-client_.$(OBJEXT) no_diff_.$(OBJEXT) \ -nval-tags_.$(OBJEXT) parseinfo_.$(OBJEXT) passwd_.$(OBJEXT) \ -patch_.$(OBJEXT) racl_.$(OBJEXT) rcs_.$(OBJEXT) rcscmds_.$(OBJEXT) \ -recurse_.$(OBJEXT) release_.$(OBJEXT) remove_.$(OBJEXT) \ -repos_.$(OBJEXT) root_.$(OBJEXT) rsh-client_.$(OBJEXT) run_.$(OBJEXT) \ -scramble_.$(OBJEXT) server_.$(OBJEXT) socket-client_.$(OBJEXT) \ -ssl-client_.$(OBJEXT) status_.$(OBJEXT) subr_.$(OBJEXT) tag_.$(OBJEXT) \ -update_.$(OBJEXT) vers_ts_.$(OBJEXT) version_.$(OBJEXT) \ -watch_.$(OBJEXT) wrapper_.$(OBJEXT) zlib_.$(OBJEXT) \ -zlib-client_.$(OBJEXT) : $(ANSI2KNR) +lsmodules_.$(OBJEXT) main_.$(OBJEXT) mkmodules_.$(OBJEXT) \ +modules_.$(OBJEXT) myndbm_.$(OBJEXT) network-client_.$(OBJEXT) \ +no_diff_.$(OBJEXT) nval-tags_.$(OBJEXT) parseinfo_.$(OBJEXT) \ +passwd_.$(OBJEXT) patch_.$(OBJEXT) racl_.$(OBJEXT) rcs_.$(OBJEXT) \ +rcscmds_.$(OBJEXT) recurse_.$(OBJEXT) release_.$(OBJEXT) \ +remove_.$(OBJEXT) repos_.$(OBJEXT) root_.$(OBJEXT) \ +rsh-client_.$(OBJEXT) run_.$(OBJEXT) scramble_.$(OBJEXT) \ +server_.$(OBJEXT) socket-client_.$(OBJEXT) ssl-client_.$(OBJEXT) \ +status_.$(OBJEXT) subr_.$(OBJEXT) tag_.$(OBJEXT) update_.$(OBJEXT) \ +vers_ts_.$(OBJEXT) version_.$(OBJEXT) watch_.$(OBJEXT) \ +wrapper_.$(OBJEXT) zlib_.$(OBJEXT) zlib-client_.$(OBJEXT) : $(ANSI2KNR) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd Index: ls.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/ls.c,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- ls.c 23 Apr 2002 15:56:10 -0000 1.1.2.11 +++ ls.c 3 May 2002 07:42:15 -0000 1.1.2.12 @@ -210,36 +210,19 @@ return 0; } - - static int ls_proc (int argc, char **argv, char *xwhere, char *mwhere, char *mfile, int shorten, - int local, char *mname, char *msg) + char *mname, char *msg) { - int err = 0; - int which = W_REPOS | W_ATTIC; - struct stringbuf *repository = NULL; - - repository = new_stringbuf(current_parsed_root->directory); + if (CVS_CHDIR(current_parsed_root->directory) < 0) + return 1; - if (CVS_CHDIR(repository->buf) < 0) { - err = 1; - goto out; - } - deep = 0; - local = 0; /* we always use recursion mode, 'cause we anyway need - subdirectores listing - */ - err = start_recursion (ls_fileproc, (FILESDONEPROC) NULL, ls_dirproc, - ls_dirleaveproc, (void *) NULL, - argc , argv, local, which, 0, 1, - "", 1); - - out: - free_stringbuf(repository); - return err; + return start_recursion ((FILEPROC)ls_fileproc, (FILESDONEPROC) NULL, + ls_dirproc, ls_dirleaveproc, + (void *) NULL, argc , argv, 0, W_REPOS | W_ATTIC, + 0, 1, "", 1); } static int @@ -248,9 +231,8 @@ int err = 0; int i; - err += ls_proc (argc , argv, (char *) NULL, - (char *) NULL, (char *) NULL, 0, local_only, (char *) NULL, - (char *) NULL); + err += ls_proc (argc , argv, (char *) NULL, (char *) NULL, + (char *) NULL, 0, (char *) NULL,(char *) NULL); return err; } Index: main.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/main.c,v retrieving revision 1.1.1.6.2.4.2.14 retrieving revision 1.1.1.6.2.4.2.15 diff -u -d -r1.1.1.6.2.4.2.14 -r1.1.1.6.2.4.2.15 --- main.c 31 Mar 2002 20:55:58 -0000 1.1.1.6.2.4.2.14 +++ main.c 3 May 2002 07:42:15 -0000 1.1.1.6.2.4.2.15 @@ -25,6 +25,7 @@ #include "login.h" #include "ls.h" #include "lsacl.h" +#include "lsmodules.h" #include "passwd.h" #include "zlib-client.h" @@ -143,6 +144,7 @@ #endif { "ls", NULL, NULL, ls, 0 }, { "lsacl", NULL, NULL, lsacl, 0 }, + { "lsmodules",NULL, NULL, lsmodules, 0 }, { "log", "lo", NULL, cvslog, CVS_CMD_USES_WORK_DIR }, #ifdef AUTH_CLIENT_SUPPORT { "login", "logon", "lgn", login, 0 }, Index: server.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/server.c,v retrieving revision 1.1.1.7.2.1.2.8 retrieving revision 1.1.1.7.2.1.2.9 diff -u -d -r1.1.1.7.2.1.2.8 -r1.1.1.7.2.1.2.9 --- server.c 16 Apr 2002 21:50:33 -0000 1.1.1.7.2.1.2.8 +++ server.c 3 May 2002 07:42:16 -0000 1.1.1.7.2.1.2.9 @@ -24,6 +24,7 @@ #include "run.h" #include "ls.h" #include "lsacl.h" +#include "lsmodules.h" #include "zlib-client.h" @@ -3624,6 +3625,7 @@ SERVE2(log, cvslog) SERVE(ls) SERVE(lsacl) + SERVE(lsmodules) SERVE(passwd) SERVE(racl) SERVE_R(rannotate, annotate) @@ -4663,6 +4665,7 @@ REQ_LINE("version", serve_version, RQ_ROOTLESS), REQ_LINE("ls", serve_ls, 0), REQ_LINE("lsacl", serve_lsacl, 0), + REQ_LINE("lsmodules", serve_lsmodules, 0), REQ_LINE(NULL, NULL, 0) #undef REQ_LINE |
From: Alexey M. <ty...@us...> - 2002-04-25 21:44:56
|
Update of /cvsroot/cvs-nserver/cvs-nserver In directory usw-pr-cvs1:/tmp/cvs-serv28555 Modified Files: Tag: NCLI-1-11-1 README.checkpassword Log Message: Point to rewritten checkpassword-pam Index: README.checkpassword =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/Attic/README.checkpassword,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -u -d -r1.1.2.1.2.1 -r1.1.2.1.2.2 --- README.checkpassword 9 Dec 2001 18:47:25 -0000 1.1.2.1.2.1 +++ README.checkpassword 25 Apr 2002 21:44:53 -0000 1.1.2.1.2.2 @@ -9,10 +9,8 @@ - original checkpassword (uses /etc/passwd or /etc/shadow): <URL:http://cr.yp.to/checkpwd.html> -- PAMified checkpassword (originally written by Kelly L., then - slightly hacked by al...@hs... and updated to fresh - checkpassword by Jacob Rief: - <URL:http://sourceforge.net/projects/cvs-nserver/> +- PAMified checkpassword: + <URL:http://checkpasswd-pam.sourcerforge.net> - collection of various checkpassword-style programs is available at: <URL:http://www.qmail.org/top.html#checkpassword> |
From: Alexey M. <ty...@us...> - 2002-04-25 21:43:22
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv28010 Modified Files: Tag: NCLI-1-11-1 run.c Log Message: Remove _POSIX_SOURCE for compatibility with Solaris; fix "clobbered by longjmp() warning" Index: run.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/run.c,v retrieving revision 1.1.1.5.4.2 retrieving revision 1.1.1.5.4.3 diff -u -d -r1.1.1.5.4.2 -r1.1.1.5.4.3 --- run.c 18 Sep 2001 19:59:12 -0000 1.1.1.5.4.2 +++ run.c 25 Apr 2002 21:43:18 -0000 1.1.1.5.4.3 @@ -12,7 +12,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ -#define _POSIX_SOURCE 1 #define _BSD_SOURCE 1 #include "config.h" @@ -106,11 +105,11 @@ const char *sterr; int flags; { - int shin, shout, sherr; + volatile int shin, shout, sherr; int mode_out, mode_err; int status; - int rc = -1; - int rerrno = 0; + volatile int rc = -1; + volatile int rerrno = 0; int pid, w; #ifdef POSIX_SIGNALS |
From: Alexey M. <ty...@us...> - 2002-04-25 21:42:25
|
Update of /cvsroot/cvs-nserver/cvs-nserver/debian In directory usw-pr-cvs1:/tmp/cvs-serv27604/debian Log Message: Directory /cvsroot/cvs-nserver/cvs-nserver/debian added to the repository --> Using per-directory sticky tag `NCLI-1-11-1' |
From: Alexey M. <ty...@us...> - 2002-04-25 21:42:13
|
Update of /cvsroot/cvs-nserver/cvs-nserver In directory usw-pr-cvs1:/tmp/cvs-serv27502 Modified Files: Tag: NCLI-1-11-1 cvs.spec.in Log Message: Update URL Index: cvs.spec.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/cvs.spec.in,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.1.2.1 diff -u -d -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1 --- cvs.spec.in 6 Jun 2001 20:51:54 -0000 1.1.1.1.2.1 +++ cvs.spec.in 25 Apr 2002 21:42:10 -0000 1.1.1.1.2.1.2.1 @@ -5,7 +5,7 @@ Copyright: GPL Group: Development/Tools Source: http://alexm.here.ru/cvs-nserver/download/%{name}-%{version}.tar.gz -URL: http://alexm.here.ru/cvs-nserver/ +URL: http://cvs-nserver.sourceforge.net/ Prereq: /sbin/install-info Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-root |
From: Alexey M. <ty...@us...> - 2002-04-25 21:41:33
|
Update of /cvsroot/cvs-nserver/cvs-nserver/lib In directory usw-pr-cvs1:/tmp/cvs-serv27218 Modified Files: Tag: NCLI-1-11-1 Makefile.in Added Files: Tag: NCLI-1-11-1 snprintf.c Log Message: snprintf replacement added for compatibility with Solaris --- NEW FILE: snprintf.c --- /* * Copyright Patrick Powell 1995 * This code is based on code written by Patrick Powell (pap...@as...) * It may be used for any purpose as long as this notice remains intact * on all source code distributions */ /************************************************************** * Original: * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 * A bombproof version of doprnt (dopr) included. * Sigh. This sort of thing is always nasty do deal with. Note that * the version here does not include floating point... * * snprintf() is used instead of sprintf() as it does limit checks * for string length. This covers a nasty loophole. * * The other functions are there to prevent NULL pointers from * causing nast effects. * * More Recently: * Brandon Long <bl...@fi...> 9/15/96 for mutt 0.43 * This was ugly. It is still ugly. I opted out of floating point * numbers, but the formatter understands just about everything * from the normal C string format, at least as far as I can tell from * the Solaris 2.5 printf(3S) man page. * * Brandon Long <bl...@fi...> 10/22/97 for mutt 0.87.1 * Ok, added some minimal floating point support, which means this * probably requires libm on most operating systems. Don't yet * support the exponent (e,E) and sigfig (g,G). Also, fmtint() * was pretty badly broken, it just wasn't being exercised in ways * which showed it, so that's been fixed. Also, formated the code * to mutt conventions, and removed dead code left over from the * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. * * Thomas Roessler <roe...@gu...> 01/27/98 for mutt 0.89i * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins <me...@cs...> 03/05/98 for mutt 0.90.8 * The original code assumed that both snprintf() and vsnprintf() were * missing. Some systems only have snprintf() but not vsnprintf(), so * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. * * Andrew Tridgell (tr...@sa...) Oct 1998 * fixed handling of %.0f * added test for HAVE_LONG_DOUBLE * * tr...@sa..., id...@sa..., April 2001 * got rid of fcvt code (twas buggy and made testing harder) * added C99 semantics * **************************************************************/ #ifndef NO_CONFIG_H /* for some tests */ #include "config.h" #endif #ifdef HAVE_STRING_H #include <string.h> #endif #ifdef HAVE_STRINGS_H #include <strings.h> #endif #ifdef HAVE_CTYPE_H #include <ctype.h> #endif #include <sys/types.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ #include <stdio.h> /* make the compiler happy with an empty file */ void dummy_snprintf(void) {} #else #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double #endif #ifdef HAVE_LONG_LONG #define LLONG long long #else #define LLONG long #endif static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max); static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags); static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags); static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); /* * dopr(): poor man's version of doprintf */ /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 #define DP_S_MIN 2 #define DP_S_DOT 3 #define DP_S_MAX 4 #define DP_S_MOD 5 #define DP_S_CONV 6 #define DP_S_DONE 7 /* format flags - Bits */ #define DP_F_MINUS (1 << 0) #define DP_F_PLUS (1 << 1) #define DP_F_SPACE (1 << 2) #define DP_F_NUM (1 << 3) #define DP_F_ZERO (1 << 4) #define DP_F_UP (1 << 5) #define DP_F_UNSIGNED (1 << 6) /* Conversion Flags */ #define DP_C_SHORT 1 #define DP_C_LONG 2 #define DP_C_LDOUBLE 3 #define DP_C_LLONG 4 #define char_to_int(p) ((p)- '0') #ifndef MAX #define MAX(p,q) (((p) >= (q)) ? (p) : (q)) #endif static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args) { char ch; LLONG value; LDOUBLE fvalue; char *strvalue; int min; int max; int state; int flags; int cflags; size_t currlen; state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; max = -1; ch = *format++; while (state != DP_S_DONE) { if (ch == '\0') state = DP_S_DONE; switch(state) { case DP_S_DEFAULT: if (ch == '%') state = DP_S_FLAGS; else dopr_outch (buffer, &currlen, maxlen, ch); ch = *format++; break; case DP_S_FLAGS: switch (ch) { case '-': flags |= DP_F_MINUS; ch = *format++; break; case '+': flags |= DP_F_PLUS; ch = *format++; break; case ' ': flags |= DP_F_SPACE; ch = *format++; break; case '#': flags |= DP_F_NUM; ch = *format++; break; case '0': flags |= DP_F_ZERO; ch = *format++; break; default: state = DP_S_MIN; break; } break; case DP_S_MIN: if (isdigit((unsigned char)ch)) { min = 10*min + char_to_int (ch); ch = *format++; } else if (ch == '*') { min = va_arg (args, int); ch = *format++; state = DP_S_DOT; } else { state = DP_S_DOT; } break; case DP_S_DOT: if (ch == '.') { state = DP_S_MAX; ch = *format++; } else { state = DP_S_MOD; } break; case DP_S_MAX: if (isdigit((unsigned char)ch)) { if (max < 0) max = 0; max = 10*max + char_to_int (ch); ch = *format++; } else if (ch == '*') { max = va_arg (args, int); ch = *format++; state = DP_S_MOD; } else { state = DP_S_MOD; } break; case DP_S_MOD: switch (ch) { case 'h': cflags = DP_C_SHORT; ch = *format++; break; case 'l': cflags = DP_C_LONG; ch = *format++; if (ch == 'l') { /* It's a long long */ cflags = DP_C_LLONG; ch = *format++; } break; case 'L': cflags = DP_C_LDOUBLE; ch = *format++; break; default: break; } state = DP_S_CONV; break; case DP_S_CONV: switch (ch) { case 'd': case 'i': if (cflags == DP_C_SHORT) value = va_arg (args, int); else if (cflags == DP_C_LONG) value = va_arg (args, long int); else if (cflags == DP_C_LLONG) value = va_arg (args, LLONG); else value = va_arg (args, int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else if (cflags == DP_C_LLONG) value = (long)va_arg (args, unsigned LLONG); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); break; case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else if (cflags == DP_C_LLONG) value = (LLONG)va_arg (args, unsigned LLONG); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'X': flags |= DP_F_UP; case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else if (cflags == DP_C_LLONG) value = (LLONG)va_arg (args, unsigned LLONG); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); break; case 'f': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); /* um, floating point? */ fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'E': flags |= DP_F_UP; case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); break; case 'G': flags |= DP_F_UP; case 'g': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); break; case 'c': dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); break; case 's': strvalue = va_arg (args, char *); if (max == -1) { max = strlen(strvalue); } if (min > 0 && max >= 0 && min > max) max = min; fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); break; case 'p': strvalue = va_arg (args, void *); fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); break; case 'n': if (cflags == DP_C_SHORT) { short int *num; num = va_arg (args, short int *); *num = currlen; } else if (cflags == DP_C_LONG) { long int *num; num = va_arg (args, long int *); *num = (long int)currlen; } else if (cflags == DP_C_LLONG) { LLONG *num; num = va_arg (args, LLONG *); *num = (LLONG)currlen; } else { int *num; num = va_arg (args, int *); *num = currlen; } break; case '%': dopr_outch (buffer, &currlen, maxlen, ch); break; case 'w': /* not supported yet, treat as next char */ ch = *format++; break; default: /* Unknown, skip */ break; } ch = *format++; state = DP_S_DEFAULT; flags = cflags = min = 0; max = -1; break; case DP_S_DONE: break; default: /* hmm? */ break; /* some picky compilers need this */ } } if (maxlen != 0) { if (currlen < maxlen - 1) buffer[currlen] = '\0'; else if (maxlen > 0) buffer[maxlen - 1] = '\0'; } return currlen; } static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; #ifdef DEBUG_SNPRINTF printf("fmtstr min=%d max=%d s=[%s]\n", min, max, value); #endif if (value == 0) { value = "<NULL>"; } for (strln = 0; value[strln]; ++strln); /* strlen */ padlen = min - strln; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ while ((padlen > 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; ++cnt; } while (*value && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, *value++); ++cnt; } while ((padlen < 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; ++cnt; } } /* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) { int signvalue = 0; unsigned long uvalue; char convert[20]; int place = 0; int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; if (max < 0) max = 0; uvalue = value; if(!(flags & DP_F_UNSIGNED)) { if( value < 0 ) { signvalue = '-'; uvalue = -value; } else { if (flags & DP_F_PLUS) /* Do a sign (+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; } } if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { convert[place++] = (caps? "0123456789ABCDEF":"0123456789abcdef") [uvalue % (unsigned)base ]; uvalue = (uvalue / (unsigned)base ); } while(uvalue && (place < 20)); if (place == 20) place--; convert[place] = 0; zpadlen = max - place; spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); if (zpadlen < 0) zpadlen = 0; if (spadlen < 0) spadlen = 0; if (flags & DP_F_ZERO) { zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place); #endif /* Spaces */ while (spadlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ if (zpadlen > 0) { while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } } /* Digits */ while (place > 0) dopr_outch (buffer, currlen, maxlen, convert[--place]); /* Left Justified spaces */ while (spadlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++spadlen; } } static LDOUBLE abs_val(LDOUBLE value) { LDOUBLE result = value; if (value < 0) result = -value; return result; } static LDOUBLE POW10(int exp) { LDOUBLE result = 1; while (exp) { result *= 10; exp--; } return result; } static LLONG ROUND(LDOUBLE value) { LLONG intpart; intpart = (LLONG)value; value = value - intpart; if (value >= 0.5) intpart++; return intpart; } /* a replacement for modf that doesn't need the math library. Should be portable, but slow */ static double my_modf(double x0, double *iptr) { int i; long l; double x = x0; double f = 1.0; for (i=0;i<100;i++) { l = (long)x; if (l <= (x+1) && l >= (x-1)) break; x *= 0.1; f *= 10.0; } if (i == 100) { /* yikes! the number is beyond what we can handle. What do we do? */ (*iptr) = 0; return 0; } if (i != 0) { double i2; double ret; ret = my_modf(x0-l*f, &i2); (*iptr) = l*f + i2; return ret; } (*iptr) = l; return x - (*iptr); } static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; double ufvalue; char iconvert[311]; char fconvert[311]; int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ int zpadlen = 0; int caps = 0; int index; double intpart; double fracpart; double temp; /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ if (max < 0) max = 6; ufvalue = abs_val (fvalue); if (fvalue < 0) { signvalue = '-'; } else { if (flags & DP_F_PLUS) { /* Do a sign (+/i) */ signvalue = '+'; } else { if (flags & DP_F_SPACE) signvalue = ' '; } } #if 0 if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif #if 0 if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */ #endif /* * Sorry, we only support 16 digits past the decimal because of our * conversion method */ if (max > 16) max = 16; /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ temp = ufvalue; my_modf(temp, &intpart); fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); if (fracpart >= POW10(max)) { intpart++; fracpart -= POW10(max); } /* Convert integer part */ do { temp = intpart; my_modf(intpart*0.1, &intpart); temp = temp*0.1; index = (int) ((temp -intpart +0.05)* 10.0); /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ /* printf ("%llf, %f, %x\n", temp, intpart, index); */ iconvert[iplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; } while (intpart && (iplace < 311)); if (iplace == 311) iplace--; iconvert[iplace] = 0; /* Convert fractional part */ if (fracpart) { do { temp = fracpart; my_modf(fracpart*0.1, &fracpart); temp = temp*0.1; index = (int) ((temp -fracpart +0.05)* 10.0); /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ fconvert[fplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; } while(fracpart && (fplace < 311)); if (fplace == 311) fplace--; } fconvert[fplace] = 0; /* -1 for decimal point, another -1 if we are printing a sign */ padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ if ((flags & DP_F_ZERO) && (padlen > 0)) { if (signvalue) { dopr_outch (buffer, currlen, maxlen, signvalue); --padlen; signvalue = 0; } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --padlen; } } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); while (iplace > 0) dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); #ifdef DEBUG_SNPRINTF printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); #endif /* * Decimal point. This should probably use locale to find the correct * char to print out. */ if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; } } static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) { if (*currlen < maxlen) { buffer[(*currlen)] = c; } (*currlen)++; } #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) int vsnprintf (char *str, size_t count, const char *fmt, va_list args) { return dopr(str, count, fmt, args); } #endif #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF) int snprintf(char *str,size_t count,const char *fmt,...) { size_t ret; va_list ap; va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap); return ret; } #endif #endif #ifndef HAVE_VASPRINTF int vasprintf(char **ptr, const char *format, va_list ap) { int ret; ret = vsnprintf(NULL, 0, format, ap); if (ret <= 0) return ret; (*ptr) = (char *)malloc(ret+1); if (!*ptr) return -1; ret = vsnprintf(*ptr, ret+1, format, ap); return ret; } #endif #ifndef HAVE_ASPRINTF int asprintf(char **ptr, const char *format, ...) { va_list ap; int ret; va_start(ap, format); ret = vasprintf(ptr, format, ap); va_end(ap); return ret; } #endif #ifdef TEST_SNPRINTF int sprintf(char *str,const char *fmt,...); int main (void) { char buf1[1024]; char buf2[1024]; char *fp_fmt[] = { "%1.1f", "%-1.5f", "%1.5f", "%123.9f", "%10.5f", "% 10.5f", "%+22.9f", "%+4.9f", "%01.3f", "%4f", "%3.1f", "%3.2f", "%.0f", "%f", "-16.16f", NULL }; double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", "%123.9d", "%5.5d", "%10.5d", "% 10.5d", "%+22.33d", "%01.3d", "%4d", "%d", NULL }; long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; char *str_fmt[] = { "10.5s", "5.10s", "10.1s", "0.10s", "10.0s", "1.10s", "%s", "%.1s", "%.10s", "%10s", NULL }; char *str_vals[] = {"hello", "a", "", "a longer string", NULL}; int x, y; int fail = 0; int num = 0; printf ("Testing snprintf format codes against system sprintf...\n"); for (x = 0; fp_fmt[x] ; x++) { for (y = 0; fp_nums[y] != 0 ; y++) { int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]); int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); sprintf (buf2, fp_fmt[x], fp_nums[y]); if (strcmp (buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", fp_fmt[x], buf1, buf2); fail++; } if (l1 != l2) { printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, fp_fmt[x]); fail++; } num++; } } for (x = 0; int_fmt[x] ; x++) { for (y = 0; int_nums[y] != 0 ; y++) { int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]); int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); sprintf (buf2, int_fmt[x], int_nums[y]); if (strcmp (buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", int_fmt[x], buf1, buf2); fail++; } if (l1 != l2) { printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, int_fmt[x]); fail++; } num++; } } for (x = 0; str_fmt[x] ; x++) { for (y = 0; str_vals[y] != 0 ; y++) { int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]); int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]); sprintf (buf2, str_fmt[x], str_vals[y]); if (strcmp (buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", str_fmt[x], buf1, buf2); fail++; } if (l1 != l2) { printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, str_fmt[x]); fail++; } num++; } } printf ("%d tests failed out of %d.\n", fail, num); printf("seeing how many digits we support\n"); { double v0 = 0.12345678901234567890123456789012345678901; for (x=0; x<100; x++) { snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x)); sprintf(buf2, "%1.1f", v0*pow(10, x)); if (strcmp(buf1, buf2)) { printf("we seem to support %d digits\n", x-1); break; } } } return 0; } #endif /* SNPRINTF_TEST */ Index: Makefile.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/lib/Makefile.in,v retrieving revision 1.1.1.4.2.3.2.4 retrieving revision 1.1.1.4.2.3.2.5 diff -u -d -r1.1.1.4.2.3.2.4 -r1.1.1.4.2.3.2.5 --- Makefile.in 19 Dec 2001 10:34:39 -0000 1.1.1.4.2.3.2.4 +++ Makefile.in 25 Apr 2002 21:41:29 -0000 1.1.1.4.2.3.2.5 @@ -190,11 +190,11 @@ @AMDEP_TRUE@ $(DEPDIR)/md5.Po $(DEPDIR)/memmove.Po \ @AMDEP_TRUE@ $(DEPDIR)/mkdir.Po $(DEPDIR)/regex.Po \ @AMDEP_TRUE@ $(DEPDIR)/rename.Po $(DEPDIR)/savecwd.Po \ -@AMDEP_TRUE@ $(DEPDIR)/sighandle.Po $(DEPDIR)/strerror.Po \ -@AMDEP_TRUE@ $(DEPDIR)/stripslash.Po $(DEPDIR)/strstr.Po \ -@AMDEP_TRUE@ $(DEPDIR)/strtoul.Po $(DEPDIR)/valloc.Po \ -@AMDEP_TRUE@ $(DEPDIR)/waitpid.Po $(DEPDIR)/xgetwd.Po \ -@AMDEP_TRUE@ $(DEPDIR)/yesno.Po +@AMDEP_TRUE@ $(DEPDIR)/sighandle.Po $(DEPDIR)/snprintf.Po \ +@AMDEP_TRUE@ $(DEPDIR)/strerror.Po $(DEPDIR)/stripslash.Po \ +@AMDEP_TRUE@ $(DEPDIR)/strstr.Po $(DEPDIR)/strtoul.Po \ +@AMDEP_TRUE@ $(DEPDIR)/valloc.Po $(DEPDIR)/waitpid.Po \ +@AMDEP_TRUE@ $(DEPDIR)/xgetwd.Po $(DEPDIR)/yesno.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -204,8 +204,8 @@ DIST_SOURCES = $(libcvs_a_SOURCES) DIST_COMMON = ChangeLog Makefile.am Makefile.in ansi2knr.1 ansi2knr.c \ dup2.c fncase.c fnmatch.c getdate.c hostname.c memmove.c \ - mkdir.c rename.c strerror.c strstr.c strtoul.c valloc.c \ - waitpid.c + mkdir.c rename.c snprintf.c strerror.c strstr.c strtoul.c \ + valloc.c waitpid.c SOURCES = $(libcvs_a_SOURCES) all: all-am @@ -252,6 +252,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/savecwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sighandle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stripslash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strstr.Po@am__quote@ |
From: Alexey M. <ty...@us...> - 2002-04-25 21:39:31
|
Update of /cvsroot/cvs-nserver/cvs-nserver In directory usw-pr-cvs1:/tmp/cvs-serv26226 Modified Files: Tag: NCLI-1-11-1 config.h.in configure configure.in Log Message: Update to Autoconf 2.53 Index: config.h.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/config.h.in,v retrieving revision 1.1.1.3.2.3.2.5 retrieving revision 1.1.1.3.2.3.2.6 diff -u -d -r1.1.1.3.2.3.2.5 -r1.1.1.3.2.3.2.6 --- config.h.in 9 Feb 2002 20:03:16 -0000 1.1.1.3.2.3.2.5 +++ config.h.in 25 Apr 2002 21:39:25 -0000 1.1.1.3.2.3.2.6 @@ -56,7 +56,7 @@ /* Define if OpenSSL variant of SSL is used. */ #undef HAVE_OPENSSL -/* Define if the `closedir' function returns void instead of `int'. */ +/* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined @@ -64,275 +64,296 @@ relevant when using GSSAPI. */ #undef GSS_C_NT_HOSTBASED_SERVICE -/* Define if you have the <crypt.h> header file. */ +/* Define to 1 if you have the <crypt.h> header file. */ #undef HAVE_CRYPT_H -/* Define if you have the <direct.h> header file. */ +/* Define to 1 if you have the <direct.h> header file. */ #undef HAVE_DIRECT_H -/* Define if you have the <dirent.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ #undef HAVE_DIRENT_H -/* Define if you have the `dup2' function. */ +/* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 -/* Define if you have the <errno.h> header file. */ +/* Define to 1 if you have the <errno.h> header file. */ #undef HAVE_ERRNO_H -/* Define if you have the `fchdir' function. */ +/* Define to 1 if you have the `fchdir' function. */ #undef HAVE_FCHDIR -/* Define if you have the `fchmod' function. */ +/* Define to 1 if you have the `fchmod' function. */ #undef HAVE_FCHMOD -/* Define if you have the <fcntl.h> header file. */ +/* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H -/* Define if your system has a working `fnmatch' function. */ +/* Define to 1 if your system has a working `fnmatch' function. */ #undef HAVE_FNMATCH -/* Define if you have the `fork' function. */ +/* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK -/* Define if you have the `fsync' function. */ +/* Define to 1 if you have the `fsync' function. */ #undef HAVE_FSYNC -/* Define if you have the `ftime' function. */ +/* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME -/* Define if you have the `ftruncate' function. */ +/* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE -/* Define if you have the `getgroups' function. */ +/* Define to 1 if you have the `getgroups' function. */ #undef HAVE_GETGROUPS -/* Define if you have the `getpagesize' function. */ +/* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE -/* Define if you have the `getpassphrase' function. */ +/* Define to 1 if you have the `getpassphrase' function. */ #undef HAVE_GETPASSPHRASE -/* Define if you have the `gettimeofday' function. */ +/* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have GSSAPI with Kerberos version 5 available. */ #undef HAVE_GSSAPI -/* Define if you have the <gssapi/gssapi_generic.h> header file. */ +/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */ #undef HAVE_GSSAPI_GSSAPI_GENERIC_H -/* Define if you have the <gssapi/gssapi.h> header file. */ +/* Define to 1 if you have the <gssapi/gssapi.h> header file. */ #undef HAVE_GSSAPI_GSSAPI_H -/* Define if you have the <gssapi.h> header file. */ +/* Define to 1 if you have the <gssapi.h> header file. */ #undef HAVE_GSSAPI_H -/* Define if you have the `initgroups' function. */ +/* Define to 1 if you have the `initgroups' function. */ #undef HAVE_INITGROUPS -/* Define if you have the <inttypes.h> header file. */ +/* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define if you have the <io.h> header file. */ +/* Define to 1 if you have the <io.h> header file. */ #undef HAVE_IO_H -/* Define if you have the <krb5.h> header file. */ +/* Define to 1 if you have the <krb5.h> header file. */ #undef HAVE_KRB5_H -/* Define if you have the `krb_get_err_text' function. */ +/* Define to 1 if you have the `krb_get_err_text' function. */ #undef HAVE_KRB_GET_ERR_TEXT -/* Define if you have the <limits.h> header file. */ +/* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H -/* Define if you support file names longer than 14 characters. */ +/* Define to 1 if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES -/* Define if you have the `memmove' function. */ +/* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define if you have the <memory.h> header file. */ +/* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Define if you have the `mkdir' function. */ +/* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR -/* Define if you have the `mknod' function. */ +/* Define to 1 if you have the `mknod' function. */ #undef HAVE_MKNOD -/* Define if you have the `mkstemp' function. */ +/* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP -/* Define if you have the `mktemp' function. */ +/* Define to 1 if you have the `mktemp' function. */ #undef HAVE_MKTEMP -/* Define if you have the `nanosleep' function. */ +/* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP -/* Define if you have the <ndbm.h> header file. */ +/* Define to 1 if you have the <ndbm.h> header file. */ #undef HAVE_NDBM_H -/* Define if you have the <ndir.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ #undef HAVE_NDIR_H -/* Define if you have the <netdb.h> header file. */ +/* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H -/* Define if you have the <openssl/ssl.h> header file. */ +/* Define to 1 if you have the <openssl/ssl.h> header file. */ #undef HAVE_OPENSSL_SSL_H -/* Define if you have the `putenv' function. */ +/* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV -/* Define if you have the `readlink' function. */ +/* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK -/* Define if you have the `rename' function. */ +/* Define to 1 if you have the `rename' function. */ #undef HAVE_RENAME -/* Define if you have the `select' function. */ +/* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT -/* Define if you have the `sigaction' function. */ +/* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION -/* Define if you have the `sigblock' function. */ +/* Define to 1 if you have the `sigblock' function. */ #undef HAVE_SIGBLOCK -/* Define if you have the `sigprocmask' function. */ +/* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define if you have the `sigsetmask' function. */ +/* Define to 1 if you have the `sigsetmask' function. */ #undef HAVE_SIGSETMASK -/* Define if you have the `sigvec' function. */ +/* Define to 1 if you have the `sigvec' function. */ #undef HAVE_SIGVEC -/* Define if you have the <stdint.h> header file. */ +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H -/* Define if you have the <stdlib.h> header file. */ +/* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H -/* Define if you have the `strerror' function. */ +/* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define if you have the <strings.h> header file. */ +/* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H -/* Define if you have the <string.h> header file. */ +/* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define if you have the `strstr' function. */ +/* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR -/* Define if you have the `strtoul' function. */ +/* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL -/* Define if `st_blksize' is member of `struct stat'. */ +/* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define if `st_rdev' is member of `struct stat'. */ +/* Define to 1 if `st_rdev' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV -/* Define if your `struct stat' has `st_blksize'. Deprecated, use +/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE -/* Define if your `struct stat' has `st_rdev'. Deprecated, use +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV' instead. */ #undef HAVE_ST_RDEV -/* Define if you have the <syslog.h> header file. */ +/* Define to 1 if you have the <syslog.h> header file. */ #undef HAVE_SYSLOG_H -/* Define if you have the <sys/bsdtypes.h> header file. */ +/* Define to 1 if you have the <sys/bsdtypes.h> header file. */ #undef HAVE_SYS_BSDTYPES_H -/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ #undef HAVE_SYS_DIR_H -/* Define if you have the <sys/file.h> header file. */ +/* Define to 1 if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H -/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ #undef HAVE_SYS_NDIR_H -/* Define if you have the <sys/param.h> header file. */ +/* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H -/* Define if you have the <sys/resource.h> header file. */ +/* Define to 1 if you have the <sys/resource.h> header file. */ #undef HAVE_SYS_RESOURCE_H -/* Define if you have the <sys/select.h> header file. */ +/* Define to 1 if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H -/* Define if you have the <sys/stat.h> header file. */ +/* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H -/* Define if you have the <sys/timeb.h> header file. */ +/* Define to 1 if you have the <sys/timeb.h> header file. */ #undef HAVE_SYS_TIMEB_H -/* Define if you have the <sys/time.h> header file. */ +/* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H -/* Define if you have the <sys/types.h> header file. */ +/* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H -/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ +/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define if you have the `tempnam' function. */ +/* Define to 1 if you have the `tempnam' function. */ #undef HAVE_TEMPNAM -/* Define if you have the `timezone' function. */ +/* Define to 1 if you have the `timezone' function. */ #undef HAVE_TIMEZONE -/* Define if you have the `tzset' function. */ +/* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET -/* Define if you have the <unistd.h> header file. */ +/* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define if you have the `usleep' function. */ +/* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP -/* Define if you have the <utime.h> header file. */ +/* Define to 1 if you have the <utime.h> header file. */ #undef HAVE_UTIME_H -/* Define if `utime(file, NULL)' sets file's timestamp to the present. */ +/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ #undef HAVE_UTIME_NULL -/* Define if you have the `valloc' function. */ +/* Define to 1 if you have the `valloc' function. */ #undef HAVE_VALLOC -/* Define if you have the `vfork' function. */ +/* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK -/* Define if you have the <vfork.h> header file. */ +/* Define to 1 if you have the <vfork.h> header file. */ #undef HAVE_VFORK_H -/* Define if you have the `vprintf' function. */ +/* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF -/* Define if you have the `wait3' function. */ +/* Define to 1 if you have the `wait3' function. */ #undef HAVE_WAIT3 -/* Define if you have the `waitpid' function. */ +/* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID -/* Define if `fork' works. */ +/* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK -/* Define if `vfork' works. */ +/* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK -/* Define if you have the <zlib.h> header file. */ +/* Define to 1 if you have the <zlib.h> header file. */ #undef HAVE_ZLIB_H /* Name of package */ #undef PACKAGE +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + /* Define if compiler has function prototypes */ #undef PROTOTYPES @@ -342,33 +363,33 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE -/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ +/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #undef STAT_MACROS_BROKEN -/* Define if you have the ANSI C header files. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define if you can safely include both <sys/time.h> and <time.h>. */ +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION -/* Define if on AIX 3. +/* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif -/* Define if on MINIX. */ +/* Define to 1 if on MINIX. */ #undef _MINIX -/* Define if the system does not provide POSIX.1 features except with this - defined. */ +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ #undef _POSIX_1_SOURCE -/* Define if you need to in order for `stat' and other things to work. */ +/* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ Index: configure =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/configure,v retrieving revision 1.1.1.6.2.9.2.11 retrieving revision 1.1.1.6.2.9.2.12 diff -u -d -r1.1.1.6.2.9.2.11 -r1.1.1.6.2.9.2.12 --- configure 14 Apr 2002 19:13:31 -0000 1.1.1.6.2.9.2.11 +++ configure 25 Apr 2002 21:39:25 -0000 1.1.1.6.2.9.2.12 @@ -1,14 +1,21 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.52e for cvs-nserver 1.11.1.52. +# Generated by GNU Autoconf 2.53 for cvs-nserver 1.11.1.52. # # Report bugs to <cvs...@li...>. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation [...2235 lines suppressed...] +at_top_srcdir='$ac_top_srcdir' +abs_top_srcdir='$ac_abs_top_srcdir' +at_top_builddir='$ac_top_builddir' +abs_top_builddir='$ac_abs_top_builddir' AUTOTEST_PATH='tests' @@ -11071,6 +11312,7 @@ chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open @@ -11088,3 +11330,4 @@ # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi + Index: configure.in =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/configure.in,v retrieving revision 1.1.1.6.2.9.2.13 retrieving revision 1.1.1.6.2.9.2.14 diff -u -d -r1.1.1.6.2.9.2.13 -r1.1.1.6.2.9.2.14 --- configure.in 14 Apr 2002 19:13:32 -0000 1.1.1.6.2.9.2.13 +++ configure.in 25 Apr 2002 21:39:26 -0000 1.1.1.6.2.9.2.14 @@ -1,10 +1,11 @@ dnl configure.in for cvs -AC_PREREQ(2.50) -AC_PREREQ(2.52e) -AC_INIT(cvs-nserver, 1.11.1.52, cvs...@li...) +AC_PREREQ(2.53) + +define(current_version, 1.11.1.52) + +AC_INIT(cvs-nserver, current_version(), cvs...@li...) AC_CONFIG_SRCDIR(src/cvs.h) -AM_INIT_AUTOMAKE(cvs-nserver, 1.11.1.52) -AC_PREFIX_PROGRAM(cvs) +AM_INIT_AUTOMAKE(cvs-nserver, current_version()) AM_CONFIG_HEADER(config.h src/options.h) # initialize test framework @@ -26,15 +27,11 @@ if test x"$ac_cv_prog_gnu_m4" != xyes; then AC_MSG_ERROR([GNU m4 1.4 is required]) fi -# This is needed because Automake does not seem to realize there is -# a AC-SUBST inside AC-PROG-GNU-M4. Grmph! -AC_SUBST(M4) AC_PROG_AWK AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET -# Automake's more advanced version of AC_PROG_RANLIB AC_PROG_RANLIB AC_PROG_YACC AC_PROG_LN_S @@ -123,7 +120,7 @@ AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_RDEV -AC_REPLACE_FUNCS(mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul) +AC_REPLACE_FUNCS(mkdir rename strstr dup2 snprintf strerror valloc waitpid memmove strtoul) AC_CHECK_FUNCS(\ fchdir \ fchmod \ @@ -188,20 +185,12 @@ AC_FUNC_VFORK AC_FUNC_CLOSEDIR_VOID -dnl -dnl Check for shadow password support. -dnl -dnl We used to try to determine whether shadow passwords were actually in -dnl use or not, but the code has been changed to work right reguardless, -dnl so we can go back to a simple check. -AC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM)) - AC_FUNC_UTIME_NULL AC_SYS_LONG_FILE_NAMES AC_FUNC_FNMATCH if test "$ac_cv_func_fnmatch_works" = no; then - LIBOBJS="$LIBOBJS fnmatch.o" + AC_LIBOBJ(fnmatch) fi # Try to find connect and gethostbyname. @@ -315,7 +304,8 @@ AC_DEFINE(ENCRYPTION) fi -AC_CHECK_FUNC(gethostname, :, LIBOBJS="$LIBOBJS hostname.o") + +AC_CHECK_FUNC(gethostname, :, AC_LIBOBJ(hostname)) # # use --with-openssl to turn on support for OpenSSL @@ -428,7 +418,7 @@ [AC_TRY_COMPILE([], [return __CYGWIN32__;], ccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)]) if test $ccvs_cv_sys_cygwin32 = yes; then - LIBOBJS="$LIBOBJS fncase.o" + AC_LIBOBJ(fncase) LIBS="$LIBS -ladvapi32" dnl On Windows you can only change file times if you can write to |
From: Alexey M. <mo...@us...> - 2002-04-25 12:19:07
|
Update of /cvsroot/cvs-nserver/cvs-nserver/doc In directory usw-pr-cvs1:/tmp/cvs-serv24329 Added Files: Tag: NCLI-1-11-1 cvs-admin-tools.texi Log Message: Initial commit of the cvs-admin-tools documentation. There're few points where clean up is needed but generally the structure is Ok... --- NEW FILE: cvs-admin-tools.texi --- \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename cvs-admin-tools.info @settitle Tools for a CVS Repository Administrator @c %**end of header @ifinfo @format START-INFO-DIR-ENTRY * @sc{cvs} Admin Tools: (cvs-admin-tools). Tools for a @sc{cvs} Repository Administrator END-INFO-DIR-ENTRY @end format @end ifinfo @set VERSION 1.11.1.52 @set EDITION 1.1 @set UPDATED 25 April 2002 @set UPDATED-MOTH April 2002 @ifinfo This file documents administrative utilities for cvs-nserver Copyright @copyright{} 2002 Novosoft, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @ignore Permission is granted to process this file through TeX and print the results, provided the printed document carries a copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the sections entitled ``Copying'' and ``GNU General Public License'' are included exactly as in the original, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Novosoft, Inc. @end ifinfo @titlepage @titlefont{CVS-Nserver} @sp 1 @title Administrative utilities @subtitle Edition @value{EDITION} @author by Alexey Morozov @page @vskip 0pt plus 1filll Copyright @copyright{} 2002 Novosoft, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the sections entitled ``Copying'' and ``GNU General Public License'' are included exactly as in the original, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Novosoft, Inc. @end titlepage @contents @ifinfo @node Top, Overview, (dir), (dir) @top This info manual describes several utilities useful for managing @sc{cvs} repositories built upon CVS-Nserver version @value{VERSION} @end ifinfo @menu * Overview:: Description of the @sc{cvs} administrative model used in the system * Command-line tools:: Command-line tools to administer your @sc{cvs} repositories * WWW-based tools:: @sc{www} interface for performing the same tasks @detailmenu Console tools for managing repositories * cvs-create-repository:: A console tool for repository creation * cvs-group:: Manage user groups in a specified project @end detailmenu @end menu @node Overview, Command-line tools, Top, Top @chapter Overview @cindex Overview First of all I should admit that the proposed administrative model is not mandatory. You may freely create your own one (of course after reading other related manuals, such as @ref{Starting a new project,,,cvs,Concurrent Versions System}, and @ref{Managing repositories,,,cvs-admin-guide, CVS-Nserver Administrator's Guide}. But this particular model was created to fit Novosoft's internal project management process and perhaps may be useful in other places as well. There are several keypoints in the proposed model. Here they are: @itemize @bullet @item Each repository may contain one or several closely related @dfn{projects} (program modules). By term @dfn{closely related} I mean projects that share management, participants team etc. Usually they may be independent parts of a program (say w/ different versioning etc) @item Each repository has the @emph{only} administrative person (usually a team leader or group project manager). This person takes the whole responsibility for managing users and they access rights for the entire repository. @item Each repository has several groups for different participants roles named @var{%role}. By default the following roles are defined: @itemize @minus @item @dfn{managers} - members of @code{%managers} are able to manage ACLs in the repository. Please note that by default @code{%managers} @strong{can't} make changes for the repository, they just run access rights. @item @dfn{developers} - members of @code{%developers} have read/write access to the entire repository (but can't manage ACL's). @item @dfn{readers} - this group usually contains customers and/or quality assurance persons (testers). @end itemize Of course you're able to define other groups related to the project, such as release engineers (i.e. persons who are able to make changes only to a specified branch) or any other groups you may find useful. An user may be a memeber of several groups. In this case the least given rights for a given directory will be effective for her. Sometimes you may find useful to include a project manager or a team leader to both @code{%managers} and @code{%developers} groups. @item Repositories may be grouped into an entity called @dfn{metarepository} for the convenience of system administration. Such repositories share access method (say @samp{it's may be SSL tunneled pserver}), authorization model (@samp{LDAP-based auth.}) and other common properties, useful for company system administrators, such as common backup facility, logging methods etc. @end itemize @heading Technical notes @itemize @bullet @item Technically speaking, each repository @emph{may} have its own system account for @dfn{Repository Administrator} specified in repository creation time. By default @dfn{cvsadmin} is used for this purpose. @item Each repository @emph{may} have its own system account for @dfn{its ordinary users} specified in repository creation time. By default it's @dfn{cvs}. @end itemize @node Command-line tools, WWW-based tools, Overview, Top @chapter Command-line tools @cindex Command-line tools Console tools for managing repositories @menu * cvs-create-repository:: A console tool for repository creation * cvs-group:: Manage groups in a specified project @end menu @node cvs-create-repository, cvs-group, Command-line tools, Command-line tools @section cvs-create-repository @cindex Repository, creation @cindex Creating an n@sc{cvs} repository @pindex cvs-create-repository @subheading NAME @table @code @item cvs-create-repository a tool for setting up a new repository for the n@sc{cvs} server @end table @subheading SYNOPSIS @code{cvs-create-repository} [@var{options} @dots{}] @var{repository} @subsubheading Options @table @code @item -i, --interactive Interactive mode even all required data is supplied @item -b, --batch An opposite for interactive @item -su, --sysuser System account for regular access to the repository (DEFAULT: @var{cvs}) @item -sg, --sysgroup System group for regular access to the repository (DEFAULT: the same as @code{--sysuser}) @item -sa, --sysadminuser System account for administrative access to the repository (DEFAULT: @var{cvsadmin}) @item -sag, --sysadmingroup System group for administrative access to the repository (DEFAULT: the same as @code{--sysadminuser}) @item -c, --create Add system accounts if they are missing currently (DEFAULT: @emph{YES}) @item --cvsadmin CVS virtual account for administrative access to the repository (DEFAULT: @var{admin}) @end table @subsubheading Network options @table @code @item -x, --xinetd Create an xinetd service entry for the newly created repository (DEFAULT: @emph{YES}) @item -p, --pserver Enable traditional @dfn{pserver} access to the repository (DEFAULT: @emph{YES}) @item --port Port for the 'pserver' access (DEFAULT: @var{2401}) @item -s, --sslpserver Enable SSL-tunnelled @dfn{sslpserver} access to the repository (DEFAULT: @emph{NO}) @item --sslport Port for the 'sslpserver' access (DEFAULT: @var{2402}) @item -j, --join Try to add the newly created repository to an appropriate service entry if such one exists (DEFAULT: @emph{YES}) @end table Options with @emph{YES} or @emph{NO} defaults are boolean and can be specified as @samp{--optionname} for @emph{YES} and @samp{--nooptionname} for @emph{NO} @node cvs-group, , cvs-create-repository, Command-line tools @section cvs-group @cindex Managing groups of users in a project @cindex group, manage @cindex user, manage @cindex remove @cindex create @pindex cvs-group @subheading NAME @table @code @item cvs-group a tool for managing user groups in a repository @end table @subheading SYNOPSIS @code{cvs-group} [-d @var{repository} ] @var{sub-command} [@var{sub-command options}] @subsubheading Global Options @table @code @item -d, --root @samp{root} Allows to specify arbitrary @sc{cvsroot}. Defaults as for @code{cvs} command. @end table @subsubheading Sub-commands @table @code @item create @var{%groupname} Creates a group with name @var{%groupname} inside a repository @item delete @var{%groupname} Removes a specified group from a repository @item add [@code{-n} @var{other options}] @var{%groupname} @var{username} Adds specified user @var{username} to the group named @var{%groupname}. The group must exist before the operation. The user must be known to the underlying authorization system unless @code{-n} option is specified. With @code{-n} option the user will be created using @code{cvs passwd}. Other possible options are from @code{cvs passwd} subcommand. @item remove [@code{-x}] @var{%groupname} @var{username} Removes specified user from the group. If @code{-x} option is specified, the user will also be removed from underlying authorization system (using @code{cvs passwd}) @end table @node WWW-based tools, , Command-line tools, Top @chapter WWW-based tools @cindex WWW interface @cindex Web interface Web interface is written according to external documentation... @bye |
From: Alexey M. <mo...@us...> - 2002-04-23 15:56:13
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv10274/src Modified Files: Tag: NCLI-1-11-1 ls.c Log Message: BUGFIX: oops, small typo in access right listing fixed Index: ls.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/ls.c,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- ls.c 23 Apr 2002 15:54:32 -0000 1.1.2.10 +++ ls.c 23 Apr 2002 15:56:10 -0000 1.1.2.11 @@ -191,7 +191,7 @@ } else { int need_comma = 0; if (perm & branch_perm_checkout) { - cvs_output("checkout",1); + cvs_output("checkout",0); need_comma = 1; } if (perm & branch_perm_checkin) { |