/usr/bin/backup_all_1.1.2 is in rsbac-admin 1.4.0-repack-0ubuntu5.
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 | #!/bin/sh
#
# Backup RSBAC attributes for upgrade from 1.1.2 to 1.2.0
#
# This script generates a backup of most RSBAC settings on stdout.
#
# It is intended to run with v1.1.2 admin tools under a RSBAC v1.1.2 kernel,
# and the restore must run with v1.2.0 admin tools under a v1.2.0 kernel.
#
# 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
#
echo "#!/bin/sh"
echo "#"
echo "# RSBAC v1.1.2 backup for restore on v1.2.0"
echo "#"
echo "# `date`"
echo "#"
# PM
# Sorry, no backup yet. Boot non-RSBAC kernel and copy /rsbac/pm* to backup
# dir. To restore copy back.
# AUTH
auth_back_cap -r /
# RC
rc_get_item backup|grep TYPE
rc_get_item backup|grep ROLE \
| sed -e "s/type 64/type 4294967295/g" \
| sed -e "s/type 65/type 4294967294/g" \
| sed -e "s/type 66/type 4294967293/g" \
| sed -e "s/type 67/type 4294967292/g" \
| sed -e "s/type 68/type 4294967291/g" \
| sed -e "s/type 69/type 4294967290/g" \
| sed -e "s/role 64/role 4294967295/g" \
| sed -e "s/role 65/role 4294967294/g" \
| sed -e "s/role 66/role 4294967293/g" \
| sed -e "s/role 67/role 4294967292/g" \
| sed -e "s/role 68/role 4294967291/g"
ALLROLE=`rc_get_item list_used_role_nr`
ALLFDTYPE=`rc_get_item list_used_fd_type_nr`
for role in $ALLROLE
do
for type in $ALLFDTYPE
do
if rc_get_item -p ROLE $role type_comp_fd $type | grep -q 'EXECUTE'
then
echo "rc_set_item -va ROLE $role type_comp_fd $type MAP_EXEC"
fi
done
done
echo "rc_set_item -va ROLE 2 type_comp_scd 10 MODIFY_SYSTEM_DATA"
# ACL
acl_tlist -bpr FD :DEFAULT: / | sed -e "s/EXECUTE/EXECUTE MAP_EXEC/g"
acl_tlist -br DEV :DEFAULT: /dev
acl_tlist -br IPC :DEFAULT:
acl_tlist -bpr SCD :DEFAULT: `acl_tlist -n` | sed -e "s/EXECUTE/MAP_EXEC/g"
echo "acl_grant -v USER 0 MODIFY_SYSTEM_DATA SCD other"
acl_tlist -br PROCESS :DEFAULT:
acl_mask -bpr FD / | sed -e "s/EXECUTE/EXECUTE MAP_EXEC/g"
acl_mask -br DEV /dev
acl_mask -bp SCD `acl_tlist -n`
# General attributes (last because of RC types at restore time - if RC is active)
attr_back_fd -r -m / \
| sed -e "s/rc_force_role 64/rc_force_role 4294967295/g" \
| sed -e "s/rc_force_role 65/rc_force_role 4294967294/g" \
| sed -e "s/rc_force_role 66/rc_force_role 4294967293/g" \
| sed -e "s/rc_force_role 67/rc_force_role 4294967292/g" \
| sed -e "s/rc_initial_role 66/rc_initial_role 4294967293/g" \
| sed -e "s/rc_initial_role 68/rc_initial_role 4294967291/g"
attr_back_dev /dev/*
attr_back_user -a
|