osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/30094?usp=email )
Change subject: contrib/systemd: run as osmocom user
......................................................................
contrib/systemd: run as osmocom user
I have verified that with AmbientCapabilities=CAP_SYS_NICE, setting
scheduling policy as described in the manual still works as expected.
Related: OS#4107
Change-Id: Ibb83c231231b39dc6732c0f375aeb3b21f3938ef
---
M contrib/systemd/osmo-mgw.service
A debian/postinst
2 files changed, 54 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
lynxis lazus: Looks good to me, approved
diff --git a/contrib/systemd/osmo-mgw.service b/contrib/systemd/osmo-mgw.service
index 03f40ff..eaf84be 100644
--- a/contrib/systemd/osmo-mgw.service
+++ b/contrib/systemd/osmo-mgw.service
@@ -9,8 +9,11 @@
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
+User=osmocom
+Group=osmocom
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
RestartSec=2
+AmbientCapabilities=CAP_SYS_NICE
# CPU scheduling policy:
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..be12373
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,38 @@
+#!/bin/sh -e
+case "$1" in
+ configure)
+ # Create the osmocom group and user (if it doesn't exist yet)
+ if ! getent group osmocom >/dev/null; then
+ groupadd --system osmocom
+ fi
+ if ! getent passwd osmocom >/dev/null; then
+ useradd \
+ --system \
+ --gid osmocom \
+ --home-dir /var/lib/osmocom \
+ --shell /sbin/nologin \
+ --comment "Open Source Mobile Communications" \
+ osmocom
+ fi
+
+ # Fix permissions of previous (root-owned) install (OS#4107)
+ if dpkg --compare-versions "$2" le "1.13.0"; then
+ if [ -e /etc/osmocom/osmo-mgw.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-mgw.cfg
+ chmod -v 0660 /etc/osmocom/osmo-mgw.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
+ ;;
+esac
+
+# dh_installdeb(1) will replace this with shell code automatically
+# generated by other debhelper scripts.
+#DEBHELPER#
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/30094?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibb83c231231b39dc6732c0f375aeb3b21f3938ef
Gerrit-Change-Number: 30094
Gerrit-PatchSet: 10
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824?usp=email )
Change subject: sgsn: fix TC_iu_attach failing for recent -master
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File sgsn/SGSN_Tests_Iu.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824/comment/3f6e2053_e213…
PS1, Line 38: f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
> Just to make sure there is no misunderstanding: `TC_iu_attach_encr` is testing attach without the en […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibaf83db1ab0f82f7e934e89ae3f6c19d014be197
Gerrit-Change-Number: 36824
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 May 2024 20:50:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36825?usp=email )
Change subject: sgsn: reset encryption in SGSN_Tests_Iu.f_vty_config()
......................................................................
Patch Set 1:
(1 comment)
File sgsn/SGSN_Tests_Iu.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36825/comment/be99b3f3_5714…
PS1, Line 19: f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
> As mentioned, I'm not sure whether we want to do this or instead test the default config by default?
Whether we want to run all tests with encryption or not is a separate question. In this patch I am simply reordering code to make sure that one testcase failing with DTE does not affect the others.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36825?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic2c5a11e86e4349796fa7508076ac27ef22815cd
Gerrit-Change-Number: 36825
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 May 2024 20:49:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36826?usp=email )
Change subject: sgsn: fix TC_iu_attach_geran_rau: register the new TLLI
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36826?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idafcbd7e44a523a26dc34dc72e38ff879782148e
Gerrit-Change-Number: 36826
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 May 2024 20:48:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824?usp=email )
Change subject: sgsn: fix TC_iu_attach failing for recent -master
......................................................................
Patch Set 1:
(1 comment)
File sgsn/SGSN_Tests_Iu.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824/comment/377d48c5_d167…
PS1, Line 38: f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
> See `TC_iu_attach_encr` below.
Just to make sure there is no misunderstanding: `TC_iu_attach_encr` is testing attach without the encryption, `TC_iu_attach_encr` is testing attach with the encryption. Why? Idk, I was not the one writing those tests.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibaf83db1ab0f82f7e934e89ae3f6c19d014be197
Gerrit-Change-Number: 36824
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 May 2024 20:46:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36825?usp=email )
Change subject: sgsn: reset encryption in SGSN_Tests_Iu.f_vty_config()
......................................................................
Patch Set 1:
(1 comment)
File sgsn/SGSN_Tests_Iu.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36825/comment/07a22ec0_a84f…
PS1, Line 19: f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
As mentioned, I'm not sure whether we want to do this or instead test the default config by default?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36825?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic2c5a11e86e4349796fa7508076ac27ef22815cd
Gerrit-Change-Number: 36825
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 May 2024 20:43:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824?usp=email )
Change subject: sgsn: fix TC_iu_attach failing for recent -master
......................................................................
Patch Set 1:
(1 comment)
File sgsn/SGSN_Tests_Iu.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824/comment/72478f20_0fcb…
PS1, Line 38: f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
why not using encryption instead? (more like default beavior).
And maybe add a new test case without encryption?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36824?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibaf83db1ab0f82f7e934e89ae3f6c19d014be197
Gerrit-Change-Number: 36824
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 May 2024 20:41:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment