At 3:12 AM +0100 6/3/02, James Wilson wrote:

>  What I really need to know is: the routine which checks the user/pass
>  combination, and where it returns a result; the bit which sets up the
>  file to access, ie home dir + compile time switch, as I'd need to make
>  this login dependent; finally the bit which switches EUID in order to
>  become the mail owner, as I'd need to use my virtuser/pwd/realuser/inbox
>  lookup table to find this also. Only 3 routines ?!

popper/pop_pass.c checks user name and password, and a few other 
things. (popper/pop_apop.c does the same thing when using APOP). 
popper/genpath.c creates the path to the spool file.  There is a 
run-time option for home-dir-mail in p->pHome_dir_mail, set initally 
by popper/pop_init.c from any compile-time default, then set by 
popper/pop_config.c from any configuration file. 
popper/pop_dropcopy.c gives up root and sets the UID and GID.

Sounds to me like what you want is to have popper/pop_pass.c check a 
global file for the username (if no match is found in the system), 
and get the password, home-dir-mail string, and UID from there. 
You'd also need a way for individual users to add, create, and modify 
entries in this file.  The tricky part, it seems to me, is that this 
file needs to be global, because Qpopper can't know which directory 
to check.  For example, if someone enters 'usera', how would Qpopper 
know that this is a subuser of 'fred' and to check a file in 
'/home/fred/' for the password and home-dir-mail?  But if the file is 
global, then how do you keep users from clobbering each other's 
entries?  Maybe you want a prefix, so for example, someone logs in as 
'fred-usera' and then Qpopper can know to check a file in 
'/home/fred/users' for the 'usera' info.

Reply via email to