Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] qpsmtpd: problem finding modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
therealjrd
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 103

PostPosted: Mon Dec 17, 2018 12:17 am    Post subject: [SOLVED] qpsmtpd: problem finding modules Reply with quote

Hi all. I'm building up a new server using qpsmtpd.

Everything says it goes together ok, but when I start qpsmtpd, it fails. A bit of debugging with strace reveals that it's trying to load Net::IP.pm, and not finding it.

I see the following:

Code:

stat("lib/Net/IP.pmc", 0x7ffd016b7dd0)  = -1 EACCES (Permission denied)
stat("lib/Net/IP.pm", 0x7ffd016b7dd0)   = -1 EACCES (Permission denied)


followed by

Code:

eval Can't locate Net/IP.pm:   lib/Net/IP.pm: Permission denied at /usr/share/qpsmtpd/plugins/check_relay line 5.
BEGIN failed--compilation aborted at /usr/share/qpsmtpd/plugins/check_relay line 5.


There are other similar modules where it'll do the same two stats, but then continue looking in the rest of the search path, eventually finding them. In this case, it never searches the rest of the path.

Anybody seen a similar issue? Hints?

Thanks in advance.


Last edited by therealjrd on Tue Dec 18, 2018 11:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Mon Dec 17, 2018 12:24 am    Post subject: Reply with quote

Install dev-perl/Net-IP ?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
therealjrd
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 103

PostPosted: Mon Dec 17, 2018 12:29 am    Post subject: Reply with quote

Jaglover wrote:
Install dev-perl/Net-IP ?


Sorry, should have said at first: it's installed.

I can write a little standalone piece of perl which says use Net::IP and it works. This is something about qpsmtpd, I think.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Mon Dec 17, 2018 1:17 am    Post subject: Reply with quote

Well, then you should change permissions to make these accessible for user portage and file a bug. At least it is what it looks like based on information you provided.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13511

PostPosted: Mon Dec 17, 2018 1:27 am    Post subject: Reply with quote

What is the output of ls -ld on the affected files and every ancestor directory of those files?
Back to top
View user's profile Send private message
therealjrd
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 103

PostPosted: Tue Dec 18, 2018 11:12 am    Post subject: Reply with quote

Ok. I've done some more debugging.

There have been (at least) two things going on.

1. When I try strac'ing qpsmtpd by hand, it succeeds or fails depending on the directory I'm starting from. If I cd to /root, and run my strace, I get
Code:

stat("lib/Net/IP.pmc", 0x7ffc6068b820)  = -1 EACCES (Permission denied)
stat("lib/Net/IP.pm", 0x7ffc6068b820)   = -1 EACCES (Permission denied)

If I cd to /, or /tmp, or a few other places I tried, I get
Code:

stat("lib/Net/IP.pmc", 0x7ffe778814e0)  = -1 ENOENT (No such file or directory)
stat("lib/Net/IP.pm", 0x7ffe778814e0)   = -1 ENOENT (No such file or directory)

and the rest of the startup proceeds.

A little more debugging reveals that the permissions on /root are 0700. If I create /tmp/root, set it the same way, and cd there, I get the same failure.


2. stracing the start-stop-daemon part of the init script revealed that it was trying to create /run/qpsmtpd/qpsmtpd.pid, but /run/qpsmtpd doesn't exist. That turns out to be the real root cause of why the service wouldn't start. Creating /run/qpsmtpd makes it all happy.


So all the debugging around why it couldn't find lib/Net/IP.pm was due to a red herring; the permissions on the working dir cause perl to get different results (EACCES vs ENOENT) when searching. (though even that doesn't behave consistently, yet another red herring)

I'll see about getting a bug report filed with the qpsmtpd maintainers for the /run/qpsmtpd issue.

Thanks for the help and suggestions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum