[Top][All Lists]

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

Re: Why can't root check in files?

From: luke
Subject: Re: Why can't root check in files?
Date: Thu, 11 Oct 2001 15:37:47 +1000 (EST)

On 10 Oct, Larry Jones wrote:
>  address@hidden writes:
> > 
> > cvs [commit aborted]: cannot commit files as 'root'
> > 
> > Can someone explain this to me, please?  It's a major problem for me.
> > I had a look through the FAQ and the cvs document, but could find no
> > mention of it.
>  Here's what the current development version of the manual has to say:
>       When committing a permanent change, CVS makes a log entry of who
>       committed the change.  If you are committing the change logged
>       in as "root" (not under "su" or other root-priv giving program),
>       CVS cannot determine who is actually making the change. As such,
>       by default, CVS disallows changes to be committed by users
>       logged in as "root".  (You can disable this option by commenting
>       out the definition of CVS_BADROOT in 'options.h' before building
>       CVS.

Thanks.  That makes sense, and I think it's right.

However, I still think that I'm onto something good here - the cvs
control of Unix config files.  Unfortunately, this sensible cvs feature
utterly prevents me from providing this useful facility.

The idea of modifying cvs to remove the restriction (as I just noticed
the comment is src/options.h suggest):

>   * As such, by default, CVS disallows changes to be committed by users
>   * logged in as "root".  You can disable this option by commenting out
>   * the lines below.

isn't a good solution either, since I want to release my script that
puts /etc under cvs control.  There would be little value in doing that
if it would require people to compile a special version of cvs.

I think the problem would be solved, though, if cvs were to have the
following commit option added:

    -u USER     This option means, override the apparent user when
                recording the change.  This is useful if you wish
                commit a change as root, or if you are sitting down at
                someone else's login for some reason, and making a
                change there.  Use this option responsibly.

Sometimes, I've wished I could do that.  Sometimes, the complex problem
you're resolving only shows up on certain people's machines, in their
peculiar environment, and it's just 10 times faster to fix it on the

BTW, the shell script I've written proved to be surprisingly
challenging; it's 1200 lines long.  (Hmm, 30% of that is comment - good
for me!)

I plan to test it out a bit more than just on my home Linux system
before I release it.  That is, if I can get this small change made to
cvs.  :-)

Would it make it easier if I offered to do it myself and submit a patch?


reply via email to

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