summaryrefslogtreecommitdiff
path: root/lib9p/tests/test_server/fs_whoami.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/tests/test_server/fs_whoami.c')
-rw-r--r--lib9p/tests/test_server/fs_whoami.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib9p/tests/test_server/fs_whoami.c b/lib9p/tests/test_server/fs_whoami.c
index 653ac4b..b81e6c8 100644
--- a/lib9p/tests/test_server/fs_whoami.c
+++ b/lib9p/tests/test_server/fs_whoami.c
@@ -23,10 +23,10 @@ LO_IMPLEMENTATION_C(lib9p_srv_fio, struct whoami_fio, whoami_fio, static);
size_t whoami_len(struct lib9p_srv_ctx *ctx) {
assert(ctx);
- assert(ctx->authinfo);
+ assert(ctx->user);
size_t len = 0;
- uint32_t uid = ctx->authinfo->uid;
+ uint32_t uid = ctx->user->num;
while (uid) {
len++;
uid /= 10;
@@ -34,7 +34,7 @@ size_t whoami_len(struct lib9p_srv_ctx *ctx) {
if (!len)
len++;
len += 2;
- len += ctx->authinfo->uname.len;
+ len += ctx->user->name.len;
return len;
}
@@ -138,7 +138,7 @@ static void whoami_fio_pread(struct whoami_fio *self, struct lib9p_srv_ctx *ctx,
self->buf_len = data_size+1;
}
snprintf(self->buf, self->buf_len, "%"PRIu32" %.*s\n",
- ctx->authinfo->uid, ctx->authinfo->uname.len, ctx->authinfo->uname.utf8);
+ ctx->user->num, ctx->user->name.len, ctx->user->name.utf8);
if (byte_offset > (uint64_t)data_size) {
lib9p_error(&ctx->basectx,