1 |
|
2002-02-19 Sergey Poznyakoff <gray@Mirddin.farlep.net> |
2 |
|
|
3 |
|
Use of system getpwuid() in many places of the code |
4 |
|
actually broke mu_getpwnam() pardigm. To fix it, |
5 |
|
a wrapper function, mu_getpwuid(), is introduced. |
6 |
|
It allows to use 'overloaded' getpwuid calls. In the |
7 |
|
simplest case, it boils down to calling getpuid(). |
8 |
|
Applications, registering getpwname function by using |
9 |
|
mu_register_getpwname() are expected to register its |
10 |
|
getpwuid counterpart by using mu_register_getpwname(). |
11 |
|
"Virtual domains" (mutil.c:407) seem to be an exception: |
12 |
|
there is no easy way to create appropriate getpwuid() |
13 |
|
function. This does not break the virtual domain |
14 |
|
functionality, however. |
15 |
|
|
16 |
|
* mailbox/mutil.c (mu_getpwuid): new function. Allows |
17 |
|
to use overloaded getpwuid() in the same way as |
18 |
|
mu_getpwnam() does it for getpwnam(). |
19 |
|
(mu_register_getpwuid): Overload getpwuid function. |
20 |
|
* include/mailutils/mutil.h: Proto for mu_getpwuid(). |
21 |
|
* lib/mu_argp.c: New options: --sql-getpwuid for setting |
22 |
|
sql query returning passwd data for a given uid, and |
23 |
|
--pam-service for setting the PAM service name to be |
24 |
|
used. |
25 |
|
* lib/mu_argp.h: Added extern for pam_service. |
26 |
|
|
27 |
|
* MySql/MySql.c (getMpwnam): Return username along with |
28 |
|
other data. |
29 |
|
(getMpwuid): New function. |
30 |
|
* MySql/MySql.h: Added extern declaration for sql_getpwuid_query. |
31 |
|
* examples/mailutils.rc: Fixed queries. |
32 |
|
|
33 |
|
* mail.local/main.c: register getMpwuid(). |
34 |
|
* imap4d/imap4d.c: Initialize pam_service. Register getMpwuid(). |
35 |
|
* pop3d/pop3d.c: Likewise. |
36 |
|
* imap4d/login.c: Use pam_service instead of hardcoding PAM |
37 |
|
service name. |
38 |
|
* pop3d/user.c: Likewise. |
39 |
|
|
40 |
|
* imap4d/bye.c: Use mu_getpwuid() instead of getpwuid(). |
41 |
|
* imap4d/copy.c: Likewise. |
42 |
|
* imap4d/rename.c: Likewise. |
43 |
|
* imap4d/select.c: Likewise. |
44 |
|
* imap4d/status.c: Likewise. |
45 |
|
* mailbox/mbx_default.c: Likewise. |
46 |
|
* mailbox/message.c: Likewise. |
47 |
|
* mailbox/smtp.c: Likewise. |
48 |
|
* mailbox/wicket.c: Likewise. |
49 |
|
* mailbox2/mutil.c: Likewise. |
50 |
|
|
51 |
2002-02-19 Sergey Poznyakoff |
2002-02-19 Sergey Poznyakoff |
52 |
|
|
53 |
* lib/mu_argp.c (mu_create_argcv): Fixed memory overrun. |
* lib/mu_argp.c (mu_create_argcv): Fixed memory overrun. |