Skip to content
Snippets Groups Projects
Commit bef4b653 authored by Esben Haabendal's avatar Esben Haabendal
Browse files

openharmony-standard: Stop param_service littering in /dev


This stops placing temporary files and Unix sockets in /dev, and use /run
instead.  This aligns better with FHS and makes it easier to handle permissions
safely if/when we decide to change uid/gid of the param service.

Signed-off-by: default avatarEsben Haabendal <esben@geanix.com>
parent 96703b77
No related branches found
No related tags found
1 merge request!109Systemd service integration and stability improvements
......@@ -3,9 +3,8 @@ Description=OpenHarmony Param Service
[Service]
Type=notify
ExecStartPre=install -m 755 -d /dev/unix/socket
ExecStartPre=install -m 755 -d /run/openharmony/param
ExecStartPre=install -m 755 -d /data/param
ExecStartPre=install -m 755 -d /dev/__parameters__
ExecStart=/usr/bin/param_service
[Install]
......
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
Patch for //base/startup/init_lite of OpenHarmony 3.0 codebase
Configure param service and getparam/setparam commands to place files and pipes
in /run instead of /dev (where they obviously does not belong).
Having a dedicated directory for this makes it easier to handle permissions in a
safe way.
Signed-off-by: Esben Haabendal <esben@geanix.com>
Upstream-Status: Inappropriate [configuration]
diff --git a/services/param/include/param_manager.h b/services/param/include/param_manager.h
index ad605b0c2741..7edad26d777a 100644
--- a/services/param/include/param_manager.h
+++ b/services/param/include/param_manager.h
@@ -43,17 +43,10 @@ typedef enum {
#define LABEL_STRING_LEN 128
-#ifdef STARTUP_LOCAL
-#define PIPE_NAME "/tmp/paramservice"
-#define PARAM_STORAGE_PATH "/media/sf_ubuntu/test/__parameters__/param_storage"
-#define PARAM_PERSIST_PATH "/media/sf_ubuntu/test/param/persist_parameters"
-#define PARAM_INFO_PATH "/media/sf_ubuntu/test/__parameters__/param_info"
-#else
-#define PIPE_NAME "/dev/unix/socket/paramservice"
-#define PARAM_STORAGE_PATH "/dev/__parameters__/param_storage"
+#define PIPE_NAME "/run/openharmony/param/pipe"
+#define PARAM_STORAGE_PATH "/run/openharmony/param/storage"
#define PARAM_PERSIST_PATH "/data/param/persist_parameters"
-#define PARAM_INFO_PATH "/dev/__parameters__/param_info"
-#endif
+#define PARAM_INFO_PATH "/run/openharmony/param/info"
#define SUBSTR_INFO_NAME 0
#define SUBSTR_INFO_LABEL 1
......@@ -69,6 +69,7 @@ SRC_URI += "file://test_xts_acts-Align-tests-list-with-mandatory-set.patch;patch
SRC_URI += "file://init_lite-silence-GetControlFromEnv-spam.patch;patchdir=${S}/base/startup/init_lite"
SRC_URI += "file://param_service_standalone.patch;patchdir=${S}/base/startup/init_lite"
SRC_URI += "file://param_service-sd-notify.patch;patchdir=${S}/base/startup/init_lite"
SRC_URI += "file://param-paths.patch;patchdir=${S}/base/startup/init_lite"
SRC_URI += "file://param_service-Add-to-startup-l2-part.patch;patchdir=${S}/base/startup/appspawn_standard"
SRC_URI += "file://base_hiviewdfx_hiview-libfaultlogger-static.patch;patchdir=${S}/base/hiviewdfx/hiview"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment