]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: update permission of credstore
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Jun 2023 05:18:47 +0000 (14:18 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 13 Nov 2024 19:48:10 +0000 (19:48 +0000)
Follow-up for 40fb9eebbc075ce1e63100386d2c5f177ad7d738.

(cherry picked from commit c443f6924fa3b02113da2536dd816a15ee708510)

src/test/test-execute.c

index 56f5e340bef54cb8004a0d35f6c6d20c93d6fa10..1a28f8f29122e74a6c05e584d2f74ad0e1f775a6 100644 (file)
@@ -353,8 +353,8 @@ static void test_exec_cpuaffinity(Manager *m) {
 
 static void test_exec_credentials(Manager *m) {
         test(m, "exec-set-credential.service", 0, CLD_EXITED);
-        test(m, "exec-load-credential.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_CREDENTIALS, CLD_EXITED);
-        test(m, "exec-credentials-dir-specifier.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_CREDENTIALS, CLD_EXITED);
+        test(m, "exec-load-credential.service", 0, CLD_EXITED);
+        test(m, "exec-credentials-dir-specifier.service", 0, CLD_EXITED);
 }
 
 static void test_exec_workingdirectory(Manager *m) {
@@ -1499,8 +1499,8 @@ static int prepare_ns(const char *process_name) {
 
                 /* Prepare credstore like tmpfiles.d/credstore.conf for LoadCredential= tests. */
                 FOREACH_STRING(p, "/run/credstore", "/run/credstore.encrypted") {
-                        ASSERT_OK(mkdir_p(p, 0));
-                        ASSERT_OK(mount_nofollow_verbose(LOG_DEBUG, "tmpfs", p, "tmpfs", MS_NOSUID|MS_NODEV, "mode=0000"));
+                        ASSERT_OK(mkdir_p(p, 0700));
+                        ASSERT_OK(mount_nofollow_verbose(LOG_DEBUG, "tmpfs", p, "tmpfs", MS_NOSUID|MS_NODEV, "mode=0700"));
                 }
 
                 ASSERT_OK(write_string_file("/run/credstore/test-execute.load-credential", "foo", WRITE_STRING_FILE_CREATE));