pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/46954: amanda-client from 2012Q2 runtar command does not close pipe from popen()

>Number:         46954
>Category:       pkg
>Synopsis:       amanda-client from 2012Q2 runtar command does not close pipe 
>from popen()
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 14 08:10:00 +0000 2012
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 5.1.2 pkgsrc 2012Q2
Dr. Nagler & Company GmbH
System: NetBSD test-s0 4.0 NetBSD 4.0 (NSW-WS) #0: Tue Aug 17 17:28:09 CEST 
2010 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
        The runtar command tries to get the version from the gnutar installed 
and uses popen()
        to get it. After the input is read by fgets(), the FILE* is not closed 
by pclose()
        as it should be, resulting a a zomby process and open file descriptor 
until the
        process exits later.
        Found by a look into the sources and the ps-listing
        The following patch will solve this problem:
--- runtar.c    2007-05-04 13:39:05.000000000 +0200
+++ runtar.c-fixed      2012-09-14 10:08:18.000000000 +0200
@@ -98,6 +98,7 @@
                    dbprintf((GNUTAR " version: Read failure; EOF\n"));
+         pclose(version_file);
        } else {
            dbprintf((GNUTAR " version: unavailable: %s\n", strerror(errno)));


Home | Main Index | Thread Index | Old Index