Rename project from gpg-mailgate to lacre

This commit is contained in:
Piotr F. Mieszkowski 2023-12-02 18:53:28 +01:00
parent fe92f6c081
commit ce20926ce6
12 changed files with 80 additions and 63 deletions

12
cron.py
View File

@ -1,22 +1,22 @@
#!/usr/bin/python
#
# gpg-mailgate
# lacre
#
# This file is part of the gpg-mailgate source code.
# This file is part of the lacre source code.
#
# gpg-mailgate is free software: you can redistribute it and/or modify
# lacre 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
# (at your option) any later version.
#
# gpg-mailgate source code is distributed in the hope that it will be useful,
# lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
# along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
#
from configparser import RawConfigParser
@ -88,7 +88,7 @@ def define_db_schema():
return (gpgmw_keys)
# Read configuration from /etc/gpg-mailgate.conf
# Read configuration from /etc/lacre.conf
conf.load_config()
lacre.init_logging(conf.get_item('logging', 'config'))

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/
@ -29,7 +29,7 @@
$config['email_web'] = 'admin@example.com';
//address to send emails from
$config['email_from'] = 'gpg-mailgate-web@example.com';
$config['email_from'] = 'lacre-web@example.com';
//this will be used as the subject when a user requests to add a PGP key
$config['email_subject_requestpgp'] = 'Confirm your email address';

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/
@ -36,7 +36,7 @@ function includePath() {
return substr($self, 0, $lastSlash + 1);
}
//returns a relative path to the gpg-mailgate-web web root directory, without trailing slash
//returns a relative path to the lacre-web web root directory, without trailing slash
function basePath() {
$commonPath = __FILE__;
$requestPath = $_SERVER['SCRIPT_FILENAME'];

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/
@ -39,7 +39,7 @@ function checkLock($action) {
$ip = $_SERVER['REMOTE_ADDR'];
$result = databaseQuery("SELECT id, time, num FROM gpgmw_locks WHERE ip = ? AND action = ?", array($ip, $action), true);
$result = databaseQuery("SELECT id, time, num FROM lacre_locks WHERE ip = ? AND action = ?", array($ip, $action), true);
if($row = $result->fetch()) {
$id = $row['id'];
$time = $row['time'];

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,22 +1,22 @@
<?php
/*
gpg-mailgate
lacre
This file is part of the gpg-mailgate source code.
This file is part of the lacre source code.
gpg-mailgate is free software: you can redistribute it and/or modify
lacre 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
(at your option) any later version.
gpg-mailgate source code is distributed in the hope that it will be useful,
lacre source code 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 gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
along with lacre source code. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -1,5 +1,22 @@
-- confirm is empty once an email address has been confirmed, and otherwise is the confirmation key
-- status
-- lacre
--
-- This file is part of the lacre source code.
--
-- lacre 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 (at your option) any later
-- version.
--
-- lacre source code 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 lacre source code. If not, see <http://www.gnu.org/licenses/>.
-- confirm is empty once an email address has been confirmed, and otherwise is
-- the confirmation key status
-- initializes to 0
-- is set to 1 after a public key with (confirm='', status=0) has been imported
-- is set to 2 if a key should be deleted (will be deleted based on email address)
@ -22,10 +39,10 @@ CREATE TABLE lacre_locks (
num INT
);
-- GnuPG identities known to Lacre.
-- GnuPG identities known to lacre.
--
-- This table can be used instead of the file-based key store (pubring.kbx).
-- Set Lacre configuration option [keyring]type to 'database' to use this
-- Set lacre configuration option [keyring]type to 'database' to use this
-- table.
CREATE TABLE lacre_identities (
email VARCHAR (256) NOT NULL PRIMARY KEY,