Compare commits
6 Commits
5.8.1-31
...
11_0_0-4_e
Author | SHA1 | Date | |
---|---|---|---|
0777b5a082 | |||
081e7b8655 | |||
bf9623d5a6 | |||
2c47cd35b6 | |||
9a56b9e87b | |||
097e08312b |
@@ -315,7 +315,6 @@ event_link("rmmod-bonding", $event, "10");
|
||||
event_link("conf-startup", $event, "10");
|
||||
event_link("user-lock-passwd", $event, "15");
|
||||
event_link("group-modify-unix", $event, "15");
|
||||
event_link("user-rsshd", $event, "16");
|
||||
event_link("update-passwd", $event, "20");
|
||||
event_link("count-active-user-accounts", $event, "25");
|
||||
event_link("conf-modules", $event, "30");
|
||||
@@ -343,7 +342,6 @@ templates2events("/etc/smartmontools/smartd.conf", $event);
|
||||
templates2events("/home/e-smith/ssl.pem/pem", $event);
|
||||
templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event);
|
||||
event_link("set-hostname", $event, "10");
|
||||
event_link("user-rsshd", $event, "16");
|
||||
event_link("conf-modules", $event, "30");
|
||||
event_link("conf-startup", $event, "60");
|
||||
event_link("systemd-default", $event, "88");
|
||||
@@ -454,7 +452,6 @@ event_link("init-accounts", $event, "05");
|
||||
event_link("rotate_logfiles", $event, "07");
|
||||
event_link("init-passwords", $event, "10");
|
||||
event_link("conf-startup", $event, "10");
|
||||
event_link("user-rsshd", $event, "16");
|
||||
event_link("conf-modules", $event, "30");
|
||||
event_link("create-mnt-floppy", $event, "50");
|
||||
event_link("systemd-default", $event, "88");
|
||||
@@ -476,7 +473,6 @@ event_link("rotate_logfiles", $event, "07");
|
||||
event_link("conf-startup", $event, "10");
|
||||
event_link("user-lock-passwd", $event, "15");
|
||||
event_link("group-modify-unix", $event, "15");
|
||||
event_link("user-rsshd", $event, "16");
|
||||
event_link("update-passwd", $event, "20");
|
||||
event_link("count-active-user-accounts", $event, "25");
|
||||
event_link("conf-modules", $event, "30");
|
||||
@@ -513,7 +509,6 @@ event_link("systemd-reload", $event, "89");
|
||||
$event = "user-create";
|
||||
|
||||
event_link("user-create-unix", $event, "04");
|
||||
event_link("user-rsshd", $event, "16");
|
||||
event_link("count-active-user-accounts", $event, "25");
|
||||
event_link("user-group-modify", $event, "85");
|
||||
|
||||
@@ -535,7 +530,6 @@ event_link("count-active-user-accounts", $event, "25");
|
||||
$event = "user-modify";
|
||||
|
||||
event_link("user-modify-unix", $event, "15");
|
||||
event_link("user-rsshd", $event, "16");
|
||||
event_link("user-group-modify", $event, "85");
|
||||
|
||||
$event = "user-modify-admin";
|
||||
|
@@ -20,7 +20,7 @@ my $filename = "/etc/systemd/system-preset/49-koozali.preset";
|
||||
my $filename2 = "/usr/lib/systemd/system/sme-server.target.d/50koozali.conf";
|
||||
my %services;
|
||||
my %files;
|
||||
my @WantedBy;
|
||||
my @WantedBy;my %wantedBy;
|
||||
|
||||
# expand preset file
|
||||
esmith::templates::processTemplate({
|
||||
@@ -36,7 +36,7 @@ esmith::templates::processTemplate({
|
||||
});
|
||||
|
||||
# make sure our target is enabled
|
||||
system("/usr/bin/systemctl enable sme-server.target");
|
||||
system("/usr/bin/systemctl enable sme-server.target 2>/dev/null");
|
||||
# force the main default target in /usr/lib
|
||||
#ln -fs sme-server.target /lib/systemd/system/default.target
|
||||
my $old_qfn = "sme-server.target";
|
||||
@@ -76,7 +76,7 @@ foreach my $d (@presetdirpaths) {
|
||||
my $smewants = `grep -P '^Wants=' /usr/lib/systemd/system/sme-server.target -rs`;
|
||||
chomp $smewants;
|
||||
my @smematches = ( $smewants =~ /([a-zA-Z0-9\-_]+\.service)/g );
|
||||
|
||||
my %smewants = map { $_ => 1 } @smematches;
|
||||
|
||||
# parse all files on reverse order : lower number take precedence
|
||||
# we ignore joker lines *
|
||||
@@ -111,15 +111,15 @@ foreach my $filen (reverse sort keys %files) {
|
||||
$services{$service}=$stats;
|
||||
|
||||
# list all Services explicitely listed in preset that are also in Wants= or with WantedBy= sme-server.target
|
||||
next if (/^$service$/ ~~ @WantedBy);
|
||||
if ( /^$service$/ ~~ @smematches ) {
|
||||
push(@WantedBy, $service);
|
||||
next if ( exists($wantedBy{$service}));
|
||||
if (exists($smewants{$service}) ) {
|
||||
$wantedBy{$service}=1;
|
||||
#print "want $service \n";
|
||||
}
|
||||
else {
|
||||
my $wanted = `grep -P '^WantedBy=.*sme-server.target' /usr/lib/systemd/system/$service* /etc/systemd/system/$service* -rsh` ;
|
||||
chomp $wanted;
|
||||
push(@WantedBy , $service) unless ( $wanted eq "") ;
|
||||
$wantedBy{$service}=1 unless ( $wanted eq "");
|
||||
#print "want $service \n" unless ( $wanted eq "") ;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ foreach my $fi (@dirfiles) {
|
||||
next;
|
||||
}
|
||||
# if not wanted remove
|
||||
unless ( /^$fi$/ ~~ @WantedBy) {
|
||||
unless ( exists($wantedBy{$fi})){
|
||||
print "remove $d$fi as not declared as WantedBy or in Wants for sme-server.target\n";
|
||||
unlink "$d$fi";
|
||||
}
|
||||
@@ -176,7 +176,7 @@ foreach my $fi (@dirfiles) {
|
||||
# we only do it for sme-server.target, ignoring the remaining of WantedBy
|
||||
foreach my $service (sort keys %services) {
|
||||
my $wanted= "not";
|
||||
$wanted = "want" if ( /^$service$/ ~~ @WantedBy );
|
||||
$wanted = "want" if ( exists($wantedBy{$service}));#( /^$service$/ ~~ @WantedBy );
|
||||
my $status = $services{$service};
|
||||
my $linkedU = ( -e "/usr/lib/systemd/system/sme-server.target.wants/$service" ) ? "linked" : "not";
|
||||
my $linkedE = ( -e "/etc/systemd/system/sme-server.target.wants/$service" ) ? "linked" : "not";
|
||||
@@ -223,8 +223,7 @@ foreach my $fi (@dirfiles) {
|
||||
my $service = $fi;
|
||||
my $wanted = `grep -P '^WantedBy=.*sme-server.target' /usr/lib/systemd/system/$service* /etc/systemd/system/$service* -rsh` ;
|
||||
chomp $wanted;
|
||||
#unless ( /^$fi$/ ~~ @WantedBy ) {
|
||||
unless (grep(/^$fi$/, @WantedBy ) ) {
|
||||
unless ( exists($wantedBy{$fi})) {
|
||||
print "$d$fi is not declared as WantedBy or in Wants for sme-server.target\n";
|
||||
}
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ my $company = $acct->prop('Company') || '';
|
||||
my $dept = $acct->prop('Dept') || '';
|
||||
my $city = $acct->prop('City') || '';
|
||||
my $street = $acct->prop('Street') || '';
|
||||
my $shell = $acct->prop('Shell') || '/usr/bin/rssh';
|
||||
my $shell = $acct->prop('Shell') || '/usr/bin/false';
|
||||
my $groups = "shared";
|
||||
|
||||
if ($ldapauth ne 'enabled')
|
||||
|
@@ -39,7 +39,7 @@ my ($user, $colon, @old_groups) = split(' ', `/usr/bin/groups $userName`);
|
||||
# actions for all these groups
|
||||
my %modified_groups = map { $_, 1 } @old_groups, $acctdb->user_group_list($userName);
|
||||
# but omit "shared" and user private group
|
||||
foreach ('shared', $userName, 'rsshusers')
|
||||
foreach ('shared', $userName)
|
||||
{
|
||||
delete $modified_groups{$_} if exists $modified_groups{$_};
|
||||
}
|
||||
|
@@ -79,9 +79,9 @@ foreach my $u (@users)
|
||||
my ($comment, $shell) = (getpwnam($userName))[6,8];
|
||||
endpwent;
|
||||
my $new_shell = $u->prop('Shell')
|
||||
|| (($shell eq "/bin/sshell") ? "/usr/bin/rssh" : $shell);
|
||||
|| (($shell eq "/bin/sshell") ? "/usr/bin/false" : $shell);
|
||||
|
||||
$u->set_prop('Shell', $new_shell) unless (not defined $u->prop('Shell') && $new_shell eq "/usr/bin/rssh" ) ;
|
||||
$u->set_prop('Shell', $new_shell) unless (not defined $u->prop('Shell') && $new_shell eq "/usr/bin/false" ) ;
|
||||
|
||||
my $result;
|
||||
#------------------------------------------------------------
|
||||
|
@@ -1,57 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
use File::Temp;
|
||||
|
||||
sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
|
||||
|
||||
my $conf = esmith::ConfigDB->open_ro;
|
||||
my $accounts = esmith::AccountsDB->open;
|
||||
|
||||
my $ldapauth = $conf->get('ldap')->prop('Authentication') || 'disabled';
|
||||
my $x = 0; # exit value
|
||||
|
||||
my $groupName = 'rsshusers';
|
||||
my $gid = getgrnam($groupName);
|
||||
my $tmpattr = File::Temp->new();
|
||||
|
||||
my $event = $ARGV[0];
|
||||
my $userName = $ARGV[1];
|
||||
# finallement get all user
|
||||
my @users = (not defined $ARGV[1])? $accounts->get_all_by_prop(type => "user" ) : map { $accounts->get($_); } $userName;
|
||||
my @currents=split /\n/, `/usr/sbin/lid -ng rsshusers`;
|
||||
@currents=map { trim($_) } @currents;
|
||||
|
||||
# here we could be emptying group, but we might want to let system user on this list.
|
||||
#if ( $event ~~ ['user-modify','user-create'] ) {
|
||||
# system("/usr/bin/gpasswd","-M ''", "rsshusers");
|
||||
# print "deleting rsshusers group content ...";
|
||||
#}
|
||||
|
||||
foreach my $user (@users) {
|
||||
my $cuser=$user->key;
|
||||
# we remove users that should not be there
|
||||
if ( defined $user->prop('Shell') && $user->prop('Shell') ne '/usr/bin/rssh') {
|
||||
next unless ( "$cuser" ~~ @currents ) ;
|
||||
system("/usr/bin/gpasswd", "-d", $cuser, "rsshusers");
|
||||
next;
|
||||
}
|
||||
# next if the user is already there
|
||||
print $tmpattr "memberUid: $cuser\n";
|
||||
next if ( "$cuser" ~~ @currents ) ;
|
||||
print "Adding user $cuser to group rsshusers";
|
||||
system("/usr/sbin/usermod", "-a", "-G", "rsshusers", $cuser);
|
||||
|
||||
}
|
||||
|
||||
# add all users to rsshusers
|
||||
system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "groupmod", "-a", "$tmpattr", "$groupName") == 0
|
||||
or
|
||||
system( "/usr/sbin/cpu", "groupadd", "-g", $gid, "-a", "$tmpattr", $groupName ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255 , warn "Failed to create (ldap) group $groupName.\n" );
|
||||
|
||||
exit ($x);
|
@@ -1 +1 @@
|
||||
DEFAULT_SHELL = /usr/bin/rssh
|
||||
DEFAULT_SHELL = /usr/bin/false
|
||||
|
@@ -1,16 +1 @@
|
||||
# no packages own wtmp and btmp -- we'll rotate them here
|
||||
/var/log/wtmp \{
|
||||
monthly
|
||||
create 0664 root utmp
|
||||
minsize 1M
|
||||
rotate 1
|
||||
\}
|
||||
|
||||
/var/log/btmp \{
|
||||
missingok
|
||||
monthly
|
||||
create 0600 root utmp
|
||||
rotate 1
|
||||
\}
|
||||
|
||||
# system-specific logs may be also be configured here.
|
||||
|
@@ -1 +0,0 @@
|
||||
/usr/bin/rssh
|
@@ -1 +1 @@
|
||||
SYSLOGD_OPTIONS="-c 5"
|
||||
SYSLOGD_OPTIONS=""
|
||||
|
@@ -42,7 +42,7 @@
|
||||
/proc/interrupts
|
||||
/proc/ioports
|
||||
/proc/bus/pci/devices
|
||||
/proc/rtc
|
||||
/proc/driver/rtc
|
||||
/proc/uptime
|
||||
)),
|
||||
"$KeySize")
|
||||
|
@@ -53,7 +53,7 @@ sub key_exists_good_size {
|
||||
# check key size openssl rsa -in /home/e-smith/ssl.key/$host.$domain.key -text -noout | sed -rn "s/Private-Key: \((.*) bit\)/\1/p"
|
||||
my $signatureKeySize = `openssl rsa -in $key -text -noout | grep "Private-Key" | head -1`;
|
||||
chomp $signatureKeySize;
|
||||
$signatureKeySize =~ s/^ *Private-Key: \((.*) bit\)/$1/p;
|
||||
$signatureKeySize =~ s/^.*Private-Key: \((.*) bit.*\)/$1/p;
|
||||
if ( $signatureKeySize == $KeySize ) {
|
||||
#print "key size is correct ($KeySize)\n";
|
||||
# key exists and key size is correct, we can proceed
|
||||
@@ -86,7 +86,7 @@ sub cert_exists_good_size {
|
||||
#openssl x509 -text -noout -in /home/e-smith/ssl.crt/$host.$domain.crt| sed -rn "s/Public-Key: \((.*) bit\)/\1/p"
|
||||
my $signatureKeySize = `openssl x509 -text -noout -in $crt | grep "Public-Key" | head -1`;
|
||||
chomp $signatureKeySize;
|
||||
$signatureKeySize =~ s/^ *Public-Key: \((.*) bit\)/$1/p;
|
||||
$signatureKeySize =~ s/^.*Public-Key: \((.*) bit\)/$1/p;
|
||||
if ( $signatureKeySize == $KeySize ) {
|
||||
#print "$signatureKeySize\n";
|
||||
# cert is correct size and exists, we can proceed.
|
||||
|
@@ -3,8 +3,8 @@
|
||||
Summary: smeserver server and gateway - base module
|
||||
%define name smeserver-base
|
||||
Name: %{name}
|
||||
%define version 5.8.1
|
||||
%define release 31
|
||||
%define version 11.0.0
|
||||
%define release 4
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
License: GPL
|
||||
@@ -15,11 +15,14 @@ Source: %{name}-%{version}.tar.xz
|
||||
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
||||
Requires: pwauth
|
||||
Requires: e-smith-lib >= 2.2.0-2
|
||||
Requires: smeserver-lib >= 2.2.0-2
|
||||
Requires: server-manager-images, server-manager
|
||||
Requires: e-smith-formmagick >= 1.4.0-12
|
||||
Requires: smeserver-formmagick >= 1.4.0-12
|
||||
Requires: plymouth
|
||||
Requires: initscripts >= 6.67-1es17
|
||||
Requires: e-smith-daemontools >= 1.7.1-04
|
||||
Requires: network-scripts
|
||||
Requires: rsyslog
|
||||
Requires: smeserver-daemontools >= 1.7.1-04
|
||||
Requires: perl(Locale::gettext)
|
||||
Requires: perl(Crypt::Cracklib)
|
||||
Requires: perl(Date::Manip)
|
||||
@@ -30,21 +33,19 @@ Requires: /usr/sbin/irqbalance
|
||||
Requires: /usr/sbin/smartd
|
||||
Requires: dbus
|
||||
Requires: acpid
|
||||
Requires: rssh
|
||||
Requires: bridge-utils
|
||||
Requires: vconfig
|
||||
Requires: e-smith-bootloader
|
||||
Requires: smeserver-bootloader
|
||||
Requires: mdadm
|
||||
Requires: pv
|
||||
Requires: dhcp
|
||||
Requires: dhcp-server
|
||||
Requires: diald
|
||||
Requires: /usr/bin/passwd
|
||||
Requires: nss-pam-ldapd
|
||||
Requires: uuid-perl
|
||||
Requires: perl-Data-UUID
|
||||
Requires: kbd
|
||||
Requires: bash-completion
|
||||
Requires: bash-completion-extras
|
||||
Requires: e-smith-runit >= 2.6.0-7
|
||||
Requires: smeserver-runit >= 2.6.0-7
|
||||
Requires: smeserver-php >= 3.0.0-22
|
||||
Requires: smeserver-yum >= 2.6.0-43
|
||||
Obsoletes: nss_ldap < 254
|
||||
@@ -59,7 +60,7 @@ Obsoletes: e-smith-dynamicdns-tzo
|
||||
Obsoletes: e-smith-dynamicdns-dyndns.org
|
||||
Obsoletes: e-smith-dynamicdns-dyndns
|
||||
BuildRequires: perl, perl(Test::Inline) >= 0.12
|
||||
BuildRequires: e-smith-devtools >= 1.13.1-03
|
||||
BuildRequires: smeserver-devtools >= 1.13.1-03
|
||||
BuildRequires: gettext
|
||||
Requires: gdisk
|
||||
|
||||
@@ -89,7 +90,7 @@ xgettext -L perl -o root/usr/share/locale/en_US/LC_MESSAGES/server-console.po ro
|
||||
perl createlinks
|
||||
/sbin/e-smith/buildtests 10e-smith-base
|
||||
|
||||
gcc -o root/sbin/e-smith/console console_wrapper.c
|
||||
gcc -g -o root/sbin/e-smith/console console_wrapper.c
|
||||
|
||||
# Force creation of potentially empty directories
|
||||
mkdir -p root/etc/e-smith/web/panels/password/cgi-bin
|
||||
@@ -180,6 +181,29 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Mar 26 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-4.sme
|
||||
- fix networking [SME: 12541]
|
||||
- require rsyslog [SME: 12544]
|
||||
- remove unsupported rsyslog option -c [SME: 12545]
|
||||
- remove duplicate entry logrotate for btmp and wtmp [SME: 12547]
|
||||
- rework systemd-default script (error and smartmatches) [SME: 12543]
|
||||
- fix self signed cert templates [SME: 12551]
|
||||
|
||||
* Sat Mar 23 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-3.sme
|
||||
- fix requirement for el8 SME11 [SME: 12521]
|
||||
|
||||
* Sat Mar 23 2024 Brian Read <brianr@koozali.org>11.0.0-2.sme
|
||||
- Change Requires: e-smith- to Requires:smeserver-
|
||||
|
||||
* Sat Mar 23 2024 Brian Read <brianr@koozali.org>11.0.0-1.sme
|
||||
- Update Release and Version to base version and 1st release for SME11 [SME: 12518]
|
||||
|
||||
* Thu Mar 14 2024 Jean-Philippe Pialasse <jpp@koozali.org> 5.8.1-33.sme
|
||||
- drop rssh support and requirement [SME: 12509]
|
||||
|
||||
* Tue Mar 12 2024 Jean-Philippe Pialasse <jpp@koozali.org> 5.8.1-32.sme
|
||||
- add gcc -g flag to allow el8 build
|
||||
|
||||
* Mon Mar 11 2024 rename-e-smith-pkg.sh by Trevor Batley <trevor@batley.id.au> 5.8.1-31.sme
|
||||
- Rename to smeserver-base [SME: 12359]
|
||||
|
||||
|
Reference in New Issue
Block a user