[Openvas-devel] [openvas-Bugs][1501] openvas-nvt-sync wget or curl mode fails on relative mktemp paths

openvas-bugs@wald.intevation.org openvas-bugs at wald.intevation.org
Tue May 11 15:28:41 CEST 2010


Bugs item #1501, was opened at 2010-05-11 15:28
Status: Open
Priority: 3
Submitted By: Harald Freyer (hfreyer)
Assigned to: Nobody (None)
Summary: openvas-nvt-sync wget or curl mode fails on relative mktemp paths 
Architecture: None
Resolution: None
Severity: None
Version: v3.0.2
Component: openvas-scanner
Operating System: Linux
Product: OpenVAS
Hardware: None
URL: 


Initial Comment:
mktemp may return a relative path (normally
simply to the subdirectory openvas-nvt-sync
in the current directory where it is called).
In this case wget or curl mode fail, because
tar xvjf is called in plugins directory and
cannot find the downloaded tarball.
Furthermore the temporary directory is not
erased by the trap.

Suggestion (which works on my side):
No change of directory (cd "$NVT_DIR")
but use -C option of tar and get stdin
(tar xvjf - -C "$NVT_DIR" < $TMP_NVT)

Attached proposal, which contains modified code
only for the wget branch (curl branch is unmodified)
and which also has additional code for erasing the 
temporary directory if it has been created by mktemp
(otherwise mktemp will fail next time with "File exists").



----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=220&aid=1501&group_id=29


More information about the Openvas-devel mailing list