Bug 254633 - security/gvmd: Set PATH prior to startup
Summary: security/gvmd: Set PATH prior to startup
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
Depends on:
Reported: 2021-03-28 20:58 UTC by Eirik Oeverby
Modified: 2021-06-28 12:30 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (acm)

Patch for rc.d/gvmd (387 bytes, text/plain)
2021-03-28 20:58 UTC, Eirik Oeverby
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2021-03-28 20:58:06 UTC
Created attachment 223676 [details]
Patch for rc.d/gvmd

gvmd expects to find various binaries in PATH, so this should be set to include /usr/local/(bin|sbin) explicitly. If there's a better way to do this, feel free to substitute.
Comment 1 Jose Alonso Cardenas Marquez freebsd_committer 2021-04-16 17:21:31 UTC
What is the problem if PATH is not defined into rc script?. I think this change is not necessary. PATH is a environment variable and it should include those path by default
Comment 2 Eirik Oeverby 2021-04-16 17:23:57 UTC
(In reply to Jose Alonso Cardenas Marquez from comment #1)
/usr/local/bin and /usr/local/sbin are not in the default PATH. Various scripts and external commands run by gvm expects binaries to be in the path, so it has to be set before the daemons start.
Comment 3 Jose Alonso Cardenas Marquez freebsd_committer 2021-06-18 07:36:17 UTC
Hi, tell me if it is necessary on latest version of gvm. I found ospd_openvas needs it like you reported it in another PR but I don't found problems with gvmd
Comment 4 Eirik Oeverby 2021-06-22 13:48:08 UTC
If you try to download e.g. a PDF or TXT report from gsad, the file coming out is 0 bytes because of the missing PATH. Adding the export PATH... line to the rc script for gvmd, I believe) resolves this.
Comment 5 Jose Alonso Cardenas Marquez freebsd_committer 2021-06-28 02:33:14 UTC
(In reply to Eirik Oeverby from comment #4)

I think this issue is related a missing texlive-texmf installation in your system. I have downloaded pdf reports without problems
Comment 6 Eirik Oeverby 2021-06-28 12:30:52 UTC
(In reply to Jose Alonso Cardenas Marquez from comment #5)
No - this is installed. The *only* difference between working and non-working PDF (and some other) report downloads is whether PATH is set in the rc script.

Note I use the 'service' command which clears the envionment; if you invoke the rc script directly it will inherit the PATH you have in your shell.