summaryrefslogtreecommitdiff
path: root/lib9p/srv.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-14 20:14:46 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-14 20:14:46 -0700
commit287e11381634b879dc82b23eacb693a31c52f9ef (patch)
tree236d11893dafb8f45141fdacc7d6f47cc0aa8529 /lib9p/srv.c
parentf7c75fe0113cdbd3e13b4e22edf76d9456c4b064 (diff)
parent6e48efec92b3357b2b762d14994d2f812a3b6ef7 (diff)
Merge branch 'lukeshu/9p-idl-defs'
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r--lib9p/srv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c
index e7fdb03..d5b643d 100644
--- a/lib9p/srv.c
+++ b/lib9p/srv.c
@@ -510,7 +510,7 @@ static void handle_Tauth(struct _lib9p_srv_req *ctx,
struct lib9p_msg_Rauth *resp) {
util_handler_common(ctx, req, resp);
- ctx->ctx.uid = req->n_uname;
+ ctx->ctx.uid = req->n_uid;
ctx->ctx.uname = req->uname.utf8;
struct lib9p_srv *srv = ctx->parent_sess->parent_conn->parent_srv;
@@ -530,7 +530,7 @@ static void handle_Tattach(struct _lib9p_srv_req *ctx,
struct lib9p_msg_Rattach *resp) {
util_handler_common(ctx, req, resp);
- ctx->ctx.uid = req->n_uname;
+ ctx->ctx.uid = req->n_uid;
ctx->ctx.uname = req->uname.utf8;
struct lib9p_srv *srv = ctx->parent_sess->parent_conn->parent_srv;
@@ -562,7 +562,7 @@ static void handle_Tattach(struct _lib9p_srv_req *ctx,
LINUX_EOPNOTSUPP, "TODO: auth not implemented");
return;
} else {
- if (req->afid != LIB9P_NOFID) {
+ if (req->afid != LIB9P_FID_NOFID) {
lib9p_error(&ctx->ctx.basectx,
LINUX_EACCES, "FID provided as auth-file, but no auth-file is required");
return;