* Sun Sep 22 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-13.sme
- fix mail spool perms [SME: 12654] - fix motd noise related to cockpit [SME: 12575] - fix /run vs /var/run temps dir noise [SME: 12639]
This commit is contained in:
parent
8e4fd3be1e
commit
5a1f39efb3
@ -326,6 +326,7 @@ event_link("conf-routes", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
event_link("systemd-isolate", $event, "89");
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("fix-noise-el8", $event, "89");
|
||||
event_link("raidmonitor-check", $event, "92");
|
||||
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/network");
|
||||
@ -458,6 +459,7 @@ event_link("conf-modules", $event, "30");
|
||||
event_link("create-mnt-floppy", $event, "50");
|
||||
event_link("systemd-default", $event, "88");
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("fix-noise-el8", $event, "89");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for post-upgrade event
|
||||
@ -470,6 +472,7 @@ templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $even
|
||||
event_link("systemd-journald", $event, "02");
|
||||
event_link("fix-startup", $event, "05");
|
||||
event_link("init-accounts", $event, "05");
|
||||
event_link("mail-spool-fix", $event, "05");
|
||||
event_link("logrotate-migrate", $event, "06");
|
||||
event_link("rotate_logfiles", $event, "07");
|
||||
event_link("conf-startup", $event, "10");
|
||||
@ -513,6 +516,7 @@ $event = "user-create";
|
||||
event_link("user-create-unix", $event, "04");
|
||||
event_link("count-active-user-accounts", $event, "25");
|
||||
event_link("user-group-modify", $event, "85");
|
||||
event_link("mail-spool-fix", $event, "89");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for user-delete event
|
||||
@ -524,6 +528,7 @@ event_link("user-delete-groups-and-pseudonyms", $event, "02");
|
||||
event_link("user-delete-unix", $event, "15");
|
||||
event_link("initialize-default-databases", $event, "23");
|
||||
event_link("count-active-user-accounts", $event, "25");
|
||||
event_link("mail-spool-fix", $event, "89");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for user-modify event
|
||||
@ -625,6 +630,7 @@ templates2events("/home/e-smith/ssl.pem/pem", $event);
|
||||
$event = "email-update";
|
||||
event_link("systemd-default", $event, "88");
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("mail-spool-fix", $event, "89");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for webapps-update event
|
||||
|
@ -0,0 +1,2 @@
|
||||
# cockpit noise [SME: 12575]
|
||||
cockpit-ws:any:ln -sfn /dev/null /etc/motd.d/cockpit
|
4
root/etc/e-smith/events/actions/fix-noise-el8
Normal file
4
root/etc/e-smith/events/actions/fix-noise-el8
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# remove cockpit alert forever [SME: 12575]
|
||||
ln -sfn /dev/null /etc/motd.d/cockpit
|
||||
|
47
root/etc/e-smith/events/actions/mail-spool-fix
Normal file
47
root/etc/e-smith/events/actions/mail-spool-fix
Normal file
@ -0,0 +1,47 @@
|
||||
#! /bin/bash
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2023 Koozali SME Server
|
||||
#
|
||||
# This program 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 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
# fix ownership of spool folder content
|
||||
pushd /var/spool/mail/ >/dev/null
|
||||
for file in *; do
|
||||
if [ ! -f "$file" ]; then
|
||||
continue
|
||||
fi
|
||||
if ( ! `id -u $file 2>/dev/null 1>&2`) ; then
|
||||
echo "$file user does not exist deleting mail spool file"
|
||||
rm -f /var/spool/mail/$file
|
||||
continue
|
||||
fi
|
||||
userf=$(stat -c %U /var/spool/mail/$file 2>/dev/null)
|
||||
if [[ "$userf" != "$file" ]]; then
|
||||
uidf=$(stat -c %u /var/spool/mail/$file 2>/dev/null)
|
||||
uiduser=$(id -u $file 2>/dev/null )
|
||||
# extra step needed if username has an alias eg www=apache
|
||||
if [[ "$uidf" != "$uiduser" ]]; then
|
||||
echo "fixing ownership of $file spool mail"
|
||||
# extra security we want to clean it from sensitive information
|
||||
echo ""> /var/spool/mail/$file
|
||||
chown $file /var/spool/mail/$file
|
||||
fi
|
||||
fi
|
||||
done
|
||||
popd >/dev/null
|
||||
|
1
root/etc/tmpfiles.d/portreserve.conf
Normal file
1
root/etc/tmpfiles.d/portreserve.conf
Normal file
@ -0,0 +1 @@
|
||||
d /run/portreserve 0755 root root 10d
|
@ -4,7 +4,7 @@ Summary: smeserver server and gateway - base module
|
||||
%define name smeserver-base
|
||||
Name: %{name}
|
||||
%define version 11.0.0
|
||||
%define release 12
|
||||
%define release 13
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
License: GPL
|
||||
@ -184,6 +184,11 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Sep 22 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-13.sme
|
||||
- fix mail spool perms [SME: 12654]
|
||||
- fix motd noise related to cockpit [SME: 12575]
|
||||
- fix /run vs /var/run temps dir noise [SME: 12639]
|
||||
|
||||
* Wed Aug 14 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-12.sme
|
||||
- fix 3 regressions from SME10 [SME: 12654]
|
||||
fix www missing from shared and few groups [SME: 12146]
|
||||
|
Loading…
Reference in New Issue
Block a user