/usr/lib/gnu-smalltalk/vfs/ucpio is in gnu-smalltalk 3.2.4-2.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | #!/bin/sh
#
# Written by Stas Maximov 1998 SVR4 (UnixWare)
# stmax@u213.srcc.msu.su
# (C) 1996 The Free Software Foundation.
#
#
uni_cat ()
# $1 is the archive name
{
case "$1" in
*.cpio.Z) compress -dc "$1"
;;
*.cpio.gz) gzip -dc "$1"
;;
*.cpio) cat "$1"
;;
*.rpm) rpm2cpio "$1"
;;
*) echo "unknown extension"
esac
}
mccpiofs_list ()
# $1 is the archive name
{
uni_cat "$1" | cpio -itv | gawk '
{
if (substr($9,length($9),1) == ",")
{
tmp = substr($9, 1, length($9)-1);
$9 = $8;
$8 = tmp
}
else if (substr($10,length($10),1) == ",")
{
tmp = substr($10, 1, length($10)-1);
$10 = $9
$9 = tmp
}
print $0
}'
}
mccpiofs_copyout ()
# $1 is the archive name
# $2 is a name of a file within the archive
# $3 is a name of a file within the system (to add from or extract to)
{
TMPDIR=/tmp/mctmpdir.$$
# FIXME: Try harder to generate a unique directory if this fails
mkdir -m 0700 $TMPDIR || exit 1
cd $TMPDIR
uni_cat "$1" | cpio -icumd "$2" 2>/dev/null
mv "$2" "$3"
cd /
rm -rf $TMPDIR
}
#
# main
#
umask 077
case "$1" in
list) mccpiofs_list $2
exit 0
;;
copyout) mccpiofs_copyout $2 $3 $4
exit 0
;;
esac
exit 1
|