pam_appl.h and pam_misc.h missing, in rshd.c source code
Asked Answered
N

4

15

I am working on a centOS 5.5 OS.

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

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.

Error:-

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

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

Some links are here. But not suitable for centOS.

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

Edit no 1

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

When I run

./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

Edit No. 2

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

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
Nerveracking answered 25/3, 2013 at 12:21 Comment(7)
Why do you think that these headers should exist? What are you trying to do?Hypocoristic
rsh is not open and read pam modules and limits.conf. When I make strace of command rrsh localhost ulimit -n. It does not show any pam module file in open system call. It throws 1024, but it is expected to throw 13000 as /etc/security/limits.conf contains 13000. That's why I want to debug my code, and try to add these libraries. I think, now you understand why I need these.Nerveracking
On your platform, if you search from root can you find those files? Is the path correct? (stdinclude/security/xxx.h)Function
stdinclude is not present.Nerveracking
@Function Please solve this problem. I tried a lot but I am unable to load PAM in my function. Please see another question , unix.stackexchange.com/questions/71783/…Nerveracking
@Hypocoristic Please solve this problem. I tried a lot but I am unable to load PAM in my function. Please see another question unix.stackexchange.com/questions/71783/…Nerveracking
For those who got here by searching but are using Ubuntu: the package is libpam0g-dev.Tampere
F
20

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

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"

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.

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

Function answered 9/4, 2013 at 12:24 Comment(4)
I found the libraries. Thanks. :) But my main problem is still there. Can we discuss via chat, please. I want to solve that.Nerveracking
@Nerveracking - fire off some thoughts here, I'll open a room when I get back and we can talk. I have to go out for a few hours. Let me know what issues you have and I'll see if we can resolve them. Glad we found the filesFunction
And for Debian and derivatives, that would be sudo apt-get install libpam0g-devLenticular
All the links are now 404Diocletian
C
25

if someone is looking for debian/ubuntu, try this sudo apt-get install libpam0g-dev

Coffin answered 15/8, 2017 at 5:51 Comment(0)
F
20

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

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"

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.

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

Function answered 9/4, 2013 at 12:24 Comment(4)
I found the libraries. Thanks. :) But my main problem is still there. Can we discuss via chat, please. I want to solve that.Nerveracking
@Nerveracking - fire off some thoughts here, I'll open a room when I get back and we can talk. I have to go out for a few hours. Let me know what issues you have and I'll see if we can resolve them. Glad we found the filesFunction
And for Debian and derivatives, that would be sudo apt-get install libpam0g-devLenticular
All the links are now 404Diocletian
X
3

You need the rpm for pam-devel, available for CentOS here. Alternatively, you can download pam from here and install it locally.

Edit: To compile it, this works fine on my system:

wget http://linux-pam.org/library/Linux-PAM-1.1.6.tar.bz2
tar xvjf Linux-PAM-1.1.6.tar.bz2
cd Linux-PAM-1.1.6/
./configure --prefix=$HOME/local
make && make install

If it does not, please report the compiler errors.

Xmas answered 25/3, 2013 at 15:8 Comment(3)
Please check Edit no. 1, it shows the problem occurs during following your instructions.Nerveracking
First of all sorry for late reply. I fllowed your given instructed commands but it shows error while executing last command. See those error in Edit no. 2. Please.Nerveracking
search and install a package containing selinux-devel or selinux-dev in the name. Alternatively add the flag --disable-selinux to ./configure, but that might have side effects.Xmas
O
1

For people who find this through the search engines, the following worked for me on CentOS 7:

yum install pam-devel
Oxtail answered 27/8, 2015 at 21:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.