From c4d6651cae0fb1869ee65da0b66baae3828d73a2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 31 Dec 2024 16:16:38 +0900 Subject: [PATCH] update reverse-DNS style identifiers Signed-off-by: Ophestra --- dbus/samples_test.go | 24 +++++++++---------- ...y.json => uk.gensokyo.CrashTestDummy.json} | 6 ++--- internal/app/share.go | 2 +- wl/c.go | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) rename dbus/testdata/{moe.ophivana.CrashTestDummy.json => uk.gensokyo.CrashTestDummy.json} (65%) diff --git a/dbus/samples_test.go b/dbus/samples_test.go index a16d2c2..19d66b6 100644 --- a/dbus/samples_test.go +++ b/dbus/samples_test.go @@ -82,10 +82,10 @@ var samples = []dbusTestCase{ }, { - "moe.ophivana.CrashTestDummy", &dbus.Config{ - See: []string{"moe.ophivana.CrashTestDummy1"}, + "uk.gensokyo.CrashTestDummy", &dbus.Config{ + See: []string{"uk.gensokyo.CrashTestDummy1"}, Talk: []string{"org.freedesktop.Notifications"}, - Own: []string{"moe.ophivana.CrashTestDummy.*", "org.mpris.MediaPlayer2.moe.ophivana.CrashTestDummy.*"}, + Own: []string{"uk.gensokyo.CrashTestDummy.*", "org.mpris.MediaPlayer2.uk.gensokyo.CrashTestDummy.*"}, Call: map[string]string{"org.freedesktop.portal.*": "*"}, Broadcast: map[string]string{"org.freedesktop.portal.*": "@/org/freedesktop/portal/*"}, Log: true, @@ -96,19 +96,19 @@ var samples = []dbusTestCase{ "unix:path=/run/user/1971/bus", "/tmp/fortify.1971/5da7845287a936efbc2fa75d7d81e501/bus", "--filter", - "--see=moe.ophivana.CrashTestDummy1", + "--see=uk.gensokyo.CrashTestDummy1", "--talk=org.freedesktop.Notifications", - "--own=moe.ophivana.CrashTestDummy.*", - "--own=org.mpris.MediaPlayer2.moe.ophivana.CrashTestDummy.*", + "--own=uk.gensokyo.CrashTestDummy.*", + "--own=org.mpris.MediaPlayer2.uk.gensokyo.CrashTestDummy.*", "--call=org.freedesktop.portal.*=*", "--broadcast=org.freedesktop.portal.*=@/org/freedesktop/portal/*", "--log"}, }, { - "moe.ophivana.CrashTestDummy1", &dbus.Config{ - See: []string{"moe.ophivana.CrashTestDummy"}, + "uk.gensokyo.CrashTestDummy1", &dbus.Config{ + See: []string{"uk.gensokyo.CrashTestDummy"}, Talk: []string{"org.freedesktop.Notifications"}, - Own: []string{"moe.ophivana.CrashTestDummy1.*", "org.mpris.MediaPlayer2.moe.ophivana.CrashTestDummy1.*"}, + Own: []string{"uk.gensokyo.CrashTestDummy1.*", "org.mpris.MediaPlayer2.uk.gensokyo.CrashTestDummy1.*"}, Call: map[string]string{"org.freedesktop.portal.*": "*"}, Broadcast: map[string]string{"org.freedesktop.portal.*": "@/org/freedesktop/portal/*"}, Log: true, @@ -119,10 +119,10 @@ var samples = []dbusTestCase{ "unix:path=/run/user/1971/bus", "/tmp/fortify.1971/5da7845287a936efbc2fa75d7d81e501/bus", "--filter", - "--see=moe.ophivana.CrashTestDummy", + "--see=uk.gensokyo.CrashTestDummy", "--talk=org.freedesktop.Notifications", - "--own=moe.ophivana.CrashTestDummy1.*", - "--own=org.mpris.MediaPlayer2.moe.ophivana.CrashTestDummy1.*", + "--own=uk.gensokyo.CrashTestDummy1.*", + "--own=org.mpris.MediaPlayer2.uk.gensokyo.CrashTestDummy1.*", "--call=org.freedesktop.portal.*=*", "--broadcast=org.freedesktop.portal.*=@/org/freedesktop/portal/*", "--log"}, diff --git a/dbus/testdata/moe.ophivana.CrashTestDummy.json b/dbus/testdata/uk.gensokyo.CrashTestDummy.json similarity index 65% rename from dbus/testdata/moe.ophivana.CrashTestDummy.json rename to dbus/testdata/uk.gensokyo.CrashTestDummy.json index 4943be2..43272f6 100644 --- a/dbus/testdata/moe.ophivana.CrashTestDummy.json +++ b/dbus/testdata/uk.gensokyo.CrashTestDummy.json @@ -1,13 +1,13 @@ { "see": [ - "moe.ophivana.CrashTestDummy1" + "uk.gensokyo.CrashTestDummy1" ], "talk":[ "org.freedesktop.Notifications" ], "own":[ - "moe.ophivana.CrashTestDummy.*", - "org.mpris.MediaPlayer2.moe.ophivana.CrashTestDummy.*" + "uk.gensokyo.CrashTestDummy.*", + "org.mpris.MediaPlayer2.uk.gensokyo.CrashTestDummy.*" ], "call":{ "org.freedesktop.portal.*":"*" diff --git a/internal/app/share.go b/internal/app/share.go index 3ee1794..f2fa760 100644 --- a/internal/app/share.go +++ b/internal/app/share.go @@ -170,7 +170,7 @@ func (seal *appSeal) setupShares(bus [2]*dbus.Config, os linux.System) error { appID := seal.fid if appID == "" { // use instance ID in case app id is not set - appID = "moe.ophivana.fortify." + seal.id + appID = "uk.gensokyo.fortify." + seal.id } seal.sys.Wayland(wt, wp, appID, seal.id) seal.sys.bwrap.Bind(wt, w) diff --git a/wl/c.go b/wl/c.go index 907693b..97c641b 100644 --- a/wl/c.go +++ b/wl/c.go @@ -74,7 +74,7 @@ static int32_t bind_wayland_fd(char *socket_path, int fd, const char *app_id, co struct wp_security_context_v1 *security_context; security_context = wp_security_context_manager_v1_create_listener(security_context_manager, listen_fd, sync_fd); - wp_security_context_v1_set_sandbox_engine(security_context, "moe.ophivana.fortify"); + wp_security_context_v1_set_sandbox_engine(security_context, "uk.gensokyo.fortify"); wp_security_context_v1_set_app_id(security_context, app_id); wp_security_context_v1_set_instance_id(security_context, instance_id); wp_security_context_v1_commit(security_context);