[cvsnt] Re: Do acls work together with the CVSROOT/group file in 2.0.58d or later?

Mike Wake mike.wake at thales-tts.com
Fri Jan 21 12:43:47 GMT 2005


Tony Hoyle wrote:
 > Mike Wake wrote:
 >
 >> tools_team: mwake bob jess
 >
 >
 > These should be comma separated (usernames can have spaces in them...)
The documentation here http://www.cvsnt.org/manual/Setting-up-groups.html
currently suggests
group1: user1 user2 user3
group2: me you dognamedblue
group3: peter paul mary

and looking in perms.cpp of v2.0.58d the names are parsed using
name = cvs_strtok(names, ", \t");
which i think suggests names can be separated by either ',' ' ' or '\t'.

I also think I have found a bug which is probably related to my 
Repository#Name usage.

I added a TRACE to the following bit of code in perms.cpp

     strcpy (filename, current_parsed_root->directory);
     strcat (filename, CVSROOTADM "/");
     strcat (filename, CVSROOTADM_GROUP);

     TRACE(3, "Attempt to open group file %s", filename)
     fp = CVS_FOPEN (filename, "r");

and when I tried to do a commit with -t -t -t I got the following

S-> Attempt to open group file /home/cvsuser/CVSREPOS/MyReposCVSROOT/group

ie There is a missing "/"

I fixed it by doing this
     strcpy (filename, current_parsed_root->directory);
     strcat (filename, "/" CVSROOTADM "/");
     strcat (filename, CVSROOTADM_GROUP);

Now my groups defined in CVSROOT/group are actually read
ie
S -> add_valid_group(Tools_team)   <= From CVSROOT/group
S -> add_valid_group(admin)        <= From CVSROOT/admin
S -> add_valid_group(CVS_Access)   <= From winbind

but I am still unable to commit to the file.

S -> ACL lookup on directory 
/home/cvsuser/CVSREPOS/MyRepos/MyRepos/tools/mytool
S -> verify_acl(write,HEAD,(null))
S -> matched ACL user=, branch=_default_, merge=
S -> calculated ACL priority is 0
S -> new max priority is 0
S -> verify_valid_name(tools_team)
S -> matched ACL user=tools_team, branch=_default_, merge=
S -> calculated ACL priority is 0
S -> matched ACL user=, branch=_default_, merge=
S -> calculated ACL priority is 0
S -> user_state = 0, group_state = -1
cvs server: User mwake is unable to write to . - ignoring

Any Ideas?

Cheers
Mikew



More information about the cvsnt mailing list