ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
Server : LiteSpeed System : Linux v2202501248978307069 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 User : voirf6718 ( 1002) PHP Version : 7.3.33-1+focal Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, Directory : /lib/cryptsetup/scripts/ |
#!/bin/sh # WARNING: If you use the decrypt_derived keyscript for devices with # persistent data (i.e. not swap or temp devices), then you will lose # access to that data permanently if something damages the LUKS header # of the LUKS device you derive from. The same applies if you luksFormat # the device, even if you use the same passphrase(s). A LUKS header # backup, or better a backup of the data on the derived device may be # a good idea. See the Cryptsetup FAQ on how to do this right. if [ -z "$1" ]; then echo "$0: must be executed with a crypto device as argument" >&2 exit 1 fi unset -v keys count keys="$(dmsetup table --target crypt --showkeys -- "$1" 2>/dev/null | cut -s -d' ' -f5)" count="$(printf '%s' "$keys" | wc -l)" if [ -n "$keys" ] && [ $count -le 1 ]; then if [ "${keys#:}" = "$keys" ]; then printf '%s' "$keys" | tr -d '\n' else echo "$0: device $1 uses the kernel keyring" fi elif [ $count -eq 0 ]; then echo "$0: device $1 doesn't exist or isn't a crypto device" >&2 else echo "$0: more than one device match" >&2 fi exit 1