From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/4] remove pvemailforward binary
Date: Fri, 21 Oct 2022 15:02:51 +0200 [thread overview]
Message-ID: <20221021130252.176316-9-f.ebner@proxmox.com> (raw)
In-Reply-To: <20221021130252.176316-1-f.ebner@proxmox.com>
which was replaced by proxmox-mail-forward living in its own package.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
bin/Makefile | 11 +++-------
bin/pvemailforward.c | 17 ---------------
bin/pvemailforward.pl | 45 ----------------------------------------
debian/lintian-overrides | 4 ----
debian/rules | 2 +-
5 files changed, 4 insertions(+), 75 deletions(-)
delete mode 100644 bin/pvemailforward.c
delete mode 100755 bin/pvemailforward.pl
diff --git a/bin/Makefile b/bin/Makefile
index fb475be3..55e5f20d 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -14,7 +14,6 @@ SCRIPTS = \
${CLITOOLS} \
pvebanner \
pveversion \
- pvemailforward.pl \
pveupgrade \
pveupdate \
pveperf \
@@ -37,7 +36,7 @@ ZSH_COMPLETIONS = \
$(addsuffix .service-zsh-completion, ${SERVICES}) \
$(addsuffix .zsh-completion, ${CLITOOLS}) \
-all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
+all: ${SERVICE_MANS} ${CLI_MANS}
%.1: %.1.pod
rm -f $@
@@ -56,20 +55,16 @@ pveversion.1.pod: pveversion
pveupgrade.1.pod: pveupgrade
pvereport.1.pod: pvereport
-pvemailforward: pvemailforward.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
-
.PHONY: check
check: $(addsuffix .service-api-verified, ${SERVICES}) $(addsuffix .api-verified, ${CLITOOLS})
rm -f *.service-api-verified *.api-verified
.PHONY: install
-install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
+install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
install -d ${BINDIR}
install -m 0755 ${SCRIPTS} ${BINDIR}
install -d ${USRSHARE}/helpers
install -m 0755 pve-startall-delay ${USRSHARE}/helpers
- install -s -m 2755 -g www-data pvemailforward ${BINDIR}
install -d ${MAN1DIR}
install -m 0644 ${CLI_MANS} ${MAN1DIR}
install -d ${MAN8DIR}
@@ -82,7 +77,7 @@ install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETION
.PHONY: clean
clean:
make cleanup-docgen
- rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward \
+ rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod \
*.bash-completion *.service-bash-completion \
*.zsh-completion *.service-zsh-completion \
*.api-verified *.service-api-verified
diff --git a/bin/pvemailforward.c b/bin/pvemailforward.c
deleted file mode 100644
index 06013a63..00000000
--- a/bin/pvemailforward.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* see 'man perlsec'
- *
- */
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define REAL_PATH "/usr/bin/pvemailforward.pl"
-
-int main(int argc, char **argv)
-{
- execv(REAL_PATH, argv);
-
- fprintf(stderr, "exec '%s' failed\n", REAL_PATH);
-
- exit(-1);
-}
diff --git a/bin/pvemailforward.pl b/bin/pvemailforward.pl
deleted file mode 100755
index 18a57497..00000000
--- a/bin/pvemailforward.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-use PVE::Tools;
-use PVE::SafeSyslog;
-use PVE::AccessControl;
-use PVE::Cluster qw (cfs_read_file);
-use PVE::DataCenterConfig;
-
-# NOTE: we need to run this with setgid www-data
-# else we cant read /etc/pve/user.cfg
-
-$( = $); # $GID = $EGID
-
-$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
-
-initlog('pvemailforward');
-
-
-PVE::Cluster::cfs_update();
-
-eval {
- my $usercfg = cfs_read_file("user.cfg");
- my $rootcfg = $usercfg->{users}->{'root@pam'} || {};
- my $mailto = $rootcfg->{email};
-
- my $dcconf = cfs_read_file('datacenter.cfg');
- my $mailfrom = $dcconf->{email_from} || "root";
-
- die "user 'root\@pam' does not have a email address\n" if !$mailto;
-
- syslog("info", "forward mail to <$mailto>");
-
- # we never send DSN (avoid mail loops)
- open(CMD, "|sendmail -bm -N never -f $mailfrom $mailto") ||
- die "can't exec sendmail - $!\n";
- while (<>) { print CMD $_; }
- close(CMD);
-};
-if (my $err = $@) {
- syslog('err', "mail forward failed: $err");
-}
-
-exit(0);
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index fba73dcf..e30e7054 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -1,11 +1,7 @@
pve-manager: mail-transport-agent-dependency-does-not-specify-default-mta *
pve-manager: no-manual-page usr/bin/pvebanner
-pve-manager: no-manual-page usr/bin/pvemailforward
-pve-manager: no-manual-page usr/bin/pvemailforward.pl
pve-manager: no-manual-page usr/bin/pveupdate
pve-manager: non-standard-dir-perm var/log/pveproxy/ 0700 != 0755
pve-manager: package-installs-apt-sources etc/apt/sources.list.d/pve-enterprise.list
pve-manager: privacy-breach-generic usr/share/pve-manager/touch/sencha-touch-all-debug.js *
-pve-manager: script-with-language-extension usr/bin/pvemailforward.pl
-pve-manager: setgid-binary usr/bin/pvemailforward 2755 root/www-data
pve-manager: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/pvebanner.service getty.target
diff --git a/debian/rules b/debian/rules
index ec49d52d..f28352e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,4 +13,4 @@ override_dh_strip_nondeterminism:
dh_strip_nondeterminism -X.png
override_dh_fixperms:
- dh_fixperms -Xpvemailforward -Xvar/log/pveproxy
+ dh_fixperms -Xvar/log/pveproxy
--
2.30.2
WARNING: multiple messages have this Message-ID
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH manager 3/4] remove pvemailforward binary
Date: Fri, 21 Oct 2022 15:02:51 +0200 [thread overview]
Message-ID: <20221021130252.176316-9-f.ebner@proxmox.com> (raw)
In-Reply-To: <20221021130252.176316-1-f.ebner@proxmox.com>
which was replaced by proxmox-mail-forward living in its own package.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
bin/Makefile | 11 +++-------
bin/pvemailforward.c | 17 ---------------
bin/pvemailforward.pl | 45 ----------------------------------------
debian/lintian-overrides | 4 ----
debian/rules | 2 +-
5 files changed, 4 insertions(+), 75 deletions(-)
delete mode 100644 bin/pvemailforward.c
delete mode 100755 bin/pvemailforward.pl
diff --git a/bin/Makefile b/bin/Makefile
index fb475be3..55e5f20d 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -14,7 +14,6 @@ SCRIPTS = \
${CLITOOLS} \
pvebanner \
pveversion \
- pvemailforward.pl \
pveupgrade \
pveupdate \
pveperf \
@@ -37,7 +36,7 @@ ZSH_COMPLETIONS = \
$(addsuffix .service-zsh-completion, ${SERVICES}) \
$(addsuffix .zsh-completion, ${CLITOOLS}) \
-all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
+all: ${SERVICE_MANS} ${CLI_MANS}
%.1: %.1.pod
rm -f $@
@@ -56,20 +55,16 @@ pveversion.1.pod: pveversion
pveupgrade.1.pod: pveupgrade
pvereport.1.pod: pvereport
-pvemailforward: pvemailforward.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
-
.PHONY: check
check: $(addsuffix .service-api-verified, ${SERVICES}) $(addsuffix .api-verified, ${CLITOOLS})
rm -f *.service-api-verified *.api-verified
.PHONY: install
-install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
+install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
install -d ${BINDIR}
install -m 0755 ${SCRIPTS} ${BINDIR}
install -d ${USRSHARE}/helpers
install -m 0755 pve-startall-delay ${USRSHARE}/helpers
- install -s -m 2755 -g www-data pvemailforward ${BINDIR}
install -d ${MAN1DIR}
install -m 0644 ${CLI_MANS} ${MAN1DIR}
install -d ${MAN8DIR}
@@ -82,7 +77,7 @@ install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETION
.PHONY: clean
clean:
make cleanup-docgen
- rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward \
+ rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod \
*.bash-completion *.service-bash-completion \
*.zsh-completion *.service-zsh-completion \
*.api-verified *.service-api-verified
diff --git a/bin/pvemailforward.c b/bin/pvemailforward.c
deleted file mode 100644
index 06013a63..00000000
--- a/bin/pvemailforward.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* see 'man perlsec'
- *
- */
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define REAL_PATH "/usr/bin/pvemailforward.pl"
-
-int main(int argc, char **argv)
-{
- execv(REAL_PATH, argv);
-
- fprintf(stderr, "exec '%s' failed\n", REAL_PATH);
-
- exit(-1);
-}
diff --git a/bin/pvemailforward.pl b/bin/pvemailforward.pl
deleted file mode 100755
index 18a57497..00000000
--- a/bin/pvemailforward.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-use PVE::Tools;
-use PVE::SafeSyslog;
-use PVE::AccessControl;
-use PVE::Cluster qw (cfs_read_file);
-use PVE::DataCenterConfig;
-
-# NOTE: we need to run this with setgid www-data
-# else we cant read /etc/pve/user.cfg
-
-$( = $); # $GID = $EGID
-
-$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
-
-initlog('pvemailforward');
-
-
-PVE::Cluster::cfs_update();
-
-eval {
- my $usercfg = cfs_read_file("user.cfg");
- my $rootcfg = $usercfg->{users}->{'root@pam'} || {};
- my $mailto = $rootcfg->{email};
-
- my $dcconf = cfs_read_file('datacenter.cfg');
- my $mailfrom = $dcconf->{email_from} || "root";
-
- die "user 'root\@pam' does not have a email address\n" if !$mailto;
-
- syslog("info", "forward mail to <$mailto>");
-
- # we never send DSN (avoid mail loops)
- open(CMD, "|sendmail -bm -N never -f $mailfrom $mailto") ||
- die "can't exec sendmail - $!\n";
- while (<>) { print CMD $_; }
- close(CMD);
-};
-if (my $err = $@) {
- syslog('err', "mail forward failed: $err");
-}
-
-exit(0);
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index fba73dcf..e30e7054 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -1,11 +1,7 @@
pve-manager: mail-transport-agent-dependency-does-not-specify-default-mta *
pve-manager: no-manual-page usr/bin/pvebanner
-pve-manager: no-manual-page usr/bin/pvemailforward
-pve-manager: no-manual-page usr/bin/pvemailforward.pl
pve-manager: no-manual-page usr/bin/pveupdate
pve-manager: non-standard-dir-perm var/log/pveproxy/ 0700 != 0755
pve-manager: package-installs-apt-sources etc/apt/sources.list.d/pve-enterprise.list
pve-manager: privacy-breach-generic usr/share/pve-manager/touch/sencha-touch-all-debug.js *
-pve-manager: script-with-language-extension usr/bin/pvemailforward.pl
-pve-manager: setgid-binary usr/bin/pvemailforward 2755 root/www-data
pve-manager: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/pvebanner.service getty.target
diff --git a/debian/rules b/debian/rules
index ec49d52d..f28352e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,4 +13,4 @@ override_dh_strip_nondeterminism:
dh_strip_nondeterminism -X.png
override_dh_fixperms:
- dh_fixperms -Xpvemailforward -Xvar/log/pveproxy
+ dh_fixperms -Xvar/log/pveproxy
--
2.30.2
next prev parent reply other threads:[~2022-10-21 13:03 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 13:02 [pve-devel] [PATCH-SERIES proxmox{, -mail-forward, -backup}/pve-manager] add proxmox-mail-forward helper binary Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox 1/1] section config: parse additional properties when schema allows it Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-24 11:47 ` [pve-devel] applied: " Wolfgang Bumiller
2022-10-24 11:47 ` [pbs-devel] " Wolfgang Bumiller
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-mail-forward 1/3] initial commit Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-11-10 10:46 ` [pve-devel] applied: " Wolfgang Bumiller
2022-11-10 10:46 ` [pbs-devel] " Wolfgang Bumiller
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-mail-forward 2/3] add Debian packaging Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-mail-forward 3/3] d/postinst: register binary in .forward Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-backup 1/1] fix #4287: d/control: recommend proxmox-mail-forward Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-11-10 10:49 ` [pve-devel] applied: " Wolfgang Bumiller
2022-11-10 10:49 ` [pbs-devel] " Wolfgang Bumiller
2022-10-21 13:02 ` [pve-devel] [PATCH manager 1/4] d/control: depend on proxmox-mail-forward Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH manager 2/4] d/postinst: replace pvemailforward with proxmox-mail-forward Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` Fiona Ebner [this message]
2022-10-21 13:02 ` [pbs-devel] [PATCH manager 3/4] remove pvemailforward binary Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH manager 4/4] d/control: drop ${shlibs:Depends} for pve-manager Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-11-10 11:11 ` [pve-devel] " Thomas Lamprecht
2022-11-10 11:11 ` [pbs-devel] " Thomas Lamprecht
2022-11-10 10:58 ` [pve-devel] applied-series: [PATCH-SERIES proxmox{, -mail-forward, -backup}/pve-manager] add proxmox-mail-forward helper binary Wolfgang Bumiller
2022-11-10 10:58 ` [pbs-devel] " Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221021130252.176316-9-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal