rshd.c 源代码中缺少 pam_appl.h 和 pam_misc.h [英] pam_appl.h and pam_misc.h missing, in rshd.c source code

查看:9
本文介绍了rshd.c 源代码中缺少 pam_appl.h 和 pam_misc.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 centOS 5.5 操作系统.

显示/security/pam_appl.h 和/security/misc.h 文件丢失的错误.

It shows error that /security/pam_appl.h and /security/misc.h file is missing.

实际上我的 rshd.c 没有加载 PAM 模块,可能是通过放置这个库,它可以帮助我很好地工作我的 rshd.这就是我发布这个问题的原因.

Actually my rshd.c does not loads PAM module, may be by putting this libraries, it helps me to work my rshd fine. That's why I posted this question.

错误:-

rshd.c:90:31: error: security/pam_appl.h: No such file or directory
rshd.c:91:31: error: security/pam_misc.h: No such file or directory

我搜索了很多,但没有找到提供这些文件的任何有用的 rpm.

I search a lot but didn't get any useful rpm that gives these files.

一些链接在这里.但不适合centOS.

Some links are here. But not suitable for centOS.

帮帮我.告诉我如何克服这个问题.

Help me. Tell me how can I overcome from this problem.

编辑 1 号

您的第三个链接似乎很有用.当我尝试安装 pam-devel 时,它显示了一些错误.

Your third link seems useful. When I try to install pam-devel , it shows some error.

当我跑步时

./configure --prefix=/usr 
            --sysconfdir=/etc 
            --docdir=/usr/share/doc/Linux-PAM-1.1.6 
            --disable-nis &&
make

它会检查一些变量,然后生成目标文件,但最后会显示,

it checks for some variables , then it makes object file, but at the end it shows,

make[3]: *** [pam_xauth.lo] Error 1
make[3]: Leaving directory `~/Linux-PAM-1.1.6/modules/pam_xauth'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `~/Linux-PAM-1.1.6/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/Linux-PAM-1.1.6'
make: *** [all] Error 2

2号编辑

当我按照您的命令进行操作时,它在最后显示了以下错误.

As I followed your command, it shows me below error, at the end.

这个错误来了,当我运行 make &&进行安装

This error came, when I run make && make install

pam_xauth.c:64:27: error: selinux/label.h: No such file or directory
pam_xauth.c: In function âpam_sm_open_sessionâ:
pam_xauth.c:616: error: âSELABEL_CTX_FILEâ undeclared (first use in this function)
pam_xauth.c:616: error: (Each undeclared identifier is reported only once
pam_xauth.c:616: error: for each function it appears in.)
pam_xauth.c:616: warning: initialization makes pointer from integer without a cast
make[3]: *** [pam_xauth.lo] Error 1
make[3]: Leaving directory `/root/Linux-PAM-1.1.6/modules/pam_xauth'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/Linux-PAM-1.1.6/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Linux-PAM-1.1.6'
make: *** [all] Error 2

推荐答案

我目前没有 CentOS,但似乎这是一个常见问题.请参阅此处了解信息,建议您安装 pam-devel 这样您就没有通过以下方式从源代码构建:

I don't have CentOS at the moment, but it seems like this is a common problem. See here for information, it's suggested you install pam-devel so you don't have to build from source via:

yum install pam-devel

似乎每次我找到 网站a href="http://mailman2.u.washington.edu/pipermail/imap-uw/2009-December/002615.html">问题 与您的相同,解决方法是安装它.我现在正在下载 CentOS 5.5 来试一试,但是您是否只是尝试运行该命令?

Seems everytime I find a site where the problem is the same as yours the fix is to install this. I'm downloading CentOS 5.5 to give it a try now, but did you just try running that command?

如果您确实安装了它,但仍然找不到头文件,我会尝试一下:

If you did install that and it's still not finding the header files I'd give this a try:

cd /
sudo find . -name "pam_appl.h"
sudo find . -name "pam_misc.h"

可能它们已安装但没有进入您的标准包含路径,或者没有进入 security/ 目录,在这种情况下,您需要移动它们或更改标头包含在代码中的方式.

It's possible that they were installed and didn't go into your standard include path, or didn't go into the security/ directory, in which case you'll need to either move them or change the way the header is included in your code.

注意对于 sudo 命令,您必须输入密码.

Note for the sudo commands you'll have to enter your password.

这篇关于rshd.c 源代码中缺少 pam_appl.h 和 pam_misc.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆