mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-25 09:51:23 +00:00
Merge remote-tracking branch 'jessica-youjeong/062223-jammy-snap-preseeding' into ubuntu/jammy
* jessica-youjeong/062223-jammy-snap-preseeding: fix: bind correct apparmor feature for validating snap seed
This commit is contained in:
commit
9ff66d60d9
1
live-build/apparmor/5.19/capability
Normal file
1
live-build/apparmor/5.19/capability
Normal file
@ -0,0 +1 @@
|
||||
0xffffff
|
1
live-build/apparmor/5.19/caps/mask
Normal file
1
live-build/apparmor/5.19/caps/mask
Normal file
@ -0,0 +1 @@
|
||||
chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read
|
1
live-build/apparmor/5.19/dbus/mask
Normal file
1
live-build/apparmor/5.19/dbus/mask
Normal file
@ -0,0 +1 @@
|
||||
acquire send receive
|
1
live-build/apparmor/5.19/domain/attach_conditions/xattr
Normal file
1
live-build/apparmor/5.19/domain/attach_conditions/xattr
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/change_hat
Normal file
1
live-build/apparmor/5.19/domain/change_hat
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/change_hatv
Normal file
1
live-build/apparmor/5.19/domain/change_hatv
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/change_onexec
Normal file
1
live-build/apparmor/5.19/domain/change_onexec
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/change_profile
Normal file
1
live-build/apparmor/5.19/domain/change_profile
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/computed_longest_left
Normal file
1
live-build/apparmor/5.19/domain/computed_longest_left
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/fix_binfmt_elf_mmap
Normal file
1
live-build/apparmor/5.19/domain/fix_binfmt_elf_mmap
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/post_nnp_subset
Normal file
1
live-build/apparmor/5.19/domain/post_nnp_subset
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/stack
Normal file
1
live-build/apparmor/5.19/domain/stack
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/domain/version
Normal file
1
live-build/apparmor/5.19/domain/version
Normal file
@ -0,0 +1 @@
|
||||
1.2
|
1
live-build/apparmor/5.19/file/mask
Normal file
1
live-build/apparmor/5.19/file/mask
Normal file
@ -0,0 +1 @@
|
||||
create read write exec append mmap_exec link lock
|
1
live-build/apparmor/5.19/mount/mask
Normal file
1
live-build/apparmor/5.19/mount/mask
Normal file
@ -0,0 +1 @@
|
||||
mount umount pivot_root
|
1
live-build/apparmor/5.19/namespaces/pivot_root
Normal file
1
live-build/apparmor/5.19/namespaces/pivot_root
Normal file
@ -0,0 +1 @@
|
||||
no
|
1
live-build/apparmor/5.19/namespaces/profile
Normal file
1
live-build/apparmor/5.19/namespaces/profile
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/network/af_mask
Normal file
1
live-build/apparmor/5.19/network/af_mask
Normal file
@ -0,0 +1 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp
|
1
live-build/apparmor/5.19/network/af_unix
Normal file
1
live-build/apparmor/5.19/network/af_unix
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/network_v8/af_mask
Normal file
1
live-build/apparmor/5.19/network_v8/af_mask
Normal file
@ -0,0 +1 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp
|
1
live-build/apparmor/5.19/policy/set_load
Normal file
1
live-build/apparmor/5.19/policy/set_load
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/policy/versions/v5
Normal file
1
live-build/apparmor/5.19/policy/versions/v5
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/policy/versions/v6
Normal file
1
live-build/apparmor/5.19/policy/versions/v6
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/policy/versions/v7
Normal file
1
live-build/apparmor/5.19/policy/versions/v7
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/policy/versions/v8
Normal file
1
live-build/apparmor/5.19/policy/versions/v8
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/ptrace/mask
Normal file
1
live-build/apparmor/5.19/ptrace/mask
Normal file
@ -0,0 +1 @@
|
||||
read trace
|
1
live-build/apparmor/5.19/query/label/data
Normal file
1
live-build/apparmor/5.19/query/label/data
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/query/label/multi_transaction
Normal file
1
live-build/apparmor/5.19/query/label/multi_transaction
Normal file
@ -0,0 +1 @@
|
||||
yes
|
1
live-build/apparmor/5.19/query/label/perms
Normal file
1
live-build/apparmor/5.19/query/label/perms
Normal file
@ -0,0 +1 @@
|
||||
allow deny audit quiet
|
1
live-build/apparmor/5.19/rlimit/mask
Normal file
1
live-build/apparmor/5.19/rlimit/mask
Normal file
@ -0,0 +1 @@
|
||||
cpu fsize data stack core rss nproc nofile memlock as locks sigpending msgqueue nice rtprio rttime
|
1
live-build/apparmor/5.19/signal/mask
Normal file
1
live-build/apparmor/5.19/signal/mask
Normal file
@ -0,0 +1 @@
|
||||
hup int quit ill trap abrt bus fpe kill usr1 segv usr2 pipe alrm term stkflt chld cont stop stp ttin ttou urg xcpu xfsz vtalrm prof winch io pwr sys emt lost
|
@ -767,7 +767,10 @@ snap_validate_seed() {
|
||||
# a snap pre-seeding issue can occur, where the incorrect apparmor features are reported
|
||||
# basic copy of a directory structure overriding the "generic" feature set
|
||||
# which is tied to the LTS kernel
|
||||
cp -R --verbose /usr/share/livecd-rootfs/live-build/apparmor/${kern_major_min}/* /usr/share/livecd-rootfs/live-build/apparmor/generic/
|
||||
|
||||
# Bind kernel apparmor directory to feature directory for snap preseeding
|
||||
umount "${CHROOT_ROOT}/sys/kernel/security/apparmor/features/"
|
||||
mount --bind /usr/share/livecd-rootfs/live-build/apparmor/${kern_major_min} "${CHROOT_ROOT}/sys/kernel/security/apparmor/features/"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -777,6 +780,14 @@ snap_validate_seed() {
|
||||
/usr/lib/snapd/snap-preseed $(realpath "${CHROOT_ROOT}")
|
||||
chroot "${CHROOT_ROOT}" apparmor_parser --skip-read-cache --write-cache --skip-kernel-load --verbose -j `nproc` /etc/apparmor.d
|
||||
fi
|
||||
|
||||
# Unmount kernel specific apparmor feature
|
||||
# mount generic apparmor feature again (cleanup)
|
||||
if [ -d /build/config/hooks.d/extra/apparmor/${kern_major_min} ]; then
|
||||
umount "${CHROOT_ROOT}/sys/kernel/security/apparmor/features/"
|
||||
mount -o bind /usr/share/livecd-rootfs/live-build/apparmor/generic "${CHROOT_ROOT}/sys/kernel/security/apparmor/features/"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
snap_from_seed() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user