10 messages in net.sourceforge.lists.courier-users[courier-users] Still getting incorre...
FromSent OnAttachments
Kris KelleyOct 16, 2000 8:32 am 
Kris KelleyOct 16, 2000 2:58 pm 
Kris KelleyOct 17, 2000 12:52 pm 
Kris KelleyOct 18, 2000 9:17 am 
Mike JacksonOct 18, 2000 10:10 am 
mml1...@jesus.cam.ac.ukOct 18, 2000 12:04 pm 
John HannaOct 18, 2000 2:02 pm 
Mike JacksonOct 19, 2000 4:36 am 
John HannaOct 19, 2000 9:32 am 
Matthew M LavyOct 19, 2000 10:09 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Still getting incorrect information from authcustomActions...
From:Kris Kelley (kkel@genericapp.com)
Date:Oct 16, 2000 8:32:19 am
List:net.sourceforge.lists.courier-users

I have downloaded and built the latest Courier IMAP package, 1.1.20001015. The problems that had been causing segmentation faults have been cleared up, and I appreciate Sam's effort on getting to that quickly.

I am still seeing strange behavior when using my version of authcustom, though. Here's a recap of what is happening:

In my do_auth_custom function, the code sets authinfo->sysusername and authinfo->address equal to userid, and then fills in information for authinfo->sysuserid, authinfo->sysgroupid, authinfo->homedir, and authinfo->clearpasswd. The remaining authinfo fields are not touched.

As far as I can tell, the fields are being filled in correctly. I inserted some debugging code that prints the contents of the six modified authinfo fields just before the function returns, and all the information is correct. I am using static character arrays for the password and home directory, and static uid_t and gid_t variables for the uid and gid. I have double-checked to make sure that authinfo->userid receives a pointer to the uid value, instead of the value itself.

When I configure and compile the code, running authtest with a user name and good password yields this:

# ./authtest -m authcustom user1 goodpass Authenticated: module authcustom Home directory: /usr/local/src/courier-imap-1.1.20001007/authlib UID/GID: 0/0 AUTHADDR=<none> AUTHFULLNAME=<none>

This is not the correct info; the maildir should be "/maildir/user1", and the UID/GID combination should be 500/500. Interestingly, the directory and UID/GID combination displayed reflect who is running authtest (root), and where from.

Running authtest with a user name and bad password does what it should:

# ./authtest -m authcustom user1 badpass Authentication FAILED!

Again, I am fairly certain that I am filling in the authinfo structure correctly, and that the information is being preserved after the function exits. Any ideas on what could be causing this, perhaps something else I have overlooked?