-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First version, basic creation/deletion, opening/closing. Passwords only.
- Loading branch information
Showing
23 changed files
with
1,928 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.pc/ | ||
debian/openmediavault-mpd/ | ||
debian/openmediavault-mpd*.debhelper* | ||
debian/openmediavault-mpd*.substvars | ||
debian/files | ||
debian/tmp/ | ||
.*.swp | ||
.*~ | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
openmediavault-luksencryption | ||
============================= | ||
|
||
LUKS (Linux Unified Key Setup) encryption plugin for OpenMediaVault. | ||
|
||
LUKS is the standard for Linux hard disk encryption. This plugin provides for basic manipulation of LUKS-encrypted devices in OpenMediaVault; encrypted devices can be created, destroyed, opened (unlocked/mounted) and closed (locked/unmounted). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
openmediavault-luksencryption (1.0.0) UNRELEASED; urgency=low | ||
|
||
* Initial release. | ||
|
||
-- OpenMediaVault Plugin Developers <[email protected]> Wed, 28 Oct 2015 16:31:25 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Source: openmediavault-luksencryption | ||
Section: admin | ||
Priority: optional | ||
Maintainer: OpenMediaVault Plugin Developers <[email protected]> | ||
Build-Depends: debhelper (>= 9) | ||
Standards-Version: 3.9.6 | ||
XB-Plugin-Section: filesystems | ||
|
||
Package: openmediavault-luksencryption | ||
Architecture: all | ||
Depends: openmediavault (>= 1.12), cryptsetup (>= 1.4), ${misc:Depends} | ||
Description: OpenMediaVault LUKS encryption plugin | ||
LUKS is the standard for Linux hard disk encryption. By providing a | ||
standard on-disk-format, it not only facilitates compatibility | ||
among distributions, but also provides secure management of multiple | ||
user passwords. In contrast to existing solutions, LUKS stores all | ||
necessary setup information in the partition header, enabling the | ||
user to transport or migrate his data seamlessly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
|
||
Files: * | ||
Copyright: Copyright (C) 2015 OpenMediaVault Plugin Developers <[email protected]> | ||
License: GPL-3+ | ||
|
||
Files: var/www/openmediavault/images/* | ||
Copyright: Copyright (C) Keyamoon | ||
License: GPL-3+ or CC-BY-4.0 | ||
|
||
License: GPL-3+ | ||
/usr/share/common-licenses/GPL-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
usr/share/openmediavault/* usr/share/openmediavault | ||
var/www/openmediavault/* var/www/openmediavault | ||
usr/share/php/openmediavault/* usr/share/php/openmediavault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dir-or-file-in-var-www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
. /etc/default/openmediavault | ||
. /usr/share/openmediavault/scripts/helper-functions | ||
|
||
case "$1" in | ||
configure) | ||
# Activate package triggers. These triggers are only set during the | ||
# package installation. | ||
dpkg-trigger update-fixperms | ||
dpkg-trigger update-locale | ||
;; | ||
|
||
abort-upgrade|abort-remove|abort-deconfigure) | ||
;; | ||
|
||
*) | ||
echo "postinst called with unknown argument" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
. /etc/default/openmediavault | ||
. /usr/share/openmediavault/scripts/helper-functions | ||
|
||
case "$1" in | ||
purge) | ||
;; | ||
|
||
remove) | ||
;; | ||
|
||
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ||
;; | ||
|
||
*) | ||
echo "postrm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/make -f | ||
|
||
%: | ||
dh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (native) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
activate restart-engined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
/** | ||
* This file is part of OpenMediaVault. | ||
* | ||
* @license http://www.gnu.org/licenses/gpl.html GPL Version 3 | ||
* @author Volker Theile <[email protected]> | ||
* @copyright Copyright (c) 2009-2015 Volker Theile | ||
* | ||
* OpenMediaVault is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* OpenMediaVault is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
require_once("openmediavault/module.inc"); | ||
require_once("openmediavault/error.inc"); | ||
|
||
class OMVModuleLuks extends OMVModuleServiceAbstract | ||
implements OMVINotifyListener, OMVIModuleNotification { | ||
/** | ||
* Get the module name. | ||
*/ | ||
public function getName() { | ||
return "luks"; | ||
} | ||
|
||
/** | ||
* Defines the modules that if present should start before the service | ||
* provided by this module. | ||
* @return An array of modules. | ||
*/ | ||
public function shouldStart() { return array("email"); } | ||
|
||
/** | ||
* Generate the configuration. | ||
* @throw E_EXEC_FAILED | ||
*/ | ||
public function applyConfig() { | ||
$cmd = sprintf("export LANG=C; omv-mkconf %s 2>&1", $this->getName()); | ||
if(0 !== $this->exec($cmd, $output)) { | ||
throw new OMVException(OMVErrorMsg::E_EXEC_FAILED, | ||
$cmd, implode("\n", $output)); | ||
} | ||
} | ||
|
||
/** | ||
* Get the notification configuration. | ||
*/ | ||
public function getNotificationConfig() { | ||
return array( | ||
array( | ||
"id" => "luks", | ||
"type" => getText("Storage"), | ||
"title" => gettext("Encryption") | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Bind listeners. | ||
*/ | ||
function bindListeners(OMVNotifyDispatcher $dispatcher) { | ||
$dispatcher->addListener( | ||
OMV_NOTIFY_CREATE | OMV_NOTIFY_MODIFY | OMV_NOTIFY_DELETE, | ||
"org.openmediavault.system.storage.luks.container", | ||
array($this, "setDirty")); | ||
$dispatcher->addListener( | ||
OMV_NOTIFY_MODIFY, | ||
"org.openmediavault.system.email", | ||
array($this, "setDirty")); | ||
$dispatcher->addListener( | ||
OMV_NOTIFY_MODIFY, | ||
"org.openmediavault.system.notification.notifications", | ||
array($this, "setDirty")); | ||
} | ||
} | ||
|
||
// Register module. | ||
$moduleMgr = &OMVModuleMgr::getInstance(); | ||
$moduleMgr->registerModule(new OMVModuleLuks()); |
Oops, something went wrong.