Giter Site home page Giter Site logo

node-authenticate-pam's Introduction

node-authenticate-pam

Asynchronous PAM authentication for NodeJS

You will most likely need to run it as root in most common environments! Running as non-root on my system (openSUSE 12.1) made a segfault happen somewhere in libpam! - but seems ok on on openSUSE Leap 42.2

It tries to superseed the previous and outdated node-pam extension with the following improvements:

  • Allows to provide own service name, for example common-auth or any custom service name defined in /etc/pam.d
  • Allows to provide PAM_RHOST via 'remoteHost' option. It is used to provide remote network authentication that will skip any local only authentication methods like for example fingerprint reading.
  • Already mentioned utilization of libuv and node-gyp
  • Proper type checking in C++ code, it throws exception if bad types are given
  • In case of error it passes the error string containing both pam function and pam_strerror() results

Example

Simple usage

Default service_name for pam_start(2) is 'login'.

var pam = require('authenticate-pam');
pam.authenticate('myusername', 'mysecretpassword', function(err) {
    if(err) {
      console.log(err);
    }
    else {
      console.log("Authenticated!");
    }
  });

Usage with options:

Proper apps should provide their own service name. Sample services are located in /etc/pam.d. As an example lookup a service name file for sshd. To do proper network authentication you should also provide remoteHost key to the options argument. It will be passed to pam as PAM_RHOST (pam_set_item(2))

var pam = require('authenticate-pam');
pam.authenticate('rush', 'mysecretpassword', function(err) {
    if(err) {
      console.log(err);
    }
    else {
      console.log("Authenticated!");
    }
}, {serviceName: 'myapp', remoteHost: 'localhost'});

Install

First you need install the development version of PAM libraries for your distro.

Centos and RHEL: yum install pam-devel

Debian/Ubuntu: apt-get install libpam0g-dev

debian6/maverick/natty: apt-get install libreadline5-dev

oneiric (and any newer, eg. Debian 7 or Ubuntu 12.04): apt-get install libreadline-gplv2-dev

Then you can install the module: npm install authenticate-pam

node-authenticate-pam's People

Contributors

artynet avatar evan-a-a avatar jcheng5 avatar raisinbread42 avatar rush avatar srossross avatar thedillonb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-authenticate-pam's Issues

Installing failed

> [email protected] postinstall /opt/os.js/node_modules/node-sass
> node scripts/build.js

Binary found at /opt/os.js/node_modules/node-sass/vendor/linux-x64-67/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1178 packages from 594 contributors and audited 18412 packages in 21.044s
found 0 vulnerabilities


> [email protected] install /opt/os.js/node_modules/abstract-socket
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:395:11)
gyp ERR! stack     at Socket.emit (events.js:182:13)
gyp ERR! stack     at Pipe._handle.close (net.js:616:12)
gyp ERR! System Linux 4.19.4-arch1-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/os.js/node_modules/abstract-socket
gyp ERR! node -v v11.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> [email protected] install /opt/os.js/node_modules/authenticate-pam
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Linux 4.19.4-arch1-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/os.js/node_modules/authenticate-pam
gyp ERR! node -v v11.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/abstract-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-09T00_56_54_260Z-debug.log

Issue installing with 0.10.25 under nvm as root

Hi,

First of all, thanks for a great product. I installed and have been using it with 0.10.25 (nvm based environment) under my normal logged-in user with great success. Now I would like to use it the same way, but running under root. However, when I try to install I get the following error:

root@ubuntu:~# npm install authenticate-pam
npm http GET https://registry.npmjs.org/authenticate-pam
npm http 304 https://registry.npmjs.org/authenticate-pam

[email protected] preinstall /root/node_modules/authenticate-pam
node-gyp configure && node-gyp build

sh: 1: node-gyp: Permission denied

[email protected] preuninstall /root/node_modules/authenticate-pam
rm -rf build/*

npm ERR! [email protected] preinstall: node-gyp configure && node-gyp build
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the authenticate-pam package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR! npm owner ls authenticate-pam
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-43-generic
npm ERR! command "/root/.nvm/v0.10.25/bin/node" "/root/.nvm/v0.10.25/bin/npm" "install" "authenticate-pam"
npm ERR! cwd /root
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0

Here's the part of the npm-debug.log that I think the problem may be occurring in:

66 info preinstall [email protected]
67 verbose unsafe-perm in lifecycle false
68 info [email protected] Failed to exec preinstall script
69 info /root/node_modules/authenticate-pam unbuild
70 info preuninstall [email protected]
71 verbose unsafe-perm in lifecycle false
72 info uninstall [email protected]
73 verbose true,/root/node_modules,/root/node_modules unbuild [email protected]
74 info postuninstall [email protected]
75 error [email protected] preinstall: node-gyp configure && node-gyp build
75 error Exit status 127
76 error Failed at the [email protected] preinstall script.

Any ideas? Did I do something wrong or stupid? Thanks very much for any light you can shed...

Cannot install

-> % npm --version
1.4.28

-> % node --version
v0.10.33

-> % npm install authenticate-pam
/
> [email protected] preinstall /Users/bschmeisser/sites/devup/apps/web-terminal/node_modules/authenticate-pam
> node-gyp configure && node-gyp build


module.js:340
    throw err;
          ^
Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at [eval]:1:1
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:536:25)
    at startup (node.js:80:7)
    at node.js:906:3
gyp: Call to 'node -e "require('nan')"' returned exit status 8. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure"
gyp ERR! cwd /Users/bschmeisser/sites/devup/apps/web-terminal/node_modules/authenticate-pam
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

> [email protected] preuninstall /Users/bschmeisser/sites/devup/apps/web-terminal/node_modules/authenticate-pam
> rm -rf build/*

NaN build issue

I'm getting the following error when npm installing the git version of node-authenticate-pam on node v0.10.28

> [email protected] preinstall /home/hacklab/tegh-daemon/node_modules/authenticate-pam
> node-gyp configure && node-gyp build

make: Entering directory '/home/hacklab/tegh-daemon/node_modules/authenticate-pam/build'
  CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o
../authenticate_pam.cc: In function ‘void after_doing_auth(uv_work_t*, int)’:
../authenticate_pam.cc:108:34: error: ‘NanPersistentToLocal’ was not declared in this scope
  NanPersistentToLocal(m->callback)->Call(Context::GetCurrent()->Global(), 1, args);
                                  ^
../authenticate_pam.cc: In function ‘v8::Handle<v8::Value> Authenticate(const v8::Arguments&)’:
../authenticate_pam.cc:161:30: error: expected primary-expression before ‘,’ token
  NanAssignPersistent(Function, m->callback, callback);
                              ^
authenticate_pam.target.mk:82: recipe for target 'Release/obj.target/authenticate_pam/authenticate_pam.o' failed
make: *** [Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1
make: Leaving directory '/home/hacklab/tegh-daemon/node_modules/authenticate-pam/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.6.11-11-ARCH+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/hacklab/tegh-daemon/node_modules/authenticate-pam
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok

Build Errors on Ubuntu 12.04

I'm using Node v0.8.16 on a fresh install of Ubuntu Server 12.04. I installed (build-essential python-software-properties python-pycurl libpam0g-dev). Am I missing any required packages?

stdissue@web:~$ npm install authenticate-pam
npm http GET https://registry.npmjs.org/authenticate-pam
npm http 200 https://registry.npmjs.org/authenticate-pam
npm http GET https://registry.npmjs.org/authenticate-pam/-/authenticate-pam-0.1.1.tgz
npm http 200 https://registry.npmjs.org/authenticate-pam/-/authenticate-pam-0.1.1.tgz

[email protected] preinstall /home/stdissue/node_modules/authenticate-pam
node-gyp configure && node-gyp build

gyp http GET http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
make: Entering directory /home/stdissue/node_modules/authenticate-pam/build' CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o ../authenticate_pam.cc:23:0: warning: "BUILDING_NODE_EXTENSION" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition ../authenticate_pam.cc:48:2: error: ‘string’ in namespace ‘std’ does not name a type ../authenticate_pam.cc: In function ‘void doing_auth_thread(uv_work_t*)’: ../authenticate_pam.cc:78:2: error: ‘struct auth_context’ has no member named ‘errorString’ ../authenticate_pam.cc:78:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:78:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:78:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:78:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:82:3: error: ‘struct auth_context’ has no member named ‘errorString’ ../authenticate_pam.cc:82:3: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:82:3: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:82:3: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:82:3: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:85:2: error: ‘struct auth_context’ has no member named ‘errorString’ ../authenticate_pam.cc:85:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:85:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:85:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:85:2: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc:89:9: error: ‘struct auth_context’ has no member named ‘errorString’ ../authenticate_pam.cc:89:37: error: ‘string’ is not a member of ‘std’ ../authenticate_pam.cc: In function ‘void after_doing_auth(uv_work_t*)’: ../authenticate_pam.cc:105:28: error: ‘struct auth_context’ has no member named ‘errorString’ make: *** [Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1 make: Leaving directory/home/stdissue/node_modules/authenticate-pam/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/nodejs/npm/node_modules/node-gyp/lib/build.js:232:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 3.2.0-23-generic
gyp ERR! command "node" "/usr/lib/nodejs/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/stdissue/node_modules/authenticate-pam
gyp ERR! node -v v0.8.16
gyp ERR! node-gyp -v v0.8.1
gyp ERR! not ok

thanks for publishing

Any chance you could elaborate on how to integrate this? I'm a little new to PAM and a little fuzzy on context. Where should I put what files? how does this get referenced from PAM? Thank you kindly.

Cannot compile on Amazon Linux EC2 instance

This project is working great on my OSX and Ubuntu machines, but I can't get it to compile on an Amazon Linux (RHEL/CentOS-like) EC2 instance.

../authenticate_pam.cc: In function ‘void doing_auth_thread(uv_work_t*)’:
../authenticate_pam.cc:71: error: ‘strdup’ was not declared in this scope
../authenticate_pam.cc:76: error: ‘strlen’ was not declared in this scope

Does it need a #include <cstring> perhaps?

can't install

Hi,
i can't install authenticate-pam. It failes with the following log. node and nodejs are v12.22.1.

npm install authenticate-pam

> [email protected] install /opt/iobroker/node_modules/authenticate-pam
> node-gyp rebuild

make: Entering directory '/opt/iobroker/node_modules/authenticate-pam/build'
  CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o
../authenticate_pam.cc: In function ‘void after_doing_auth(uv_work_t*, int)’:
../authenticate_pam.cc:107:87: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(m->callback), 1, args);
                                                                                       ^
In file included from ../authenticate_pam.cc:23:
../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../authenticate_pam.cc:107:87: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(m->callback), 1, args);
                                                                                       ^
In file included from ../authenticate_pam.cc:23:
../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../authenticate_pam.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Authenticate(Nan::NAN_METHOD_ARGS_TYPE)’:
../authenticate_pam.cc:147:83: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   Local<Value> res = options->Get(Nan::New<String>("serviceName").ToLocalChecked());
                                                                                   ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8-internal.h:14,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:27,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:3553:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../authenticate_pam.cc:150:69: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
    serviceName->WriteUtf8(m->serviceName, sizeof(m->serviceName) - 1);
                                                                     ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc:152:69: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   res = options->Get(Nan::New<String>("remoteHost").ToLocalChecked());
                                                                     ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8-internal.h:14,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:27,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:3553:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../authenticate_pam.cc:155:66: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
    remoteHost->WriteUtf8(m->remoteHost, sizeof(m->remoteHost) - 1);
                                                                  ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc:160:58: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
  username->WriteUtf8(m->username, sizeof(m->username) - 1);
                                                          ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc:161:58: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
  password->WriteUtf8(m->password, sizeof(m->password) - 1);
                                                          ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc: At global scope:
../authenticate_pam.cc:170:11: error: variable or field ‘init’ declared void
 void init(Handle<Object> exports) {
           ^~~~~~
../authenticate_pam.cc:170:11: error: ‘Handle’ was not declared in this scope
../authenticate_pam.cc:170:11: note: suggested alternative: ‘rand_r’
 void init(Handle<Object> exports) {
           ^~~~~~
           rand_r
../authenticate_pam.cc:170:24: error: expected primary-expression before ‘>’ token
 void init(Handle<Object> exports) {
                        ^
../authenticate_pam.cc:170:26: error: ‘exports’ was not declared in this scope
 void init(Handle<Object> exports) {
                          ^~~~~~~
In file included from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
../authenticate_pam.cc:175:31: error: ‘init’ was not declared in this scope
 NODE_MODULE(authenticate_pam, init);
                               ^~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:736:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(authenticate_pam, init);
 ^~~~~~~~~~~
../authenticate_pam.cc:175:31: note: suggested alternative: ‘int’
 NODE_MODULE(authenticate_pam, init);
                               ^~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:736:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(authenticate_pam, init);
 ^~~~~~~~~~~
make: *** [authenticate_pam.target.mk:109: Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1
make: Leaving directory '/opt/iobroker/node_modules/authenticate-pam/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.10.17-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/iobroker/node_modules/authenticate-pam
gyp ERR! node -v v12.22.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN [email protected] requires a peer of [email protected] || 4.0.x || 4.1.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] || 4.0.x || 4.1.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/glob-watcher/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/osx-temperature-sensor):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zigbee-herdsman-converters/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zigbee-herdsman-converters/node_modules/zigbee-herdsman/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zigbee-herdsman/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/iobroker/.npm/_logs/2021-05-17T18_37_57_857Z-debug.log

Can you help out?
Many thanks!

Install error

make: Wejście do katalogu '/home/panel/node_modules/authenticate-pam/build'
  CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o
In file included from ../authenticate_pam.cc:23:0:
../../nan/nan.h:324:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
   static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
                                               ^
authenticate_pam.target.mk:84: polecenia dla obiektu 'Release/obj.target/authenticate_pam/authenticate_pam.o' nie powiodły się
make: *** [Release/obj.target/authenticate_pam/authenticate_pam.o] Błąd 1
make: Opuszczenie katalogu '/home/panel/node_modules/authenticate-pam/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/panel/node_modules/authenticate-pam
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the authenticate-pam package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls authenticate-pam
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "authenticate-pam"
npm ERR! cwd /home/panel
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/panel/npm-debug.log
npm ERR! not ok code 0

Failed to open /var/lib/samba/private/secrets.tdb

I get the above error everytime I login with an existing user, not with an invalid user.
Any Idea what is happening there and what part tries to access this file?

Ubuntu 14.04

Thanks in advance and BR

depreciated option --no-parrallel

Random depreciated option (also available in full color!):

@cant sudo npm install -G authenticate-pam

> [email protected] preinstall /home/cant/node_modules/authenticate-pam
> node-gyp configure && node-gyp build

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-37-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure"
gyp ERR! cwd /home/cant/node_modules/authenticate-pam
gyp ERR! node -v v0.10.34
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

npm ERR! [email protected] preinstall: `node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the authenticate-pam package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR!     npm owner ls authenticate-pam
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-G" "authenticate-pam"
npm ERR! cwd /home/cant
npm ERR! node -v v0.10.34
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE

> [email protected] preuninstall /home/cant/node_modules/authenticate-pam
> rm -rf build/*

npm ERR! not ok code 0

screenshot from 2015-03-15 06 29 54

Suddenly segfaulting, even as root

Hi,

I've been using authenticate-pam for pam authentication with express.js (node 0.10.28) for a few months now without problems, but out of the blue today I just found out it was suddenly segfaulting at every auth attempt, bringing the node app down.

The app itself hasn't (afaik) changed, so I'd guess something must have changed on the server (no idea what, nothing should have changed). Any suggestion about how could I go about debugging this module to find out why it's segfaulting?

The documentation clearly reads that it might segfault when running as non-root, but the issue also happens with the root user.

Regards.

Authenticate callback never called

I finally was able to track down a reproducible scenario for #12 which produced a segfault. Thankfully, on a recent version of authenticate-pam we no longer get a segfault, but we still have a problem in that the inner callback for the authenticate call never gets handled.

I setup a reproducible vagrant environment that demonstrates this failure here: https://gist.github.com/trestletech/43f4a1008a25831a9eeb7eae64628b09 . I apologize that it's fairly heavy (requires a CentOS 7 box and a Ubuntu OpenLDAP box). So there's a bit to download, but in terms of human time there should just be a handful of commands to run to recreate the environment and execute the sample script. See the README.md for specific instructions.

As you can see in the example, this is using an LDAP PAM module that defers the PAM auth to an external LDAP server. When using correct login credentials (john:johnldap) you see a message that you've successfully authenticated. However if you enter an invalid password (as is currently configured in index.js), the callback never gets evaluated. The current example uses pam_ldap, but we've seen similar failures when using pam_vas, and nss_ldap.

I think it's safe to close #12 -- some recent change resolved the segfault, but perhaps a similar issue is triggering this failure.

does not build

root@www:/# npm -g install authenticate-pam
npm http GET https://registry.npmjs.org/authenticate-pam
npm http 200 https://registry.npmjs.org/authenticate-pam
npm http GET https://registry.npmjs.org/authenticate-pam/-/authenticate-pam-0.1.
npm http 200 https://registry.npmjs.org/authenticate-pam/-/authenticate-pam-0.1.

[email protected] preinstall /usr/local/lib/node_modules/authenticate-pam
node-gyp configure && node-gyp build

path.js:313
throw new TypeError('Arguments to path.resolve must be strings');
^
TypeError: Arguments to path.resolve must be strings
at Object.exports.resolve (path.js:313:15)
at new Gyp (/usr/share/node-gyp/lib/node-gyp.js:49:22)
at gyp (/usr/share/node-gyp/lib/node-gyp.js:39:10)
at Object. (/usr/share/node-gyp/bin/node-gyp.js:20:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

[email protected] preuninstall /usr/local/lib/node_modules/authenticate-p
rm -rf build/*

npm ERR! [email protected] preinstall: node-gyp configure && node-gyp buil npm ERR!sh "-c" "node-gyp configure && node-gyp build"` failed with 8
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the authenticate-pam package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR! npm owner ls authenticate-pam
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.9-1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "-g" "install" "authenticate-p
npm ERR! cwd /
npm ERR! node -v v0.10.11
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0

Configure error: spawn ENOENT

I'm not sure how to debug this error. Have you seen this before?

+ npm install authenticate-pam
npm WARN package.json [email protected] No repository field.
-
> [email protected] preinstall /Users/sean/Documents/workspace/wnext/node_modules/authenticate-pam
> node-gyp configure && node-gyp build

gyp ERR! configure error 
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:1011:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:802:34)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/Users/sean/anaconda/envs/_build/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure"
gyp ERR! cwd /Users/sean/Documents/workspace/wnext/node_modules/authenticate-pam
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

npm ERR! [email protected] preinstall: `node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the authenticate-pam package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure && node-gyp build
npm ERR! You can get their info via:
npm ERR!     npm owner ls authenticate-pam
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "/Users/sean/anaconda/envs/_build/bin/node" "/Users/sean/anaconda/envs/_build/bin/npm" "install" "authenticate-pam"
npm ERR! cwd /Users/sean/Documents/workspace/wnext
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE

Add SECURITY.md

Hey there!

I belong to an open source security research community, and a member (@ysf) has found an issue, but doesn’t know the best way to disclose it.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

webpack support

Hi,
because webpack by default only loads js and json files i get this error:

ERROR in ./node_modules/authenticate-pam/build/Release/authenticate_pam.node 1:0
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

Is there a loader that would make it work?
Or is it maybe possibile to have a index.js wrapper file to pass to webpack that load the binary?

Thanks,

Module did not self-register

I wasn't having luck installing via npm so I cloned and manually built. node-gyp builds without errors, but when I run the test script an error is throw. I'm on CentOS release 6.7

$ node --version
v0.12.7
$ npm --version
2.11.3
$node-gyp --version
v2.0.2
$ node test.js
module.js:355
  Module._extensions[extension](this, filename);
                               ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/opt/node-authenticate-pam/test.js:2:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

Running as non-root crash

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

Does not build with node 0.11.12

> [email protected] preinstall /var/webide/node_modules/authenticate-pam
> node-gyp configure && node-gyp build

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/webide/node_modules/authenticate-pam/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/vagrant/.node-gyp/0.11.12/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/vagrant/.node-gyp/0.11.12',
gyp info spawn args   '-Dmodule_root_dir=/var/webide/node_modules/authenticate-pam',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/var/webide/node_modules/authenticate-pam/build'
  CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o
../authenticate_pam.cc:23:0: warning: "BUILDING_NODE_EXTENSION" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from /home/vagrant/.node-gyp/0.11.12/src/node.h:61:0,
                 from ../authenticate_pam.cc:24:
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h: In function ‘void after_doing_auth(uv_work_t*, int)’:
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
../authenticate_pam.cc:99:14: error: within this context
../authenticate_pam.cc:109:13: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >’
../authenticate_pam.cc: At global scope:
../authenticate_pam.cc:119:34: error: ‘Arguments’ does not name a type
../authenticate_pam.cc:119:45: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
In file included from /home/vagrant/.node-gyp/0.11.12/src/node.h:61:0,
                 from ../authenticate_pam.cc:24:
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> Authenticate(const int&)’:
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
../authenticate_pam.cc:120:14: error: within this context
../authenticate_pam.cc:122:10: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
../authenticate_pam.cc:127:33: error: invalid types ‘const int[int]’ for array subscript
../authenticate_pam.cc:128:33: error: invalid types ‘const int[int]’ for array subscript
../authenticate_pam.cc:133:33: error: invalid types ‘const int[int]’ for array subscript
../authenticate_pam.cc:148:10: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
../authenticate_pam.cc:148:34: error: invalid types ‘const int[int]’ for array subscript
../authenticate_pam.cc:149:51: error: invalid types ‘const int[int]’ for array subscript
../authenticate_pam.cc:161:50: error: no matching function for call to ‘v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >::New(v8::Local<v8::Function>&)’
../authenticate_pam.cc:161:50: note: candidate is:
In file included from /home/vagrant/.node-gyp/0.11.12/src/node.h:61:0,
                 from ../authenticate_pam.cc:24:
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h:5591:4: note: static T* v8::Persistent<T, M>::New(v8::Isolate*, T*) [with T = v8::Function; M = v8::NonCopyablePersistentTraits<v8::Function>]
/home/vagrant/.node-gyp/0.11.12/deps/v8/include/v8.h:5591:4: note:   candidate expects 2 arguments, 1 provided
../authenticate_pam.cc: In function ‘void init(v8::Handle<v8::Object>)’:
../authenticate_pam.cc:174:2: error: ‘SetMethod’ is not a member of ‘node’
make: *** [Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1
make: Leaving directory `/var/webide/node_modules/authenticate-pam/build'

Segmentation Fault with soon to expire password

Using pam with kerberos (krb5) to authenticate on Windows domain. When password is close to expiration date (on Windows it says your password will expire in x days), pam crashes with segmentation fault. I believe it may be do to how conversation callback is being handled. Maybe pam tries to free pointer that was never malloc'd?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.