CVSROOT:        /cvs
Module name:    src
Changes by:     n...@cvs.openbsd.org    2010/10/31 09:37:34

Modified files:
        usr.bin/cvs    : init.c rcs.c rcs.h 

Log message:
init was passing a writable file descriptor into rcs_open which was then
failing to fdopen() it as readable. It doesn't need to pass in the fd at
all, so just change it to pass -1 which makes cvs init work again.

In fact, the fd should never need to be writable - it is only used for
reading. RCS_WRITE triggers a rewrite on the file on rcs_close() but
this is done by using a temporary and rename(2) (RCS_WRITE is a poor
name for the flag). So while here, add a couple of comments to hopefully
make it a little clearer. There is some confusion about how this is used
in other places but checking those is a separate issue.

with and ok tobias

Reply via email to