-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I did not get a response to my Mail::SpamAssassin::AuthCourier posting whereby I raised a concern about the lack of UID information being returned from authdaemond for getpwnam-based authentications.
Upon closer inspection, the reason for this appears to be that authinfo->sysuserid is deliberately left unset.
While this is not an issue for Courier per se, the implicitness of the UID setting in later processing means authdaemond is not terribly usable in non-Courier contexts such as here where SpamAssassin is retrieving virtual account information.
The following patches ensure that the UID field is primed for *all* authentication mechanisms.
Can these please be applied for the next release of Courier.
Cheers, Alan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.3.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org Comment:
iD8DBQE/6N/RCfroLk4EZpkRAiOqAKCujOLXv8bTsHLnnvPQ6IEi+fcpxQCggMkc /fnDlJYHt+e2va/X7pJvsaM= =yoRX -----END PGP SIGNATURE-----
--- authpam.c.old Tue Dec 23 16:59:01 2003
+++ authpam.c Tue Dec 23 17:02:38 2003
@@ -144,7 +144,7 @@
if (ci->callback_func == 0)
authsuccess(a->homedir,
s,
- 0,
+ a->sysuserid,
&a->sysgroupid,
a->address,
a->fullname);
@@ -219,7 +219,7 @@
putenv("MAILDIR=");
authsuccess(a->homedir,
s,
- 0,
+ a->sysuserid,
&a->sysgroupid,
a->address,
a->fullname);
--- authpwd.c.old Tue Dec 23 18:07:25 2003
+++ authpwd.c Tue Dec 23 18:09:03 2003
@@ -47,7 +47,7 @@
}
if (i->callback_func == 0)
- authsuccess(a->homedir, i->userret, 0, &a->sysgroupid,
+ authsuccess(a->homedir, i->userret, a->sysuserid, &a->sysgroupid,
a->address, a->fullname);
else
{
--- authshadow.c.old Tue Dec 23 18:07:49 2003
+++ authshadow.c Tue Dec 23 18:08:48 2003
@@ -50,7 +50,7 @@
}
if (i->callback_func == 0)
- authsuccess(a->homedir, i->userret, 0, &a->sysgroupid,
+ authsuccess(a->homedir, i->userret, a->sysuserid, &a->sysgroupid,
a->address, a->fullname);
else
{
--- preauthpam.c.old Tue Dec 23 17:17:19 2003
+++ preauthpam.c Tue Dec 23 17:54:15 2003
@@ -39,6 +39,7 @@
}
auth.sysusername=userid;
+ auth.sysuserid = &pw->pw_uid;
auth.sysgroupid=pw->pw_gid;
auth.homedir=pw->pw_dir;
auth.address=userid;
--- preauthpwd.c.old Tue Dec 23 18:03:58 2003
+++ preauthpwd.c Tue Dec 23 18:04:37 2003
@@ -35,6 +35,7 @@
}
auth.sysusername=userid;
+ auth.sysuserid=&pw->pw_uid;
auth.sysgroupid=pw->pw_gid;
auth.homedir=pw->pw_dir;
auth.address=userid;
--- preauthshadow.c.old Wed Dec 24 00:19:20 2003
+++ preauthshadow.c Wed Dec 24 00:18:22 2003
@@ -40,6 +40,7 @@
}
auth.sysusername=userid;
+ auth.sysuserid=&pw->pw_uid;
auth.sysgroupid=pw->pw_gid;
auth.homedir=pw->pw_dir;
auth.address=userid;
