All Projects → alcooper → Mmc Password Utils

alcooper / Mmc Password Utils

Licence: gpl-2.0
User layer support for kernel MMC Password Lock/Unlock feature

Labels

Projects that are alternatives of or similar to Mmc Password Utils

Ti.applifecyle
Titanium module for app events in android
Stars: ✭ 8 (-20%)
Mutual labels:  makefile
Freedonia Compliance
SSP for the Freedonia national website
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Remixos Bootable Newinstaller
bootable/newinstaller - generate initrd.img and install.img
Stars: ✭ 10 (+0%)
Mutual labels:  makefile
Device Sony Ivy
Stars: ✭ 8 (-20%)
Mutual labels:  makefile
Dockerized lara
Build your Laravel App with Redis - Mongodb - MariaDB - Nginx - php7 - zsh
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Docs
Documentation for Bookworm: particularly focusing on creation aspects -
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Base2grob
Stars: ✭ 8 (-20%)
Mutual labels:  makefile
Moosefs Freebsd Ports
Official FreeBSD Ports for MooseFS 3.0 (and MooseFS 2.0). If you're looking for MooseFS 2.0 ports, check the 2.0.x branch.
Stars: ✭ 10 (+0%)
Mutual labels:  makefile
Sfpcrecreatingthepastspring2018
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Android device samsung herolte
Stars: ✭ 10 (+0%)
Mutual labels:  makefile
Fonts
Terminal bitmap fonts
Stars: ✭ 8 (-20%)
Mutual labels:  makefile
React Native App Boilerplate
A simple and scalable boiler plate code for React Native App using React Native Navigation by WiX and Saga .
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Proprietary vendor widevine
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Ti.signinwith
A Titanium module for generic access to ident provider
Stars: ✭ 8 (-20%)
Mutual labels:  makefile
Alpine Nginx
Docker config for a very small nginx container
Stars: ✭ 10 (+0%)
Mutual labels:  makefile
Gmf
GFM: One-button to init、build、commit、push and so on. 项目初始化、构建、提交、发布等操作一键即可!
Stars: ✭ 8 (-20%)
Mutual labels:  makefile
Disable Dhe
Disable DHE cipher suites in Firefox
Stars: ✭ 9 (-10%)
Mutual labels:  makefile
Opus Android
Build Opus lib with Android ndk-build
Stars: ✭ 10 (+0%)
Mutual labels:  makefile
Mynewt Documentation
Apache MyNewt Documentation
Stars: ✭ 10 (+0%)
Mutual labels:  makefile
Influxdb Slurm Monitoring
Stars: ✭ 10 (+0%)
Mutual labels:  makefile

mmc-password-utils

User layer support for the kernel MMC Password Lock/Unlock feature This contains the user space helper functions used by the MMC kernel driver password feature to enable the use of passwords to protect MMC and SD devices. The MMC driver will use the Linux KEYS subsystem to get a password for password based operations on SD/MMC devices and requires that the "keyutils" package be installed on the system.

Most of these files are used to configure the KEYS user space helper layer to return a password to the kernel driver for any SD/MMC device based on its CID. The CID is a 32 digit hex string that is guaranteed to be unique for any device and can be determined by doing a cat of "/sys/bus/mmc/devices/mmc0*/cid" for a device connected to the first MMC host controller (use mmc1* for the second MMC host controller, etc.). This project was created to facilitate testing of the kernel driver and uses a very basic clear text password file that contains just the CID/password pairs. Passwords must be added and deleted from the password file manually and the password for a device must be added before enabling password protection on the device.

The MMC driver will automatically try to unlock a password protected MMC/SD device during probe by using the KEYS subsystem and does not require user intervention. All other password operations, like setting and clearing the password, are done through sysfs. Commands can be echo'd to the sysfs file "/sys/bus/mmcdevices/mmc0*/lock" to trigger password operations. NOTE: The password/CID pair must be added to the password file before all operations except "erase". Following is a list of the possible commands: setpw - Set the SD/MMC devices password. The next time the device is power cycled it will come up locked. clrpw - Clear the SD/MMC devices password. This only works on unlocked password protected devices. lock - Lock the SD/MMC device. The device must already have a password set. unlock - Unlock the SD/MMC device. The device must already have a password set. erase - Erase the entire devices contents and then clear the password. Only works on a locked device.

There can be an issue when booting a system with a locked device already installed where the unlock operation during the device probe happens before the filesystem that contains the password file is available. In this case the kernel driver will initialize the device enough to create the sysfs entries and the /dev/mmcblk0 special device even though all read/writes to the block device will fail. Once the filesystem containing the password information is available, doing an echo to "/sys/bus/mmc/devices/mmc0*/unlock_retry" will cause the driver to retry the unlock operation and if successful to bring the device up fully, including all it's partitions. The best way to handle this issue is to run the included mmc-password-retry rc file during boot after sysfs and the required filesystem are available.

The supplied Makefile will install the config files and scripts.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].