]> git.wh0rd.org - dump.git/commitdiff
Fix restoration of extended attributes for fifos and device nodes.
authorStelian Pop <stelian@popies.net>
Thu, 3 Dec 2009 12:46:29 +0000 (12:46 +0000)
committerStelian Pop <stelian@popies.net>
Thu, 3 Dec 2009 12:46:29 +0000 (12:46 +0000)
CHANGES
restore/tape.c

diff --git a/CHANGES b/CHANGES
index 65b638abadde7ae6a9c7dded4a9ae6e7a0f6c50f..e41a1bee85fd5a430f258b2e3e3d78357f79e1cb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.305 2009/09/07 08:51:04 stelian Exp $
+$Id: CHANGES,v 1.306 2009/12/03 12:46:29 stelian Exp $
 
 Changes between versions 0.4b42 and 0.4b43 (released ?????????????)
 ===================================================================
@@ -18,6 +18,9 @@ Changes between versions 0.4b42 and 0.4b43 (released ?????????????)
        (this also fixes a build failure when selinux libraries are
        not installed).
 
+4.     Fix restoration of extended attributes of fifos and device nodes.
+       Thanks to Igor Zhbanov <izh1979@gmail.com> for the bug report.
+
 Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009)
 ===================================================================
 
index b779fd72517dd904a17b3430cd2a8d90790e4081..fa4a9618f3a8323ef7f5ea3ea0e18ab46c6dea57 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.93 2009/07/23 14:10:39 stelian Exp $";
+       "$Id: tape.c,v 1.94 2009/12/03 12:46:30 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -892,16 +892,14 @@ extractfile(struct entry *ep, int doremove)
 
        case IFIFO:
                Vprintf(stdout, "extract fifo %s\n", name);
-               if (Nflag) {
-                       skipfile();
+               skipfile();
+               if (Nflag)
                        return (GOOD);
-               }
                if (! (spcl.c_flags & DR_METAONLY)) {
                        if (uflag && !Nflag)
                                (void)unlink(name);
                        if (mkfifo(name, mode) < 0) {
                                warn("%s: cannot create fifo", name);
-                               skipfile();
                                return (FAIL);
                        }
                }
@@ -922,22 +920,19 @@ extractfile(struct entry *ep, int doremove)
                        (void) chflags(name, flags);
 #endif
 #endif
-               skipfile();
                return (GOOD);
 
        case IFCHR:
        case IFBLK:
                Vprintf(stdout, "extract special file %s\n", name);
-               if (Nflag) {
-                       skipfile();
+               skipfile();
+               if (Nflag)
                        return (GOOD);
-               }
                if (! (spcl.c_flags & DR_METAONLY)) {
                        if (uflag)
                                (void)unlink(name);
                        if (mknod(name, mode, (int)curfile.dip->di_rdev) < 0) {
                                warn("%s: cannot create special file", name);
-                               skipfile();
                                return (FAIL);
                        }
                }
@@ -964,7 +959,6 @@ extractfile(struct entry *ep, int doremove)
                        }
 #endif
 #endif
-               skipfile();
                return (GOOD);
 
        case IFREG: