开发者

How are variables passed through the PAM authentication system

开发者 https://www.devze.com 2023-03-13 19:06 出处:网络
If application A calls a PAM service \"myapp\", and the PAM service \"myapp\" is c开发者_StackOverflow中文版onfigured to use the pam module pam_exec.so (auth required pam_exec.so myscript) to call an

If application A calls a PAM service "myapp", and the PAM service "myapp" is c开发者_StackOverflow中文版onfigured to use the pam module pam_exec.so (auth required pam_exec.so myscript) to call an external shell script:

Q: How are the variables (in particular username/password) passed from:

Application A --> PAM Service "myapp" --> pam_exec.so --> myscript


The answer, so it appears, is that it depends on the module being used.

pam_exec.so writes a number of variables (as per the man page) to the environment of the shell script, excluding the password. If the password is wanted then you should include the argument expose_authtok and it will then be written to STDIN followed by and marker.

0

精彩评论

暂无评论...
验证码 换一张
取 消