History log of /openbsd/usr.bin/cvs/file.c (Results 1 – 25 of 276)
Revision Date Author Comments
# fd71e6a3 11-Aug-2023 guenther <guenther@openbsd.org>

cvs_file_copy() used futimes(), but only set the tv_sec fields,
which presumably meant passing stack garbage in the tv_usec and
failing with EINVAL, whee. Switch to futimens() and set the full
times

cvs_file_copy() used futimes(), but only set the tv_sec fields,
which presumably meant passing stack garbage in the tv_usec and
failing with EINVAL, whee. Switch to futimens() and set the full
timespecs from the incoming struct stat

ok millert@

show more ...


# b7041c07 24-Oct-2021 deraadt <deraadt@openbsd.org>

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past
have passed mode_t (0, 044, 0644, or such), which mig

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef.
ok millert

show more ...


# 431378d1 19-Oct-2020 naddy <naddy@openbsd.org>

Accommodate POSIX basename(3) that takes a non-const parameter and
may modify the string buffer.

ok florian@ millert@


# ddb8cb02 01-Jun-2017 joris <joris@openbsd.org>

If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.

Otherwise we end up calling cvs_repository_unlock() with garbage from the
stack if we're dealing with a remote cvsroot.


# 4dcde513 01-Jun-2017 joris <joris@openbsd.org>

Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.

Instead use cvsroot_is_local() and cvsroot_is_remote().


# 323cb621 29-May-2017 joris <joris@openbsd.org>

cvs_file_classify() was making the mistake of only taking over a sticky
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

cvs_file_classify() was making the mistake of only taking over a sticky
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.

show more ...


# fcdcc3e6 28-May-2017 joris <joris@openbsd.org>

Let opencvs show ignored files on import, not showing them is just confusing.

ok stsp@


# ae886706 15-Oct-2016 millert <millert@openbsd.org>

Quiet compiler warnings. OK tomc@ tb@


# 53ce2177 13-Oct-2016 fcambus <fcambus@openbsd.org>

rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.

OK millert@


# 397ddb8a 05-Nov-2015 nicm <nicm@openbsd.org>

Remove xfree(), like already done for RCS. From Michael W Bombardieri,
ok mmcc


# cfff592f 20-Aug-2015 deraadt <deraadt@openbsd.org>

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert


# 1357284a 05-Feb-2015 millert <millert@openbsd.org>

Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@


# b9fc9a72 16-Jan-2015 deraadt <deraadt@openbsd.org>

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_N

Replace <sys/param.h> with <limits.h> and other less dirty headers where
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)

show more ...


# 42354d6e 13-Dec-2013 zhuk <zhuk@openbsd.org>

Make it compile again. And there is a time_t fix as a bonus!

Input and okay jca@.


# 3f3251d0 28-Oct-2010 millert <millert@openbsd.org>

Change basep parameter of getdirentries() to be off_t *, not long *
so it works correctly with large offsets (and matches other systems).
This requires adding a new getdirentries syscall, with the ol

Change basep parameter of getdirentries() to be off_t *, not long *
so it works correctly with large offsets (and matches other systems).
This requires adding a new getdirentries syscall, with the old one
renamed to ogetdirentries. All in-tree consumers of getdirentries()
have been updated. Bump libc and libpthread major numbers.
OK and with deraadt@

show more ...


# 1b5f4165 27-Sep-2010 joshe <joshe@openbsd.org>

Have cvs_file_walkdir() ignore CVS/ directories when walking a repository tree.

This fixes r* commands such as rlog against a repository which has
somehow ended up containing CVS/Entries.Static file

Have cvs_file_walkdir() ignore CVS/ directories when walking a repository tree.

This fixes r* commands such as rlog against a repository which has
somehow ended up containing CVS/Entries.Static files.

ok nicm@ guenther@

show more ...


# 7bb3ddb0 23-Jul-2010 ray <ray@openbsd.org>

Reduce variable/function name and whitespace differences between
cvs/rcs.

OK xsa zinovik


# 50b68c3e 13-Jul-2010 nicm <nicm@openbsd.org>

Do not put the file into conflict if it is no longer modified (user has
edited it back to repository state).

ok zinovik


# 7c4661d9 28-Mar-2009 joris <joris@openbsd.org>

when i fixed to attic handling i forgot one special case
that we'd hit in normal checkouts/updates for duplicate file
and dirs.

found and diff tested by krw@


# 4cb553bb 26-Mar-2009 joris <joris@openbsd.org>

fix the way Attic is handled in our recursion code, so we
do not skip files or run over them twice.

also fixes -l and -r for checkout/update when a file in
Attic exists with that tag that in HEAD is

fix the way Attic is handled in our recursion code, so we
do not skip files or run over them twice.

also fixes -l and -r for checkout/update when a file in
Attic exists with that tag that in HEAD is a directory
in the normal repository like gnu/usr.bin/gcc/INSTALL.

as a bonus, we do not run fstat() twice per file or dir
anymore...

spotted by deraadt@

show more ...


# f106b389 25-Mar-2009 joris <joris@openbsd.org>

switch our file and directory lists to RB trees (see tree(3)),
so we can benefit from faster lookup times while recursing.


# 4cb5121a 24-Mar-2009 joris <joris@openbsd.org>

have CVS_OP_TAG and CVS_OP_RTAG use RCS_WRITE flag
when calling rcs_open(), so it gets automaticly synced
at the end of operations for that file instead of explicitly
calling rcs_write() when you're

have CVS_OP_TAG and CVS_OP_RTAG use RCS_WRITE flag
when calling rcs_open(), so it gets automaticly synced
at the end of operations for that file instead of explicitly
calling rcs_write() when you're in RCS_READ mode only.

while here, make sure we do not try to free an uninitialized list.

show more ...


# bf2db54c 19-Mar-2009 joris <joris@openbsd.org>

properly register Questionable files using CVS/Entries server-side
in order for them to show up as "? foobar" when opencvs is in server mode.


# 60a7aded 21-Feb-2009 joris <joris@openbsd.org>

fix grammar
from <dawedawe@gmx.de>


# 5cf15c45 21-Feb-2009 joris <joris@openbsd.org>

use FILE_ON_DISK flags when we need to verify if a file
exists in the working copy or not instead of checking fd being -1
since this can differ in server or local mode.


12345678910>>...12