/usr/bin/backup_all is in rsbac-admin 1.4.0-repack-0ubuntu3.
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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | #!/bin/bash
#
# Backup RSBAC attributes
#
# This script generates a backup of most RSBAC settings on stdout.
#
# Current exceptions: PM data structures, ADF log levels
#
# Please make sure you have READ right in all Directories and
# READ_ATTRIBUTES for all objects,
# e.g. use setuid 0, RC force_role 'Role Admin', etc.,
# or set min_caps to DAC_READ_SEARCH for non-root user with READ_ATTRIBUTE etc.
# or ( set softmode | switch off all modules | start Maintenance kernel ) and run as root
#
if test "$1" == "-p"
then PRINTALL="-p"
fi
echo "#!/bin/sh"
echo "#"
echo "# RSBAC Backup of all attributes"
echo "#"
echo "# `date`"
echo "#"
# Log Levels
switch_adf_log -b
# Network Templates
echo ""
net_temp -a -b
# MAC
echo ""
mac_back_trusted -r /
# PM
# Sorry, no backup yet. Copy /rsbac/backup/pm* to backup
# dir. To restore boot non-RSBAC kernel and copy back.
# AUTH
echo ""
auth_back_cap -r /
# RC
echo ""
rc_get_item $PRINTALL backup
# ACL
echo ""
acl_tlist -br $PRINTALL FD :DEFAULT: /
acl_tlist -b $PRINTALL DEV :DEFAULT:
acl_tlist -Db $PRINTALL
acl_tlist -br $PRINTALL IPC :DEFAULT:
acl_tlist -br $PRINTALL SCD :DEFAULT: `acl_tlist -n`
acl_tlist -ab $PRINTALL
acl_tlist -br $PRINTALL PROCESS :DEFAULT:
acl_tlist -br $PRINTALL NETDEV :DEFAULT:
ALLTEMP=`net_temp list_temp_nr`
acl_tlist -br $PRINTALL NETTEMP_NT :DEFAULT: $ALLTEMP
acl_tlist -br $PRINTALL NETTEMP $ALLTEMP
acl_tlist -br $PRINTALL NETOBJ :DEFAULT:
acl_mask -br $PRINTALL FD /
acl_mask -Db $PRINTALL
acl_mask -ab $PRINTALL
acl_mask -b $PRINTALL SCD `acl_tlist -n`
# User management
rsbac_groupshow -S all -b -p -a
rsbac_usershow -S all -b -p -a
# RES default user settings
attr_get_user RES 4294967292 res_min |
while read name value
do
if test "$value" != "0"
then
echo attr_set_user RES $user res_min $name $value
fi
done
attr_get_user RES 4294967292 res_max |
while read name value
do
if test "$value" != "0"
then
echo attr_set_user RES $user res_max $name $value
fi
done
# General attributes (last because of RC types at restore time - if RC is active)
echo ""
attr_back_fd -r -m /
attr_back_dev -b
attr_back_user -a
attr_back_net -a NETDEV
attr_back_net -a NETTEMP
echo "#"
echo "# RSBAC Backup finished at `date`"
|