/snap/core22/2437/usr/sbin
NameSizeModeActions
aa-remove-unknown30680755editdlrm
aa-status641200755editdlrm
aa-teardown1370755editdlrm
add-shell10510755editdlrm
addgroup382470755editdlrm
adduser382470755editdlrm
agetty568960755editdlrm
apparmor_parser15480640755editdlrm
apparmor_status641200755editdlrm
arpd269600755editdlrm
arptables2242960755editdlrm
arptables-nft2242960755editdlrm
arptables-nft-restore2242960755editdlrm
arptables-nft-save2242960755editdlrm
arptables-restore2242960755editdlrm
arptables-save2242960755editdlrm
badblocks351440755editdlrm
blkdeactivate163510755editdlrm
blkdiscard229120755editdlrm
blkid516240755editdlrm
blkzone352000755editdlrm
blockdev311040755editdlrm
bridge947120755editdlrm
capsh310320755editdlrm
cfdisk970080755editdlrm
chcpu311040755editdlrm
chgpasswd595280755editdlrm
chmem352000755editdlrm
chpasswd554640755editdlrm
chroot394320755editdlrm
cpgr494480755editdlrm
cppw494480755editdlrm
cryptdisks_start15440755editdlrm
cryptdisks_stop8440755editdlrm
cryptsetup1740000755editdlrm
cryptsetup-reencrypt925440755editdlrm
cryptsetup-ssh240960755editdlrm
ctrlaltdel147200755editdlrm
dcb824480755editdlrm
debugfs2353200755editdlrm
delgroup164950755editdlrm
deluser164950755editdlrm
depmod1703520755editdlrm
devlink1462880755editdlrm
dhclient4532800755editdlrm
dhclient-script163040755editdlrm
dmsetup1751280755editdlrm
dmstats1751280755editdlrm
dosfsck843600755editdlrm
dosfslabel393040755editdlrm
dumpe2fs310400755editdlrm
e2freefrag146480755editdlrm
e2fsck3602800755editdlrm
e2image433280755editdlrm
e2label1050160755editdlrm
e2mmpstatus310400755editdlrm
e2scrub72960755editdlrm
e2scrub_all53950755editdlrm
e2undo228400755editdlrm
e4crypt311040755editdlrm
e4defrag310320755editdlrm
ebtables2242960755editdlrm
ebtables-nft2242960755editdlrm
ebtables-nft-restore2242960755editdlrm
ebtables-nft-save2242960755editdlrm
ebtables-restore2242960755editdlrm
ebtables-save2242960755editdlrm
faillock144880755editdlrm
fatlabel393040755editdlrm
fdisk1130720755editdlrm
filefrag187600755editdlrm
findfs147200755editdlrm
fsck434400755editdlrm
fsck.cramfs311680755editdlrm
fsck.ext23602800755editdlrm
fsck.ext33602800755editdlrm
fsck.ext43602800755editdlrm
fsck.fat843600755editdlrm
fsck.minix557120755editdlrm
fsck.msdos843600755editdlrm
fsck.vfat843600755editdlrm
fsfreeze147200755editdlrm
fstab-decode187440755editdlrm
fstrim433920755editdlrm
genl926080755editdlrm
getcap146480755editdlrm
getpcaps146480755editdlrm
getty568960755editdlrm
groupadd685200755editdlrm
groupdel642320755editdlrm
groupmems554880755editdlrm
groupmod684240755editdlrm
grpck595280755editdlrm
grpconv512080755editdlrm
grpunconv512080755editdlrm
halt11198560755editdlrm
hwclock517120755editdlrm
iconvconfig311280755editdlrm
init18499920755editdlrm
insmod1703520755editdlrm
installkernel26590755editdlrm
integritysetup553680755editdlrm
invoke-rc.d165070755editdlrm
ip7188960755editdlrm
ip6tables2242960755editdlrm
ip6tables-apply70570755editdlrm
ip6tables-legacy992720755editdlrm
ip6tables-legacy-restore992720755editdlrm
ip6tables-legacy-save992720755editdlrm
ip6tables-nft2242960755editdlrm
ip6tables-nft-restore2242960755editdlrm
ip6tables-nft-save2242960755editdlrm
ip6tables-restore2242960755editdlrm
ip6tables-restore-translate2242960755editdlrm
ip6tables-save2242960755editdlrm
ip6tables-translate2242960755editdlrm
iptables2242960755editdlrm
iptables-apply70570755editdlrm
iptables-legacy992720755editdlrm
iptables-legacy-restore992720755editdlrm
iptables-legacy-save992720755editdlrm
iptables-nft2242960755editdlrm
iptables-nft-restore2242960755editdlrm
iptables-nft-save2242960755editdlrm
iptables-restore2242960755editdlrm
iptables-restore-translate2242960755editdlrm
iptables-save2242960755editdlrm
iptables-translate2242960755editdlrm
isosize147200755editdlrm
killall5311120755editdlrm
ldattach270080755editdlrm
ldconfig3870755editdlrm
ldconfig.real12139600755editdlrm
logsave144960755editdlrm
losetup722080755editdlrm
lsmod1703520755editdlrm
luksformat34010755editdlrm
mkdosfs520480755editdlrm
mke2fs1337520755editdlrm
mkfs147200755editdlrm
mkfs.bfs229120755editdlrm
mkfs.cramfs351440755editdlrm
mkfs.ext21337520755editdlrm
mkfs.ext31337520755editdlrm
mkfs.ext41337520755editdlrm
mkfs.fat520480755editdlrm
mkfs.minix434080755editdlrm
mkfs.msdos520480755editdlrm
mkfs.vfat520480755editdlrm
mkhomedir_helper227040755editdlrm
mklost+found146480755editdlrm
mkswap474960755editdlrm
modinfo1703520755editdlrm
modprobe1703520755editdlrm
netplan7980755editdlrm
newusers765200755editdlrm
nfnl_osf187360755editdlrm
nologin146400755editdlrm
pam-auth-update209920755editdlrm
pam_extrausers_chkpwd226802755editdlrm
pam_extrausers_update308720755editdlrm
pam_getenv28900755editdlrm
pam_timestamp_check144880755editdlrm
pivot_root147200755editdlrm
plymouthd1541680755editdlrm
poweroff11198560755editdlrm
pwck513360755editdlrm
pwconv471120755editdlrm
pwunconv430160755editdlrm
readprofile229440755editdlrm
reboot11198560755editdlrm
remove-shell10990755editdlrm
resize2fs678960755editdlrm
rfkill309520755editdlrm
rmmod1703520755editdlrm
rmt599760755editdlrm
rmt-tar599760755editdlrm
rtacct289920755editdlrm
rtcwake352000755editdlrm
rtmon925600755editdlrm
runlevel11198560755editdlrm
runuser556800755editdlrm
service90970755editdlrm
setcap146480755editdlrm
sfdisk1048320755editdlrm
shadowconfig8850755editdlrm
shutdown11198560755editdlrm
sshd9212880755editdlrm
start-stop-daemon484880755editdlrm
sudo_logsrvd2049040755editdlrm
sudo_sendlog1099120755editdlrm
sulogin433920755editdlrm
swaplabel188160755editdlrm
swapoff229120755editdlrm
swapon433920755editdlrm
switch_root229120755editdlrm
sysctl309600755editdlrm
tarcat9360755editdlrm
tc6288160755editdlrm
telinit11198560755editdlrm
tipc926080755editdlrm
tune2fs1050160755editdlrm
tzconfig1060755editdlrm
unix_chkpwd267762755editdlrm
unix_update308720755editdlrm
update-ca-certificates54180755editdlrm
update-passwd353920755editdlrm
update-rc.d173240755editdlrm
update-shells38060755editdlrm
useradd1307200755editdlrm
userdel889360755editdlrm
usermod1264240755editdlrm
vdpa312960755editdlrm
veritysetup448080755editdlrm
vigr578880755editdlrm
vipw578880755editdlrm
visudo2250640755editdlrm
wipefs392960755editdlrm
wpa_action17350755editdlrm
wpa_cli1436800755editdlrm
wpa_supplicant33970480755editdlrm
xtables-legacy-multi992720755editdlrm
xtables-monitor2242960755editdlrm
xtables-nft-multi2242960755editdlrm
zic638160755editdlrm
zramctl558240755editdlrm
Edit: /snap/core22/2437/usr/sbin/update-shells (3806B)
#!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later # Copyright 2021 Helmut Grohne # A "hashset" is a shell variable containing a sequence of elements separated # and surrounded by hash (#) characters. None of the elements may contain a # hash character. The character is thus chosen, because it initiates a comment # in /etc/shells. All variables ending in _SHELLS in this file are hashsets. set -e # Check whether hashset $1 contains element $2. hashset_contains() { case "$1" in *"#$2#"*) return 0 ;; *) return 1 ;; esac } log() { if [ "$VERBOSE" = 1 ]; then echo "$*" fi } ROOT= VERBOSE=0 NOACT=0 while [ $# -gt 0 ]; do case "$1" in --help) cat <&2 exit 1 fi ROOT=$1 ;; --verbose) VERBOSE=1 ;; *) echo "unrecognized option $1" 1>&2 exit 1 ;; esac shift done PKG_DIR="$ROOT/usr/share/debianutils/shells.d" STATE_FILE="$ROOT/var/lib/shells.state" TARGET_ETC_FILE="$ROOT/etc/shells" SOURCE_ETC_FILE="$TARGET_ETC_FILE" NEW_ETC_FILE="$TARGET_ETC_FILE.tmp" NEW_STATE_FILE="$STATE_FILE.tmp" if ! test -e "$SOURCE_ETC_FILE"; then SOURCE_ETC_FILE="$ROOT/usr/share/debianutils/shells" fi PKG_SHELLS='#' LC_COLLATE=C.UTF-8 # glob in reproducible order for f in "$PKG_DIR/"*; do [ "$f" = "$PKG_DIR/*" ] && break while IFS='#' read -r line _; do [ -n "$line" ] || continue PKG_SHELLS="$PKG_SHELLS$line#" realshell=$(dpkg-realpath --root "$ROOT" "$line") if [ "$line" != "$realshell" ]; then PKG_SHELLS="$PKG_SHELLS$realshell#" fi done < "$f" done STATE_SHELLS='#' if [ -e "$STATE_FILE" ] ; then while IFS='#' read -r line _; do [ -n "$line" ] && STATE_SHELLS="$STATE_SHELLS$line#" done < "$STATE_FILE" fi cleanup() { rm -f "$NEW_ETC_FILE" "$NEW_STATE_FILE" } trap cleanup EXIT : > "$NEW_ETC_FILE" ETC_SHELLS='#' while IFS= read -r line; do shell=${line%%#*} # copy all comment lines, packaged shells and local additions if [ -z "$shell" ] || hashset_contains "$PKG_SHELLS" "$shell" || ! hashset_contains "$STATE_SHELLS" "$shell"; then echo "$line" >> "$NEW_ETC_FILE" ETC_SHELLS="$ETC_SHELLS$shell#" else log "removing shell $shell" fi done < "$SOURCE_ETC_FILE" : > "$NEW_STATE_FILE" saved_IFS=$IFS IFS='#' set -f # shellcheck disable=SC2086 # word splitting intended, globbing disabled set -- ${PKG_SHELLS###} set +f IFS=$saved_IFS for shell; do echo "$shell" >> "$NEW_STATE_FILE" # add shells that are neither already present nor locally removed if ! hashset_contains "$ETC_SHELLS" "$shell" && ! hashset_contains "$STATE_SHELLS" "$shell"; then echo "$shell" >> "$NEW_ETC_FILE" log "adding shell $shell" fi done if [ "$NOACT" = 0 ]; then if [ -e "$STATE_FILE" ]; then chmod --reference="${STATE_FILE}" "${NEW_STATE_FILE}" || chmod $(stat -c %a "${STATE_FILE}") "${NEW_STATE_FILE}" chown --reference="${STATE_FILE}" "${NEW_STATE_FILE}" || chown $(stat -c %U "${STATE_FILE}") "${NEW_STATE_FILE}" else chmod 0644 "$NEW_STATE_FILE" fi chmod --reference="${SOURCE_ETC_FILE}" "${NEW_ETC_FILE}" || chmod $(stat -c %a "${SOURCE_ETC_FILE}") "${NEW_ETC_FILE}" chown --reference="${SOURCE_ETC_FILE}" "${NEW_ETC_FILE}" || chown $(stat -c %U "${SOURCE_ETC_FILE}") "${NEW_ETC_FILE}" sync -d "$NEW_ETC_FILE" "$NEW_STATE_FILE" mv -Z "${NEW_ETC_FILE}" "${TARGET_ETC_FILE}" || mv "${NEW_ETC_FILE}" "${TARGET_ETC_FILE}" sync "$TARGET_ETC_FILE" sync "$(dirname "$TARGET_ETC_FILE")" mv "$NEW_STATE_FILE" "$STATE_FILE" sync "$STATE_FILE" sync "$(dirname "$STATE_FILE")" trap "" EXIT fi