info-cvs
[Top][All Lists]
Advanced

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

Perfect spot


From: Luis Cordeiro
Subject: Perfect spot
Date: Fri, 28 Nov 2003 12:28:23 -0000

Hi!

I'm trying to change the CVS sources so I can check user's permissions from
a mysql database.

I've already found some "spots" in the sources that give me the information
I need, but only to some operations (check in, checkout, commit) and not all
(diff).

I need to have several repositories with several modules, and for each
module each directory must have different permissions to different users.

I've made a database were I have the dir name (filename + dir name), module
and repository (repository folder). To each access to the CVS I need to
check the permissions of the user to the file/module/repository, and report
an error to the CVS Client (TortoiseCVS.)

I need:
    - File name
    - Dir name
    - Module
    - Repository folder
    - Login
    - Operation (commit, checkout, diff, ...)

I've changed the c functions "dirswitch()" and "do_cvs_command()" so I can
record the module name and the when the command is going to be executed I
trigger a PERL script that reads the environment variables and does de
validation I need. If the user has permissions the script returns 0, else
returns an error number. With that number the CVS prints an error message
(the TortoiseCVS catches it from CVS stdout, but doesn't recognize it) and
then do an exit(0) to stop the command.

My main problem is that the "do_cvs_command" is not executed by a diff (and
other) operation.
 Is there a perfect spot that is executed in every cvs command and where the
needed information is always present so I can be validated and then stop the
command execution? If not where can I do it to each group of commands?


Thanx,
Luís Cordeiro







reply via email to

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