node-authenticate-pam icon indicating copy to clipboard operation
node-authenticate-pam copied to clipboard

Running as non-root crash

Open jvanz opened this issue 8 years ago • 5 comments

Hi

I know issue about crash when run as non root users is known. But do you have any clue where it happen in libpam? I'm facing the same issue and I willing to fix it, if the issue in libpam is not already fixed.

Thanks

jvanz avatar Apr 27 '17 12:04 jvanz

By the way, when I call the authenticate-pam with a non-root user the error is not a segfault, it's a double free:

> pam.authenticate("admin","admin", function(err,value) {console.dir(arguments,{colors:true, depth:null});}, {"remoteHost": "127.0.0.1", "timeout": 600});
undefined
> *** Error in `node': double free or corruption (fasttop): 0x00007ff47400a7a0 ***

jvanz avatar Apr 27 '17 12:04 jvanz

I recall tracing it in the past with valgrind and it was somewhere in libpam. If it is a problem with node-authenticate-pam after all then please submit a PR.

Rush avatar Apr 27 '17 16:04 Rush

btw. I just tested on openSUSE Leap 42.2 and it works properly on non-root.

Rush avatar Apr 27 '17 16:04 Rush

Nice, I'll do that. May you tell me the libpam's version? Do you remember if the issue was in pam_unix?

jvanz avatar Apr 28 '17 11:04 jvanz

My package manager is reporting 1.3.0-1.9. Unfortunately I cannot recall but pam_unix sounds familiar.

Rush avatar Apr 28 '17 14:04 Rush