This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from 03223b5 x2gobroker.spec: commands don't seem to work when wrapped in curly braces (at least on *SuSE), so revert. new ce8b512 src/x2gobroker-{agent,ssh}.c: catch errors in setuid wrappers and add general return clause to make compilers happy. new 4f84c06 Makefile: make sure that we actually append our custom CFLAGS and LDFLAGS values, even if passed in through the make command line. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: Makefile | 6 +++--- debian/changelog | 4 ++++ src/x2gobroker-agent.c | 18 ++++++++++++++++-- src/x2gobroker-ssh.c | 17 +++++++++++++++-- 4 files changed, 38 insertions(+), 7 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 4f84c06a2f2ef369d0f0ad3589a95875cfb7df1b Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Nov 13 15:45:25 2018 +0100 Makefile: make sure that we actually append our custom CFLAGS and LDFLAGS values, even if passed in through the make command line. --- Makefile | 6 +++--- debian/changelog | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e572796..23e50b8 100755 --- a/Makefile +++ b/Makefile @@ -26,9 +26,9 @@ INSTALL_FILE=install -m 644 INSTALL_PROGRAM=install -m 755 INSTALL_SYMLINK=ln -sf -CC ?= gcc -CFLAGS += -fPIE -LDFLAGS += -pie +CC ?= gcc +override CFLAGS += -fPIE +override LDFLAGS += -pie RM_FILE=rm -f RM_DIR=rmdir -p --ignore-fail-on-non-empty diff --git a/debian/changelog b/debian/changelog index 9e2dbfa..d1fd388 100644 --- a/debian/changelog +++ b/debian/changelog @@ -119,6 +119,8 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium * New upstream version (0.0.4.0): - src/x2gobroker-{agent,ssh}.c: catch errors in setuid wrappers and add general return clause to make compilers happy. + - Makefile: make sure that we actually append our custom CFLAGS and + LDFLAGS values, even if passed in through the make command line. * x2gobroker.spec: - Add %debug_package macro when debugging is to be enabled, hoping that it will actually generate proper debuginfo (and -source) sub packages -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
Hi Mihai, why would we want to do the below??? Also note that a similar wrapper is in x2goserver: https://code.x2go.org/gitweb?p=x2goserver.git;a=blob;f=libx2go-server-db-per... That one probably needs similar love... Mike On Tuesday, 13 November 2018, git-admin@x2go.org wrote:
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master in repository x2gobroker.
commit 4f84c06a2f2ef369d0f0ad3589a95875cfb7df1b Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Nov 13 15:45:25 2018 +0100
Makefile: make sure that we actually append our custom CFLAGS and LDFLAGS values, even if passed in through the make command line.
Makefile | 6 +++--- debian/changelog | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile index e572796..23e50b8 100755 --- a/Makefile +++ b/Makefile @@ -26,9 +26,9 @@ INSTALL_FILE=install -m 644 INSTALL_PROGRAM=install -m 755 INSTALL_SYMLINK=ln -sf
-CC ?= gcc -CFLAGS += -fPIE -LDFLAGS += -pie +CC ?= gcc +override CFLAGS += -fPIE +override LDFLAGS += -pie
RM_FILE=rm -f RM_DIR=rmdir -p --ignore-fail-on-non-empty diff --git a/debian/changelog b/debian/changelog index 9e2dbfa..d1fd388 100644 --- a/debian/changelog +++ b/debian/changelog @@ -119,6 +119,8 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium
- New upstream version (0.0.4.0):
- src/x2gobroker-{agent,ssh}.c: catch errors in setuid wrappers and add general return clause to make compilers happy.
- Makefile: make sure that we actually append our custom CFLAGS and
* x2gobroker.spec:LDFLAGS values, even if passed in through the make command line.
- Add %debug_package macro when debugging is to be enabled, hoping that it will actually generate proper debuginfo (and -source) sub packages
-- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
x2go-commits mailing list x2go-commits@lists.x2go.org https://lists.x2go.org/listinfo/x2go-commit
-- Sent from my Jolla
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit ce8b512f0291137e2ed997202bbce5040f754441 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Nov 13 15:40:34 2018 +0100 src/x2gobroker-{agent,ssh}.c: catch errors in setuid wrappers and add general return clause to make compilers happy. --- debian/changelog | 2 ++ src/x2gobroker-agent.c | 18 ++++++++++++++++-- src/x2gobroker-ssh.c | 17 +++++++++++++++-- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index f7db306..9e2dbfa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -117,6 +117,8 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium [ Mihai Moldovan ] * New upstream version (0.0.4.0): + - src/x2gobroker-{agent,ssh}.c: catch errors in setuid wrappers and add + general return clause to make compilers happy. * x2gobroker.spec: - Add %debug_package macro when debugging is to be enabled, hoping that it will actually generate proper debuginfo (and -source) sub packages diff --git a/src/x2gobroker-agent.c b/src/x2gobroker-agent.c index be88f60..45f908a 100644 --- a/src/x2gobroker-agent.c +++ b/src/x2gobroker-agent.c @@ -20,13 +20,27 @@ */ #include <unistd.h> +#include <stdlib.h> +#include <errno.h> +#include <stdio.h> int main( int argc, char *argv[] ) { - char x2gobrokeragent[] = TRUSTED_BINARY; argv[0] = "x2gobroker-agent.pl"; // execute the script, running with user-rights of this binary - execv(x2gobrokeragent, argv); + int ret = execv(x2gobrokeragent, argv); + int saved_errno = errno; + + if (ret) { + fprintf (stderr, "unable to execute script '"); + fprintf (stderr, TRUSTED_BINARY); + fprintf (stderr, "': "); + fprintf (stderr, strerror (saved_errno)); + + return (EXIT_FAILURE); + } + /* Should not be reached. */ + return (EXIT_SUCCESS); } diff --git a/src/x2gobroker-ssh.c b/src/x2gobroker-ssh.c index 1e7786b..14554a7 100644 --- a/src/x2gobroker-ssh.c +++ b/src/x2gobroker-ssh.c @@ -20,13 +20,26 @@ */ #include <unistd.h> +#include <stdlib.h> +#include <errno.h> +#include <stdio.h> int main( int argc, char *argv[] ) { - char x2gobrokerssh[] = TRUSTED_BINARY; argv[0] = "x2gobroker"; // execute the script, running with user-rights of this binary - execv(x2gobrokerssh, argv); + int ret = execv(x2gobrokerssh, argv); + + if (ret) { + fprintf (stderr, "unable to execute script '"); + fprintf (stderr, TRUSTED_BINARY); + fprintf (stderr, "': "); + fprintf (stderr, strerror (saved_errno)); + + return (EXIT_FAILURE); + } + /* Should not be reached. */ + return (EXIT_SUCCESS); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git