[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Re: Problem writing module



Wich app? PAM? Login? My module? My test app? :)
Thanks a lot for that test harness!!! I debugged with it and this is what I found out:

1: the tester request for a "login" service (and my module is loaded for that)
2: the tester calls pam_authenticate.
3: my module returns PAM_SUCCESS
4: the tester calls pam_acct_mgmt(pamh, 0) 
5: pam_permit.so handles that and returns PAM_SUCCESS
5: the tester calls pam_open_session(pamh, 0);
6: pam_unix responds to the call, and, on the line 98 of pam_unix_sess.c, it calls the this function on support.c:
	
_log_err(LOG_INFO, pamh, "session opened for user %s by %s(uid=%d)",
	 user_name, login_name, getuid());

/* values: user_name = "tbezerra", login_name = "", getuid() = 1022 (tbezerra's id) */
	
And there, at line 53 [syslog(err, format, args);], the tester halts!! No error, no nothing. Simply stops!
More ideas?? I'm really lost!!


-----Mensagem original-----
De:   Max Campos <lists bridgeportsoftware com>
Enviada em: 21/01/2005 15:42:33
Para: Pluggable Authentication Modules <pam-list redhat com>
Assunto: Re: Problem writing module

It sounds like it might be the app.  At any rate, I personally use this 
test harness to get everything ironed out, _THEN_ I start testing with 
actual apps.  It makes it really easy to see what's going on.

http://www.zip.com.au/~dtucker/patches/#pamtest

This is a very hand gem!  (Thanks to Darren Tucker!)

- Max

On Jan 21, 2005, at 6:10 am, Thiago Silva wrote:

> Hello all.
> I'm currently developing a module for PAM and having some difficulties.
> First, the module is linked with the NSS lib (from mozilla). Trying it 
> on
> login, wverything runs well, pam_sm_authenticate() returns 
> PAM_SUCCESS, and
> there comes the problem. The login locks for some time, and then, 
> prints a
> message of time out, showing the login prompt again. I have no idea 
> why is
> this happening. I've tried to substitude the module's code for the
> pam_permit.c code, wich gave me another error: "Login incorrect" (the
> pam_sm_authenticate wasn't called and I assume that was because the 
> little
> code was linked to the NSS lib and something went wrong when loading 
> the
> module)...Does anyone know this behaviour or can help me debugging?? I 
> have
> no idea how to debug the login...
>
> Also, I did a little program that uses this module, and, 
> pam_authenticate()
> returns PAM_SUCCESS, and then, the shell is available again. So, 
> nothing
> strange here. Only when using it with login.

_______________________________________________
Pam-list mailing list
Pam-list redhat com
https://www.redhat.com/mailman/listinfo/pam-list

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]