NetBSD-Bugs archive

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

bin/49588: mtree does not return failure if extra files or directories are found and -e is not specified...



>Number:         49588
>Category:       bin
>Synopsis:       mtree does not return failure if extra files or directories are found and -e is not specified...
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 19 21:00:00 +0000 2015
>Originator:     Matthew Orgass
>Release:        src and pkgsrc as of 2015-01-19
>Organization:
>Environment:
>Description:

>How-To-Repeat:
test against an empty spec file -> returns success :(

>Fix:
--- verify.c.orig	2015-01-19 12:22:26.177578504 -0800
+++ verify.c	2015-01-19 12:23:24.336574657 -0800
@@ -170,9 +170,11 @@
 				    ? rmdir : unlink)(p->fts_accpath)) {
 					printf(", not removed: %s",
 					    strerror(errno));
+					rval = MISMATCHEXIT;
 				} else
 					printf(", removed");
-			}
+			} else
+				rval = MISMATCHEXIT;
 			putchar('\n');
 		}
 		fts_set(t, p, FTS_SKIP);



Home | Main Index | Thread Index | Old Index