1.1 --- a/conf/dstest_ext2.cfg Sun Aug 01 00:07:00 2021 +0200
1.2 +++ b/conf/dstest_ext2.cfg Sun Aug 01 00:23:08 2021 +0200
1.3 @@ -25,11 +25,16 @@
1.4 },
1.5 "rom/dstest_ext2_server", "blocksvr", "rom/e2test.fs", "10", "ext2svr");
1.6
1.7 +-- Obtain user filesystems with umask 0022 (18).
1.8 +
1.9 +local getuserfs = 6;
1.10 +local ext2svr_paulb = L4.cast(L4.Proto.Factory, ext2svr):create(getuserfs, 1000, 1000, 18);
1.11 +
1.12 l:startv({
1.13 caps = {
1.14 - server = ext2svr,
1.15 + server = ext2svr_paulb,
1.16 },
1.17 log = { "client", "g" },
1.18 },
1.19 - -- program, file to read, user identifier, repetition
1.20 - "rom/dstest_block_client_simple", "home/paulb/LICENCE.txt", "1000", "1");
1.21 + -- program, file to read, user identifier (omitted), repetition
1.22 + "rom/dstest_block_client_simple", "home/paulb/LICENCE.txt", "", "1");
2.1 --- a/conf/dstest_file.cfg Sun Aug 01 00:07:00 2021 +0200
2.2 +++ b/conf/dstest_file.cfg Sun Aug 01 00:23:08 2021 +0200
2.3 @@ -25,11 +25,16 @@
2.4 },
2.5 "rom/dstest_ext2_server", "blocksvr", "rom/e2test.fs", "10", "ext2svr");
2.6
2.7 +-- Obtain user filesystems with umask 0022 (18).
2.8 +
2.9 +local getuserfs = 6;
2.10 +local ext2svr_paulb = L4.cast(L4.Proto.Factory, ext2svr):create(getuserfs, 1000, 1000, 18);
2.11 +
2.12 l:startv({
2.13 caps = {
2.14 - server = ext2svr,
2.15 + server = ext2svr_paulb,
2.16 },
2.17 log = { "client", "g" },
2.18 },
2.19 - -- program, file to create, user identifier
2.20 - "rom/dstest_file_client", "home/paulb/new file", "1000");
2.21 + -- program, file to create
2.22 + "rom/dstest_file_client", "home/paulb/new file");
3.1 --- a/tests/dstest_block_client_simple.cc Sun Aug 01 00:07:00 2021 +0200
3.2 +++ b/tests/dstest_block_client_simple.cc Sun Aug 01 00:23:08 2021 +0200
3.3 @@ -23,6 +23,7 @@
3.4
3.5 #include <stdio.h>
3.6 #include <stdlib.h>
3.7 +#include <string.h>
3.8
3.9 #include <fsclient/client.h>
3.10
3.11 @@ -39,13 +40,14 @@
3.12 /* Obtain filename and access parameters. */
3.13
3.14 char *filename = argv[1];
3.15 - sys_uid_t uid = argc > 2 ? atoi(argv[2]) : 0;
3.16 + bool have_uid = (argc > 2) && strlen(argv[2]);
3.17 + sys_uid_t uid = have_uid ? atoi(argv[2]) : 0;
3.18 int repetition = argc > 3 ? atoi(argv[3]) : 10;
3.19 file_t *file;
3.20
3.21 /* With a user, open a user-specific file opener. */
3.22
3.23 - if (uid)
3.24 + if (have_uid)
3.25 {
3.26 l4_cap_idx_t opener = client_open_for_user((user_t) {uid, uid, 0022});
3.27
4.1 --- a/tests/dstest_file_client.cc Sun Aug 01 00:07:00 2021 +0200
4.2 +++ b/tests/dstest_file_client.cc Sun Aug 01 00:23:08 2021 +0200
4.3 @@ -142,12 +142,13 @@
4.4 }
4.5
4.6 char *filename = argv[1];
4.7 - sys_uid_t uid = argc > 2 ? atoi(argv[2]) : 0;
4.8 + bool have_uid = (argc > 2) && strlen(argv[2]);
4.9 + sys_uid_t uid = have_uid ? atoi(argv[2]) : 0;
4.10 file_t *file1, *file2;
4.11
4.12 /* With a user, open a user-specific file opener. */
4.13
4.14 - if (uid)
4.15 + if (have_uid)
4.16 {
4.17 l4_cap_idx_t opener = client_open_for_user((user_t) {uid, uid, 0022});
4.18