Anonymous | Login | Signup for a new account | 11-10-2008 10:44 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000243 | [BusyBox] Standards Compliance | major | always | 05-03-05 02:57 | 12-07-05 21:32 | ||||
Reporter | Danyel Ceccaldi | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 1.00 | ||||||
Summary | 0000243: cp clone special files instead of copying from them, for example /dev/null | ||||||||
Description |
cp /dev/null targetfile creates a special targetfile instead of an empty regular file. probably libbb/copy_file.c requires patching. |
||||||||
Additional Information |
The patch below is not completely working. If applied cp not longer clones special files, but it generated a strange error message and exit with exit code 1. Glenn McGrath posted a patch in september 2002: -------------- next part -------------- --- busybox.orig/libbb/copy_file.c 2002-06-11 23:25:26.000000000 +1000 +++ ./busybox.dup/libbb/copy_file.c 2002-09-16 15:17:57.000000000 +1000 @@ -129,7 +129,7 @@ perror_msg("unable to change permissions of `%s'", dest); status = -1; } - } else if (S_ISREG(source_stat.st_mode)) { + } else if (S_ISREG(source_stat.st_mode) || (!(flags & FILEUTILS_PRESERVE_STATUS))) { FILE *sfp, *dfp=NULL; #ifdef CONFIG_FEATURE_PRESERVE_HARDLINKS char *link_name; |
||||||||
Attached Files | |||||||||
|
Copyright © 2000 - 2006 Mantis Group |