ntirpc icon indicating copy to clipboard operation
ntirpc copied to clipboard

libnsl dependency

Open ptsneves opened this issue 2 years ago • 7 comments

Hello I am trying to build ntirpc without libnsl2 in linux (non BSD). The reason I would like it to be possible is because libnsl2 in turn depends on a RPC implementation thus creating a circular dependency. Do you know if it is possible to build ntirpc without libnsl2?

ptsneves avatar Aug 30 '22 19:08 ptsneves

I haven't tried running it, but it builds fine if you comment out the nsl bits in CMakeLists.txt

dang avatar Aug 31 '22 13:08 dang

So do you think the requirement is obsolete?

ptsneves avatar Aug 31 '22 17:08 ptsneves

I take it back, it built because I have libnsl installed. libnsl provides NIS/YP, and this is used in ntirpc in several places, so it is, indeed, necessary.

dang avatar Sep 01 '22 13:09 dang

Is there any way we can make libnsl optional for installations that don't use NIS/YP?

ffilz avatar Sep 01 '22 14:09 ffilz

I removed the libnsl detection from CMakesLists and i was able to build. I cross compiled as an easy way to make sure my machine did not contaminate the build.

I searched for inclusion of headers from libnsl and

git grep -l rpcsvc
cmake/modules/FindNSL.cmake
man/publickey.3t
src/getpublickey.c
src/getrpcent.c
src/netname.c
src/netnamer.c

But from my compilation log some of these files are not compiled and the ones that are already have a #ifdef YP. So i guess we can just add the #ifdef YP to the remaining files just in case they are built in a configuration i maybe missing.

ptsneves avatar Sep 05 '22 12:09 ptsneves

Patch submitted in pull request #255

ffilz avatar May 14 '24 20:05 ffilz

NIS(Network Information Service), which manages accounts for other Linux hosts. Originally, it was known as Sun Yellow Pages (abbreviated as yp). Nowadays, it has largely been replaced by LDAP and is not of much use anymore.

So, I'm wondering if there are still some scenarios where the NIS service is needed.

xiaods avatar Jun 14 '24 01:06 xiaods