diff options
| author | Andreas Müller <schnitzeltony@gmail.com> | 2018-04-02 23:53:38 +0200 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.com> | 2018-04-06 12:33:40 +0100 |
| commit | 4bf40b2d322e34a5e3be28486987cc7bbb9125f1 (patch) | |
| tree | ea5276fc2d1089f51f2148a6c2efb07cf1cb26ef | |
| parent | 963761aac38342582316a9fadd7f113e5c748d65 (diff) | |
| download | meta-raspberrypi-4bf40b2d322e34a5e3be28486987cc7bbb9125f1.tar.gz | |
udev-udisks-rules-rpi: Hide initial boot partition from udisks2
If I am not mistaken, many desktops (kde/lxqt/xfce..) use udisks2 to ask for
devices which can be mounted. Without this patch the initial boot partition
can be mounted by a single click on folder displayed on desktop or file manager.
Why it is suggested to add this recipe to an image:
* It removes annoying icon in desktop/file manager.
* The initial boot partition is vfat. Unpriviledged users can modify
content. E.g by removing files accidently, images can be turned into
non-booting condition easily. And from security point of view, it is a
disaster.
FWIW: Have similar in all my BSPs vor very long time.
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
| -rw-r--r-- | recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules | 10 | ||||
| -rw-r--r-- | recipes-core/udev/udev-rules-udisks-rpi_1.0.bb | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules b/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules new file mode 100644 index 0000000..3eff66d --- /dev/null +++ b/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | ############################################################################################################## | ||
| 2 | |||
| 3 | # Partitions which desktops should not display | ||
| 4 | # | ||
| 5 | |||
| 6 | # boot partition | ||
| 7 | ENV{ID_FS_TYPE}=="vfat", ENV{ID_FS_LABEL}=="raspberrypi", \ | ||
| 8 | ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1" | ||
| 9 | |||
| 10 | ############################################################################################################## | ||
diff --git a/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb b/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb new file mode 100644 index 0000000..a238f52 --- /dev/null +++ b/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | DESCRIPTION = "add udisk/udev rule to hide boot partition from udev" | ||
| 2 | LICENSE = "MIT" | ||
| 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 4 | SRC_URI = "file://80-udisks-rpi.rules" | ||
| 5 | |||
| 6 | do_install () { | ||
| 7 | install -d ${D}${base_libdir}/udev/rules.d | ||
| 8 | install -m 644 ${WORKDIR}/80-udisks-rpi.rules ${D}${base_libdir}/udev/rules.d | ||
| 9 | } | ||
| 10 | |||
| 11 | FILES_${PN} = "${base_libdir}/udev/rules.d" | ||
