info-cvs
[Top][All Lists]
Advanced

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

Re: problems using commitinfo


From: diego . andrade
Subject: Re: problems using commitinfo
Date: Tue, 19 Dec 2006 15:47:42 -0300 (BRT)
User-agent: SquirrelMail/1.4.4

Hi Mark,

 I used commitinfo scripts several times and I never had problems, no
matter what type of instalation I used. What you must attempt is the
return of your script, it must be 0 for sucess and 1 for fail. In your
case I did not understand what language you trying to use. Is it Shell
Script?

 As I understood you trying to use the groups of a user to make the
decision of permit him or not commit in the repository. I already make a
script like it using a LDAP database.

 What you must do is always send a exit code in your script like:

 permit = 1;

 for $i in `groups`
 do
  if ["groupaccess" = $i]
  then
    permit = 0
  fi
 done

 exit permit

 Sorry if it isn't right in the shell script language. I Actually use perl
to make my scripts.

 Hope it helps, if don't let me know.

 regards.

 Diego Andrade.
 Smart Tech Consulting.
 address@hidden



> Hi,
> I'm trying to set up a validation script using the commitinfo handler for
> cvs. However although my tests work for validating files,
> in situ it doesnt work as I have found that the temporary cvs file that is
> supposed to be written to the repository is not written.
> ( I found this out by inserting a system("/bin/sh") at suitable point in
> the
> script, and then looking at the filesystem ).
> My code always fails reporting a File not found error.
>
>
> ok, first thing that comes to mind is that its a permissions issue.
> However
> I seem to be in the right groups , and I am able to commit
> files to the repository otherwise when commitinfo has not been modified (
> i.e cvs process has write access to the repository ).
> The other thing that comes to mind is that it could be a config issue,
> since
> I am using a cvs instance recently set up by me , not the
> main development cvs that we use.
>
> Any help gratefully received.
>
>
> Mark
>
>
>
> here are some outputs that might be useful.
>
> xinet.d info
>
> service cvspserver2
> {
>   disable       = no
>   socket_type      = stream
>   wait             = no
>   user             = cvs
>   group            = cvs
>   log_type         = FILE /var/log/cvspserver2
>   protocol         = tcp
>   env              = '$HOME=/home/cvs'
> #  bind             = 10.10.10.10
> #  log_on_failure  += USERID
>   port             = 2402
>   server           = /usr/bin/cvs
>   server_args = -f --allow-root=/home/mswinson/cvs pserver
> }
>
> permissions on directory testsandbox
>
> drwxrwxr-x    3 mswinson mswinson     4096 Dec 19 13:00 .
> drwxrwxrwx    4 cvs      cvs          4096 Dec 14 12:00 ..
> -r--r--r--    1 mswinson mswinson     3809 Dec 14 16:09 devprocess.html,v
> drwxrwxr-x    2 mswinson mswinson     4096 Dec 19 13:00 dir
> -r--r--r--    1 mswinson mswinson     2092 Dec 14 16:09 emergency.html,v
> -r--r--r--    1 mswinson mswinson     2027 Dec 14 16:09
> emergency-invalid.html,v
> -r--r--r--    1 mswinson mswinson     6337 Dec 14 16:09 intro.html,v
> -r--r--r--    1 mswinson mswinson     1147 Dec 14 15:59 newfile,v
> -r--r--r--    1 mswinson mswinson     4841 Dec 14 16:09 projects.html,v
> -r--r--r--    1 mswinson mswinson      175 Dec 14 14:11 test2.txt,v
> -r--r--r--    1 mswinson mswinson      579 Dec 14 13:43 testfile.txt,v
> -r-xr-xr-x    1 mswinson mswinson    35212 Dec 14 16:09 trade.cgi,v
> -r-xr-xr-x    1 mswinson mswinson    35934 Dec 14 17:06
> trade-invalid.cgi,v
>
> groups
> mswinson cvs technical
>
>
>
> _______________________________________________
> info-cvs mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/info-cvs
>






reply via email to

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