~ajk/funetnje-docker

36ff71cdafbefc13efb3923d96bd29579bed2d97 — Andrew Kay 1 year, 7 months ago 9ec855a master
Fix bug where sendfile could not determine from user
2 files changed, 20 insertions(+), 1 deletions(-)

M README.md
M UnixNJE.patch
M README.md => README.md +1 -1
@@ 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`:

M UnixNJE.patch => UnixNJE.patch +19 -0
@@ 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;
 }