From 36ff71cdafbefc13efb3923d96bd29579bed2d97 Mon Sep 17 00:00:00 2001 From: Andrew Kay Date: Wed, 4 May 2022 21:11:30 -0500 Subject: [PATCH] Fix bug where sendfile could not determine from user --- README.md | 2 +- UnixNJE.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 27d2c06..a528184 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Unlike messages, you do not need to be logged in to the container and, therefore To send a file to `NODE2`: ``` -cat local_file.txt | docker exec -i nje_node1 sendfile nje@node2 +cat local_file.txt | docker exec -i -u nje nje_node1 sendfile nje@node2 ``` Then, view spooled files on `NODE2`: diff --git a/UnixNJE.patch b/UnixNJE.patch index 2a025b6..f57285b 100644 --- a/UnixNJE.patch +++ b/UnixNJE.patch @@ -64,3 +64,22 @@ index c03f41e..1461ae3 100644 install1: route @echo "MUST BE ROOT TO DO THIS!" +diff --git a/libmcuserid.c b/libmcuserid.c +index e5af688..ee69ef1 100644 +--- a/libmcuserid.c ++++ b/libmcuserid.c +@@ -16,14 +16,10 @@ char *from; + (uid == 0 || uid == pw->pw_uid)) { + strcpy(from,USER); + } else { +-#ifndef UNIX + cuserid(from); +-#endif + } + } else { +-#ifndef UNIX + cuserid(from); +-#endif + } + return from; + } -- 2.45.2