Mailinglist Archive: zypp-commit (325 mails)

< Previous Next >
[zypp-commit] r7305 - in /trunk/zypper: package/zypper.changes src/zypp-checkpatches-wrapper.c
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 19 Sep 2007 07:32:30 -0000
  • Message-id: <20070919073230.3B8761759E@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Sep 19 09:32:29 2007
New Revision: 7305

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7305&view=rev
Log:
- close file-descriptors > 2 in zypp-checkpatches-wrapper (bug #325556)

Modified:
    trunk/zypper/package/zypper.changes
    trunk/zypper/src/zypp-checkpatches-wrapper.c

Modified: trunk/zypper/package/zypper.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/package/zypper.changes?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- trunk/zypper/package/zypper.changes (original)
+++ trunk/zypper/package/zypper.changes Wed Sep 19 09:32:29 2007
@@ -1,14 +1,8 @@
 -------------------------------------------------------------------
-Wed Sep 19 09:25:49 CEST 2007 - tgoettlicher@xxxxxxx
+Wed Sep 19 09:33:25 CEST 2007 - aschnell@xxxxxxx
 
-- undo last change (bacause Arvin was faster and has already fixed the bug)
-- r7303 
-
--------------------------------------------------------------------
-Wed Sep 19 09:14:56 CEST 2007 - tgoettlicher@xxxxxxx
-
-- zypp-checkpatches-wrapper checks if stdout/stderr file descriptors are openl
-- r7301
+- close file-descriptors > 2 in zypp-checkpatches-wrapper (bug
+  #325556)
 
 -------------------------------------------------------------------
 Tue Sep 18 17:48:16 CEST 2007 - aschnell@xxxxxxx

Modified: trunk/zypper/src/zypp-checkpatches-wrapper.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypp-checkpatches-wrapper.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- trunk/zypper/src/zypp-checkpatches-wrapper.c (original)
+++ trunk/zypper/src/zypp-checkpatches-wrapper.c Wed Sep 19 09:32:29 2007
@@ -24,8 +24,7 @@
 {
     /* see http://rechner.lst.de/~okir/blackhats/node41.html */
     while (1) {
-       int fd;
-       fd = open("/dev/null", O_RDWR);
+       int fd = open("/dev/null", O_RDWR);
        if (fd < 0)
            return WRAPPER_ERROR;
        if (fd > 2) {
@@ -34,6 +33,11 @@
        }
     }
 
+    /* see http://rechner.lst.de/~okir/blackhats/node35.html */
+    int fd = getdtablesize();
+    while (fd-- > 2)
+        close(fd);
+
     /* cd / to avoid NFS problems */
     if (chdir ("/")) {
        perror ("chdir");

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages