summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
AgeCommit message (Collapse)Author
2020-10-19Accommodate POSIX basename(3) that takes a non-const parameter andChristian Weisgerber
may modify the string buffer. ok florian@ millert@
2020-06-26Fix merging of files that lack newlines for diff(3), OpenRCS, and OpenCVS.Stefan Sperling
Merges with a file that lacks newlines (\n) were triggering a fatal error. This could be easily reproduced with merge(1) and diff3(1): $ echo foo > foo $ echo bar > bar $ echo -n baz > baz $ merge -p foo bar baz merge: failed to merge $ diff3 -E foo bar baz 1a ======= diff3prog: logic error $ Fix this by properly handling short reads from the third file argument. Only the third file argument triggered the problem. The other input files were already handled correctly. ok millert@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-28asprintf returns -1, not an arbitrary value < 0. Also upon error theTheo de Raadt
(very sloppy specification) leaves an undefined value in *ret, so it is wrong to inspect it, the error condition is enough. discussed a little with nicm, and then much more with millert until we were exasperated
2018-12-30Delete unnecessary <libgen.h> #includesPhilip Guenther
ok deraadt@
2018-12-05fix incorrect usage of the .Bx macro;Ingo Schwarze
one case reported by Fabio Scotoni <fabio at esse dot ch>, the rest found with regress/usr.bin/mandoc/db/dbm_dump
2018-07-14don't run cvs_client_sendfile() if its file_type is CVS_DIR, but do notJoris Vink
depend on it being CVS_FILE explicitly. unbreaks remote operations on removed files.
2017-08-28fix const related warnings; ok millert@Otto Moerbeek
2017-08-28Use xasprintf() instead of calloc() + strlcpy() + memcpy() toTodd C. Miller
generate the log line. Fixes a clang warning about using the wrong size argument in strlcpy(). The existing code was safe but not good strlcpy() practice. OK otto@
2017-08-21When executing ssh, use "--" to indicate end of arguments before theTodd C. Miller
host name. Adapted from a MirBSD diff by Thorsten Glaser.
2017-07-20Add missing <time.h> header.Okan Demirmen
ok joris@
2017-06-01If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.Joris Vink
Otherwise we end up calling cvs_repository_unlock() with garbage from the stack if we're dealing with a remote cvsroot.
2017-06-01Don't look at file_type until after cvs_remote_classify_file() was called.Joris Vink
The file status may be unknown until after that call.
2017-06-01Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.Joris Vink
Instead use cvsroot_is_local() and cvsroot_is_remote().
2017-05-31Do not use CVS_LOCK_REPO for committing.Joris Vink
This flag tells our file recursion code that for each directory entered we should lock it. Commit however locks all relevant directories on its own when it is about to make changes and should not depend on the file recursion code to do so.
2017-05-31Plug memleak in rcs_translate_tag() that was causing havoc on large repos.Joris Vink
2017-05-31When unlocking a directory only unlock the given one rather then all repo_locks.Joris Vink
2017-05-31fix indentationJoris Vink
2017-05-31Fix opencvs tag so it does not attempt to to local operations in a remote setup.Joris Vink
While here make sure the "up-to-date" check (-c) works as one expects.
2017-05-29cvs_file_classify() was making the mistake of only taking over a stickyJoris Vink
tag from Entries for a given file if the sticky tag is present. while changing this we can simplify some logic in update.c on how it decides what tag to use for file classification.
2017-05-28Let opencvs show ignored files on import, not showing them is just confusing.Joris Vink
ok stsp@
2017-05-28Don't allow opencvs to commit towards tags that are not branches.Joris Vink
Gets rid of the old logic that wasn't working and replaced it with a simplified version. ok stsp@
2017-05-28Teach opencvs status to display the sticky tag according to what it reallyJoris Vink
represents if it is a branch or a revision. ok stsp@
2017-05-28Bring the opencvs log message template inline with other cvs implementations.Joris Vink
ok stsp@
2016-11-03Don't use ce_time if we are running as a server, it won't be present.Joris Vink
2016-10-27minor whitespace fixes.Joris Vink
2016-10-18Using bitwise OR along with two assignments in the conditional ofTodd C. Miller
a while() loop is a trap for the unwary programmer (albeit a clever trap). Break this up into two separate assignments and using boolean OR for clarity. OK otto@
2016-10-18Add the branch revision to the status output much like GNU cvs does.Joris Vink
OK millert@
2016-10-16Remove useless n=n assignment in the first parse of a for().Todd C. Miller
It was already removed from the rcs version by nicm@.
2016-10-15Quiet compiler warnings. OK tomc@ tb@Todd C. Miller
2016-10-14Fix update -r and -A.Frederic Cambus
In certain cases update -r and update -A would not properly set or reset the sticky tag for file(s). From Joris Vink. OK millert@
2016-10-13rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.Frederic Cambus
OK millert@
2016-10-13Fix revision lookups for branches. Properly perform a revisionTodd C. Miller
lookup so update -r actually works again, as a bonus throw a more correct error when the revision could not be found. From Joris Vink.
2016-10-12When allocating the h_table array use the size of struct hash_head,Todd C. Miller
not the size of a pointer. From Joris Vink. OK fcambus@
2016-10-12Use the correct type for p. From Joris Vink.Frederic Cambus
OK tb@
2016-09-04Add missing getpw pledgeTheo Buehler
ok deraadt
2016-08-16When the commit message is empty, don't default to c)ontinueTheo Buehler
(committing without log message) but a)bort. Also, accept the uppercase versions of the choices. Matches the corresponding change of behavior of GNU cvs. suggested by & ok jcs
2015-12-24more e-mail -> emailmmcc
2015-12-22commited -> committedmmcc
2015-12-09Remove NULL-checks before free(). ok tb@mmcc
2015-11-19opencvs can use pledge "stdio rpath wpath cpath fattr proc exec".Theo de Raadt
I have not looked into adding stricter pledges later in the code.
2015-11-17Merge xmalloc.[ch] files across base, skipping OpenSSH for now.Tobias Stoeckmann
ok nicm
2015-11-05Remove xfree(), like already done for RCS. From Michael W Bombardieri,Nicholas Marriott
ok mmcc
2015-09-05Add brackets to clarify assignments that are the result of a test operator.Jonathan Gray
ok deraadt@ looks correct millert@ jung@
2015-08-20Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopeTheo de Raadt
ok krw millert
2015-04-04Add support for commit ids to opencvs status.Stefan Sperling
Patch by joris via tech@; reminded by tedu
2015-04-04Fix modified timestamp in output of opencvs status.Stefan Sperling
Patch by joris via tech@; reminded by tedu
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-12-01An internal function called xrealloc() is actually a fail-hardTheo de Raadt
reallocarray()... so rename it.