Bug 36155 - no way to provide own default options on mount removable drives
Summary: no way to provide own default options on mount removable drives
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: udisks2 (show other bugs)
Version: unstable
Hardware: all Linux
: P3 enhancement
Assignee: Yuri N. Sedunov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-22 10:07 MSK by nbr
Modified: 2019-02-23 12:45 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nbr 2019-02-22 10:07:56 MSK
It is no way to make own default options, like "noexec" on removable mounts
handled by udisks2.
A stackoverflow discussion is here:
https://unix.stackexchange.com/questions/155567/mounting-removable-usb-disks-with-nodev-noexec-nosuid
Is it possible to have at least our own distribution patches for handling this problem?
Comment 1 Yuri N. Sedunov 2019-02-22 11:43:23 MSK
https://github.com/storaged-project/udisks/issues/609
Comment 2 AEN 2019-02-22 14:29:44 MSK
Нам это очень нужно для сертификации и потому прямщаз.
Comment 3 Yuri N. Sedunov 2019-02-23 12:45:11 MSK
(В ответ на комментарий №2)
> Нам это очень нужно для сертификации и потому прямщаз.
А что нужно то?

$ udisksctl mount --help
Usage:
  udisksctl mount [OPTION?]

Mount a filesystem.

Options:
  -p, --object-path         Object to mount
  -b, --block-device        Block device to mount
  -t, --filesystem-type     Filesystem type to use
  -o, --options             Mount options
  --no-user-interaction     Do not authenticate the user if needed

Видим, что, например, один из клиентов udisksd -- udisksctl умеет "mount options", сам udisksd умеет читать опции монтирования из fstab и из файлов конфигурации, см. man 8 udisks.

 DRIVE CONFIGURATION
       At start-up and when a drive is connected, udisksd(8) will apply configuration stored in the file
       /etc/udisks2/IDENTIFIER.conf where IDENTIFIER is the value of the Drive:Id property for the drive. If the file
       changes on disk its new contents will also be applied to the drive. Typically, users or administrators will never
       need to edit drive configuration files as they are effectively managed through graphical applications such as
       gnome-disks(1). Manually editing configuration files is however supported — the file format is a simple .ini-like
       format (see the Desktop Entry Specification[3] for the exact syntax). New groups and keys may be added in the
       future.

Если хочется чего-то особенного, просьба внимательно прочитать 
отсюда: https://lists.freedesktop.org/archives/devkit-devel/2015-April/001668.html
до конца нити и конкретно сформулировать задачу.