]> 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)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 22 Oct 2024 11:14:33 +0000 (20:14 +0900)
Follow-up for 40fb9eebbc075ce1e63100386d2c5f177ad7d738.

src/test/test-execute.c

index 9e3288b7a9f293818cd3fc3f028944b38ef8c675..95ccf5490de50e8d159c4da9a58b5db5f1fde22c 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) {
@@ -1498,8 +1498,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));