bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

apparent defect: you are unknown to this system


From: Ellison, Martin [IT]
Subject: apparent defect: you are unknown to this system
Date: Mon, 19 Nov 2001 08:50:17 +1100

I think this is a defect. I raised the issue on gnu.cvs.help without any
resolution of the issue.

The message "cvs [server aborted]: you are unknown to this system" occurs if
a cvs user tries to do a commit and the cvs userid is not a valid login on
the server (using pserver). This occurs even if the user is set up properly
in CVSROOT/passwd.

he relevant code in commit.c reads:

        if ((pw = (struct passwd *) getpwnam (getcaller ())) == NULL)
            error (1, 0, "you are unknown to this system");
        if (pw->pw_uid == (uid_t) 0)
            error (1, 0, "cannot commit files as 'root'");

I have a line like fakeuser::realuser in CVSROOT/passwd and login as
fakeuser. Everything is fine (checkout, edit,...) until I try a commit when
I get the message. getcaller() is returning "fakeuser" not "realuser" and
getpwnam() is a system call that expects a real user.

In subr.c, the code comment says getcaller() should "return the username by
which the caller should be identified in CVS, in contexts such as the author
field of RCS files, various logs, etc." so returning fakeuser in this case
is correct (and so the problem is in commit.c not in the getcaller code in
subr.c).

This is looking to me like a bug in commit.c -- am I missing something?

There is a workaround -- to undefine  CVS_BADROOT. The check code (as above)
is inside a #ifdef CVS_BADROOT, so this would presumably fix the problem,
but then the check is there for a good reason.

Regards,
Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]