Andrey Aristarkhov wrote:

>>-----Original Message-----
>>From: Derek Robert Price [mailto:[EMAIL PROTECTED]]
>>    
>>
>>Yep, you're right.  Sorry about that.  I like your abstraction and I'm
>>tempted to say it should be in root.c or the like and extended for all
>>admin files (e.g. get_repository_admin_file(root, CVSROOTADM_PASSWD))
>>simply because all those sprintf("%s/%s/%s",...)'s that litter the
>>    
>>
>code
>  
>
>>look messy and don't necessarily remain portable across OSs, but I'm
>>hardly going to require that for acceptance of this patch.
>>    
>>
>I agree with you. I can write the function in root.c.
>  
>

If you like.  Maybe turn it into a separate patch.  Like I said, I won't 
require it for your first patch.

>My suggestion is place get_password(char * username, char *
>passpwd_file) as a common function and reuse it in user.c, login.c and
>server.c, since it has the same logic for .cvspass and CVSROOT/passwd.
>Function get_alias also could be placed in server.c and reused.
>  
>

I still think it should be modeled more after the getpwnam() type system 
passwd functions and return a pointer to a structure containing all the 
fields from the file so that the data can be cached and the passwd file 
won't need to be reaccessed for every field.

>>>The only thing I've taken from login.c
>>>is GETPASS macro definition. Suppose it should be placed in cvs.h
>>>      
>>>
>header file.
>  
>
>>I missed that GETPASS was from login.c.  `cvs.h' might be an
>>    
>>
>appropriate
>  
>
>>place.  Maybe a new `user.h' or `subr.h' would be more appropriate.
>>    
>>
>I think user.h is more suitable place.
>

Ok.

>I try to explain why I have done it in this way. User can work with
>repository in local and server mode. In a server mode there is no
>problem to detect current user name, but it's not possible in local mode
>- only the caller principal can be detected.
>  
>

Unless my grasp of NT terminology is worse than I think, under local 
mode on UNIX, the caller principal is assumed to be the user name.  Does 
something prevent that under NT?

Derek

-- 
                *8^)

Email: [EMAIL PROTECTED]

Get CVS support at http://ximbiot.com
--
If vegetarians eat vegetables, what do humanitarians eat?





_______________________________________________
Bug-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-cvs

Reply via email to