The "cpio" program has a bug which tells it to make hard links
to symlinks that results in hard links being made to the target of the
symlink, even if it's a directory, if you have permission to do so.
AUTHOR: Guy Harris (guy@auspex.com)
386BSD-Patchkit: patch00048
Reworked cpio which uses getopt(3) to interpret flag arguments and
changes reels to the save file name.
Performance and size improvements.
Reworked cpio which uses getopt(3) to interpret flag arguments and
changes reels to the save file name.
Performance and size improvements.
+ *
+ * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
+ * -------------------- ----- ----------------------
+ * CURRENT PATCH LEVEL: 1 00048
+ * -------------------- ----- ----------------------
+ *
+ * 16 Aug 92 Guy Harris Symbolic link fix
*/
/* cpio COMPILE: cc -O cpio.c -s -i -o cpio -lgen -lerr
*/
/* cpio COMPILE: cc -O cpio.c -s -i -o cpio -lgen -lerr
i++;
strcpy(fullp, &(Hdr.h_name[i]));
i++;
strcpy(fullp, &(Hdr.h_name[i]));
- if( PassLink && !A_directory && Dev == Statb.st_dev ) {
+/* 16 Aug 92*/ if( PassLink && !A_directory && !A_symlink
+ && Dev == Statb.st_dev ) {
if(link(Hdr.h_name, Fullname) < 0) {
switch(errno) {
case ENOENT:
if(link(Hdr.h_name, Fullname) < 0) {
switch(errno) {
case ENOENT: