]> git.sur5r.net Git - bacula/rescue/commitdiff
Fix temp file security problem + remove linux/floppy
authorKern Sibbald <kern@sibbald.com>
Mon, 19 Sep 2005 17:00:05 +0000 (17:00 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 19 Sep 2005 17:00:05 +0000 (17:00 +0000)
rescue/linux/floppy/.cvsignore [deleted file]
rescue/linux/floppy/Makefile.in [deleted file]
rescue/linux/floppy/backup.etc.list [deleted file]
rescue/linux/floppy/format_floppy [deleted file]
rescue/linux/floppy/getdiskinfo [deleted file]
rescue/linux/floppy/make_rescue_disk [deleted file]
rescue/linux/floppy/restore_etc [deleted file]
rescue/linux/floppy/run_grub [deleted file]
rescue/linux/floppy/run_lilo [deleted file]
rescue/linux/floppy/sfdisk.bz2 [deleted file]
rescue/version.h

diff --git a/rescue/linux/floppy/.cvsignore b/rescue/linux/floppy/.cvsignore
deleted file mode 100644 (file)
index ee40e78..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-diskinfo
-format.hda
-mount_drives
-partition.hda
-sfdisk
-start_network
-1
-bacula-fd
-bacula-fd.conf
diff --git a/rescue/linux/floppy/Makefile.in b/rescue/linux/floppy/Makefile.in
deleted file mode 100755 (executable)
index ed51354..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# 
-# bootstrap/linux Makefile.in
-#
-# Version $Id$
-# 
-@MCOMMON@
-
-working_dir=@working_dir@
-
-srcdir =       @srcdir@
-VPATH =        @srcdir@
-.PATH:         @srcdir@
-topdir = ../..
-thisdir = linux
-
-
-first_rule: all
-dummy:
-
-MKDIR = $(topdir)/autoconf/mkinstalldirs
-
-#-------------------------------------------------------------------------
-
-all: Makefile
-
-depend:
-       
-
-#-------------------------------------------------------------------------
-
-
-install:
-
-uninstall:
-
-Makefile: Makefile.in
-       cd $(topdir) \
-           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-Makefiles:
-       $(SHELL) config.status
-
-clean:
-       @$(RMF) *~ 1 2 3
-       @$(RMF) format.* partition.* start_network mount_drives
-       @$(RMF) sfdisk bacula-fd bacula-fd.gz bacula-fd.conf
-       @$(RMF) -r diskinfo
-
-# clean for distribution
-distclean: clean
-       @$(RMF) Makefile
-       @$(RMF) -r CVS
-
-devclean: clean
-       @$(RMF) Makefile
-
-# ------------------------------------------------------------------------
diff --git a/rescue/linux/floppy/backup.etc.list b/rescue/linux/floppy/backup.etc.list
deleted file mode 100644 (file)
index 43855e6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/etc/exports
-/etc/fstab
-/etc/group
-/etc/gshadow
-/etc/host.conf
-/etc/hosts
-/etc/hosts.allow
-/etc/hosts.deny
-/etc/modules.conf
-/etc/passwd
-/etc/resolv.conf
-/etc/shadow
-/etc/sysconfig
diff --git a/rescue/linux/floppy/format_floppy b/rescue/linux/floppy/format_floppy
deleted file mode 100755 (executable)
index 39e43be..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-#  Format Floppy
-#
-export LANG=C
-echo ""
-echo "This script will format your floppy"
-echo ""
-echo "IT WILL DESTROY ALL DATA ON THE FLOPPY !!!!"
-echo ""
-echo -n "Are you sure you want to continue? (yes/no): "
-read a
-if [ x$a != xyes ] ; then
-   exit 1
-fi 
-echo -n "Do you want to do a block check (takes time)? (yes/no): "
-read a
-if [ x$a = xyes ] ; then
-   check="-c"
-else
-   check=
-fi
-echo ""
-echo "Formating /dev/fd0 -- ext2 partition"
-mke2fs -v $check /dev/fd0
-echo ""
diff --git a/rescue/linux/floppy/getdiskinfo b/rescue/linux/floppy/getdiskinfo
deleted file mode 100755 (executable)
index 61785bb..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/bin/sh
-#
-# Create bootstrap information files -- prelude to creating a
-#   Bacula Rescue Disk
-#
-#   Kern Sibbald, December MMII
-#      This source distributed under the GPL
-#
-export LANG=C
-di=diskinfo
-cwd=`pwd`
-host=`uname -s`
-
-case $host in
- Linux)
-  ;;
- FreeBSD | SunOS | IRIX)
-   echo ""
-   echo "This code is not yet adapted to this OS"     
-   exit 1
-   ;;
- *)
-   echo ""
-   echo "Unknown operating system type: $host"     
-   exit 1
-   ;;
-esac
-if [ ! `whoami` = "root" ] ; then
-  echo ""
-  echo "You need to be root to run this, otherwise"
-  echo "sfdisk produces no output. Continuing anyway ..."
-  echo ""
-fi
-
-#
-#  First collect information
-#
-rm -rf format.* partition.* $di 
-echo "Begin collecting system info ..."
-mkdir -p $di
-cd $di
-mount -l >mount.bsi
-mount -l -t ext2 >mount.ext2.bsi
-mount -l -t ext3 >mount.ext3.bsi
-cp /etc/fstab fstab.bsi
-cp /etc/mtab  mtab.bsi     
-df -Tl >df.bsi
-sfdisk -s >sfdisk.disks.bsi
-grep "^/dev/" sfdisk.disks.bsi | sed -n 's%\(^/dev/[A-Za-z]*\):.*$%\1%p' >disks.bsi
-for i in `cat disks.bsi`; do
-   j=`echo $i | cut -c6-`
-   sfdisk -l $i >sfdisk.$j.bsi 
-   sfdisk -d $i >sfdisk.make.$j.bsi
-done
-route -n >route.bsi
-ifconfig >ifconfig.bsi
-echo "Done collecting info."
-
-#
-# Done collecting information
-#
-
-
-echo "Begin creating scripts ..."
-#
-# First create partitioning script(s)
-#
-for i in `cat disks.bsi`; do
-  j=`echo $i | cut -c6-`
-  cat >$cwd/partition.$j <<END_OF_DATA
-#!/bin/sh
-#
-#  Partition disk $i  -- created by getdiskinfo
-echo ""
-echo "This script will repartition disk $i."
-echo ""
-echo "IT WILL DESTROY ALL DATA ON DISK $i !!!!"
-echo ""
-echo -n "Are you sure you want to continue? yes/no: "
-read a
-if [ x\$a != xyes ] ; then
-   exit 1
-fi 
-echo "Partitioning disk $i"
-# zap partition info
-dd if=/dev/zero of=$i bs=512 count=2
-# repartition
-sfdisk $i <$di/sfdisk.make.$j.bsi | less
-echo ""
-echo "The previous partitioning was:"
-cat $di/sfdisk.$j.bsi
-#
-echo ""
-echo "The new partitioning is:"
-sfdisk -l $i
-echo ""
-echo "If the disk is correctly partitioned, you should"
-echo "now run the \"format.$j\" script."
-echo ""
-END_OF_DATA
-
-  chmod 755 $cwd/partition.$j
-done
-echo "Done making partitioning scripts"
-
-#
-# Create formatting script(s)
-#
-echo "Begin making formatting script(s) ..."
-for i in `cat disks.bsi`; do
-  j=`echo $i | cut -c6-`
-  cat >$cwd/format.$j <<END_OF_DATA
-#!/bin/sh
-#
-#  Format all partitions on disk $i -- created by getdiskinfo
-#
-echo ""
-echo "This script will format all partitions on disk $i."
-echo ""
-echo "IT WILL DESTROY ALL DATA ON DISK $i !!!!"
-echo ""
-echo -n "Are you sure you want to continue? yes/no: "
-read a
-if [ x\$a != xyes ] ; then
-   exit 1
-fi 
-echo "Do you want to do a disk check for bad blocks?"
-echo -n "It is recommended, but takes time. yes/no: "
-read a
-if [ x\$a = xyes ] ; then
-   check="-c"
-else
-   check=
-fi
-END_OF_DATA
-
-   # Find swap partitions in output from sfdisk
-   k=`grep "^$i.*82  Linux swap" sfdisk.$j.bsi | cut -d ' ' -f 1`
-   for disk in $k; do
-      echo "echo \"Formatting $disk -- swap partition\"" >>$cwd/format.$j
-      echo "mkswap $check $disk" >>$cwd/format.$j
-      echo "echo \"\"" >>$cwd/format.$j
-   done
-   # Find ext2 partitions in mount output
-   k=`grep "^$i" mount.ext2.bsi | cut -d ' ' -f 1`
-   for disk in $k; do
-      echo "echo \"Formating $disk -- ext2 partition\"" >>$cwd/format.$j
-      label=`grep "^$disk" mount.ext2.bsi | cut -d ' ' -f 7 | cut -c2- | cut -d ] -f 1`
-      if [ x$label = x ] ; then
-         echo "mke2fs -v \$check $disk" >>$cwd/format.$j
-      else
-         echo "mke2fs -v \$check -L $label $disk" >>$cwd/format.$j
-      fi
-      echo "echo \"\"" >>$cwd/format.$j
-   done
-   # Find ext3 partitions in mount output
-   k=`grep "^$i" mount.ext3.bsi | cut -d ' ' -f 1`
-   for disk in $k; do
-      echo "echo \"Formating $disk -- ext3 partition\"" >>$cwd/format.$j
-      label=`grep "^$disk" mount.ext3.bsi | cut -d ' ' -f 7 | cut -c2- | cut -d ] -f 1`
-      if [ x$label = x ] ; then
-         echo "mke2fs -v -j \$check $disk" >>$cwd/format.$j
-      else
-         echo "mke2fs -v -j \$check -L $label $disk" >>$cwd/format.$j
-      fi
-      echo "echo \"\"" >>$cwd/format.$j
-   done
-   chmod 755 $cwd/format.$j
-done
-
-cd $cwd
-
-#
-# Create network start script
-#
-host=`hostname`
-ip=`host $host | cut -d ' ' -f 4`
-if [ $ip = "out;" ] ; then
-  ip=`ifconfig | grep inet | head -1 | sed -n 's/\ \+inet addr:\([0-9]\+\(\.[0-9]\+\)\{3\}\).*/\1/p'`
-fi
-cat >start_network <<END_OF_DATA
-#!/bin/sh
-#
-#  Start network -- created by getdiskinfo
-#
-ip=$ip
-dev=eth0
-ifconfig lo up
-ifconfig \$dev up \$ip
-route add default gw \$ip dev \$dev
-END_OF_DATA
-
-chmod 755 start_network
-
-cat >mount_drives <<END_OF_DATA
-#!/bin/sh
-#
-#  Mount disk drives  -- created by getdiskinfo
-#
-END_OF_DATA
-sed -n 's/\(^.*\)\ on\ \(.*\)\ type.*$/\1 \/mnt\/disk\2/p' $di/mount.ext2.bsi >/tmp/1$$
-sed -n 's/\(^.*\)\ on\ \(.*\)\ type.*$/\1 \/mnt\/disk\2/p' $di/mount.ext3.bsi >>/tmp/1$$
-sed -n 's/\(^.*\)\ on\ \(.*\)\ type.*$/\1 \/mnt\/disk\2/p' $di/mount.rei.bsi >>/tmp/1$$
-# sort so that / is first
-sort -k 2 </tmp/1$$ >/tmp/2$$
-# output mkdir followed by its mount
-sed -n 's/\(^.*\)\ \(.*$\)/mkdir -p \2\nmount \1 \2/p' /tmp/2$$ >>mount_drives
-rm -f /tmp/1$$ /tmp/2$$
-rm -f /tmp/1$$
-
-chmod 755 mount_drives
-
-# copy sfdisk so we will have it
-cp -f /sbin/sfdisk .
-echo "Done building scripts."
-echo " "
-echo "You might want to do a:"
-echo " "
-echo "chown -R uuuu:gggg *"
-echo " "
-echo "where uuuu is your userid and gggg is your group"
-echo "so that you can access all the files as non-root"
-echo " "
diff --git a/rescue/linux/floppy/make_rescue_disk b/rescue/linux/floppy/make_rescue_disk
deleted file mode 100755 (executable)
index 3ea2688..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-#
-# Script to make a Bacula "rescue" disk
-#
-export LANG=C
-device=/mnt/floppy
-dev=/dev/fd0
-
-# Print Usage message
-usage () {
-   cat <<END_OF_DATA
-Usage: make_rescue_disk
-  -h, --help             print this message
-  --make-static-bacula   make static File daemon and add to diskette
-  --copy-static-bacula   copy static File daemon to diskette
-  --copy-etc-files       copy files in etc list to diskette
-END_OF_DATA
-}
-
-# defaults
-make_bacula=no
-copy_bacula=no
-copy_etc=no
-
-#
-# Process command line options
-#
-for option in "$@" ; do
-   case "$option" in
-   -h | --help)
-      usage
-      exit 0
-      ;;
-   --make-static-bacula)
-      make_bacula=yes
-      copy_bacula=yes
-      ;;
-   --copy-static-bacula)
-      copy_bacula=yes
-      ;;
-   --copy-etc-files)
-      copy_etc=yes
-      ;;
-   *)
-      echo "Unknown option specified: $option"
-      usage
-      exit 1
-      ;;
-   esac
-done
-
-echo ""
-echo "Place a blank diskette in your floppy drive."
-echo "It will be formatted and all data will be lost."
-echo ""
-echo -n "Press return when ready: "
-read a
-umount $device 2>&1 >/dev/null
-if [ $? = 0 ] ; then
-   mounted=1
-else
-   mounted=0
-fi
-mke2fs $dev
-mount $dev $device 2>&1 >/dev/null
-
-if [ x$make_bacula = "xyes" ] ; then
-   ./make_static_bacula
-fi
-
-if [ x$copy_bacula = "xyes" -a ! -e bacula-fd ] ; then
-   echo " "
-   echo "bacula-fd not found. If you want Bacula on this"                 
-   echo "rescue disk please run \"make_static_bacula\" first."
-   echo "Continuing anyway ..."
-   echo " "
-   exit 1
-   have_bacula=no
-else
-  echo "Stripping and compressing Bacula"
-  strip bacula-fd
-  gzip bacula-fd
-  have_bacula=yes
-fi
-
-echo "Copying files to $device" 
-cp -a . $device
-
-if [ x$copy_etc = "xyes" ] ; then
-   echo "Tarring /etc files to $device"
-   tar --create --gzip --file $device/etc.gz --files-from backup.etc.list
-fi
-
-if [ x$have_bacula = "xyes" ] ; then
-   rm -f bacula-fd.gz bacula-fd.conf
-fi
-sync
-if [ $mounted = 0 ] ; then
-   umount $device
-fi
diff --git a/rescue/linux/floppy/restore_etc b/rescue/linux/floppy/restore_etc
deleted file mode 100755 (executable)
index ea2239e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# Note, this creates the directory etc, so if you want
-# the files to go into the real /etc, you must be one
-# level up when executing it. Otherwise you end up with 
-# a /etc/etc directory.
-#
-export LANG=C
-device=/mnt/floppy
-tar -v -z -f $device/etc.gz
diff --git a/rescue/linux/floppy/run_grub b/rescue/linux/floppy/run_grub
deleted file mode 100755 (executable)
index b00c796..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# Script to run grub to recreate the MBR
-#
-export LANG=C
-# Find boot partition if any
-bootp=`grep "^/dev/.*\ on\ /boot" diskinfo/mount.bsi | cut -d ' ' -f 1`
-# find boot device
-if [ x$bootp != x ] ; then
-   bootdev=`echo $bootp | cut -c1-8`
-else
-   bootdev=`grep "^/dev/.*\ on\ /" diskinfo/mount.bsi | cut -c1-8`
-fi
-echo "Boot device is $bootdev"
-echo " "
-echo "To manually install grub, enter:"
-echo "chroot /mnt/disk"
-echo "/sbin/grub-install $bootdev"
-echo " "
-echo "Attempting to install grub ..."
-echo " "
-chroot /mnt/disk /sbin/grub-install $bootdev
-sync
diff --git a/rescue/linux/floppy/run_lilo b/rescue/linux/floppy/run_lilo
deleted file mode 100755 (executable)
index 7151a14..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# Script to run lilo and re-create the MBR 
-#
-export LANG=C
-chroot /mnt/disk /sbin/lilo -v -C /etc/lilo.conf
-sync
diff --git a/rescue/linux/floppy/sfdisk.bz2 b/rescue/linux/floppy/sfdisk.bz2
deleted file mode 100644 (file)
index 3e269c3..0000000
Binary files a/rescue/linux/floppy/sfdisk.bz2 and /dev/null differ
index f0ca748b2b753ad620e8c79fe49f984e62157fbf..9e9a02214e9b8c51c1cf8bca7b66b05b1818ad15 100644 (file)
@@ -1,5 +1,5 @@
 /* */
 #undef  VERSION
-#define VERSION "1.7.0"
-#define BDATE   "19 May 2005"
-#define LSMDATE "19May05"
+#define VERSION "1.8.0"
+#define BDATE   "30 August 2005"
+#define LSMDATE "30Aug05"