robinduckett / pam-face-authentication

Automatically exported from code.google.com/p/pam-face-authentication
0 stars 0 forks source link

Verification fail on hostname!=localhost #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
on my system calling:
pam_get_item(pamh, PAM_RHOST, (const void**)&host);
sets host to "utente-laptop", and the consequent check:
if(host != NULL && host != "localhost") return retval;
returns to the subsequent pam authentication module.

Attached a patch which adds a inequality check for host to the value returned 
by gethostname() (in linu that's ok, i think.. i don't know what this project 
compatibility goals are)

Original issue reported on code.google.com by dario.za...@gmail.com on 19 Oct 2010 at 9:10

Attachments:

GoogleCodeExporter commented 8 years ago
Ok, thanks for the contribution. 

Nevertheless, your patch isn't really flawless. On the one hand you tried to 
delete a char pointer after the return statement (which then is not executed at 
all) and on the other hand "new char[50]" would require delete[] instead of 
delete...

Anyway, I hope it works right now... :-)

Original comment by feichtne...@gmail.com on 19 Oct 2010 at 12:33

GoogleCodeExporter commented 8 years ago
:) Sorry 'bout the lost bytes :D
I lost some time trying to find why the plugin was not working, and then I 
coded a too hastly patch!

It works perfectly, thank you

Original comment by dario.za...@gmail.com on 19 Oct 2010 at 1:59

GoogleCodeExporter commented 8 years ago

Original comment by feichtne...@gmail.com on 19 Oct 2010 at 3:56