sai2791 / aund Goto Github PK
View Code? Open in Web Editor NEWLinux Econet Server (Acorn computers - 8-bit with 32-bit support)
Linux Econet Server (Acorn computers - 8-bit with 32-bit support)
The AUND server currently shows lots of debugging content to the terminal if the debug flag is set, turning this off shows nothing. It would be helpful to have something similar to the lvl 3 server display when a user logs on, logs off, loads or saves and uses the priv command.
Building on a raspberry pi gives an error when linking the files together because it cannot find the crypt library.
Workaround for now is to compile from the command line using
gcc -lcrypt -Wall -Wdeclaration-after-statement -Wold-style-definition -Wmissing-prototypes -Wredundant-decls -Wno-pointer-sign -Wno-uninitialized -g -O2 -o aund aund.o fileserver.o fs_cli.o fs_examine.o fs_fileio.o fs_misc.o fs_handle.o fs_util.o fs_error.o fs_nametrans.o fs_filetype.o aun.o beebem.o pw.o user_null.o libconf_lex.a
Beware, this might be an emulator bug but running*. on B-Em I get this from aund:
started as fileserver at station [254]
(file server: {&=0,@=0,%=0} fs_error: 0xbf/Who are you?
aund: Tx reply: Connection timed out
)
(file server: {&=0,@=0,%=0} fs_error: 0xbf/Who are you?
aund: Tx reply: Connection timed out
)
(file server: {&=0,@=0,%=0} fs_error: 0xbf/Who are you?
aund: Tx reply: Connection timed out
When I tried running aund on Linux, without specifying -f I immediately got a core dump. Here is the gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7e79944 in __spawnix () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff7e79944 in __spawnix () from /usr/lib/libc.so.6
#1 0x00007ffff7e7a08b in __spawni () from /usr/lib/libc.so.6
#2 0x00007ffff7e798af in posix_spawn@@GLIBC_2.15 () from /usr/lib/libc.so.6
#3 0x0000555555557a3e in main (argc=1, argv=0x7fffffffe5b0) at aund.c:166
At a guess I'd say some things that can be left as NULL in that call are not allowed as NULL on Linux.
Aund currently only supports the Beebem aun protocol. The server needs to be changed to accept either Beebem AUN or the AUN protocol
I have a filing system test program (see https://github.com/SteveFosdick/FsTest). One of the things it does is open a file for reading (OPENIN, i.e. OSFIND A=&40) and then attempt to write to it to check that an error is generated. The error that aund is sending back is 0xff/Bad file descriptor.
Looking at the code this is because aund correctly heeds the read-only attribute in the open request and opens the file read-only at the Unix level and then, when it receives a request to write to it, it calls write(2) which fails and the Unix errno EBADF is not mapped to an error message so it returns 0xff and the result of strerror(3).
Now there is code to set a handle attribute can_write but this only inspects the Acorn-specific file permissions and does not seem to be affected by whether the client requested the file to be open for writing. Is that correct? Do you think aund should set can_write to false if the original request specified read only?
Finally, while looking at fs_open to see what was going on, it looks like the file descriptor being used to open the file read-only as a "does it exist" test (line 112) is leaked as I can't see it being closed.
From SteveFosdick. ref: Issue #7
I have found another client problem, though, in that the program I was testing with was failing to set bytes &10 and &11 of the OSFILE control block, i.e. the upper limit of the memory block to be saved. It looks like in this case NFS is sending the length, as calculated by a straight subtraction, but possibly not sending all the data. In one case it send a length of 8523680 (about 8.1Mb) but then sent 83 1K blocks. I can't tell at the moment if that is because of some internal thing within NFS or if the network comms (or the AUN <> Econet state machine) is not so robust and this much data shows it up.
I came across when the client (B-Em emulating a BBC micro) malfunctioned and abandoned the dialogue in an OSFILE SAVE command part way through transferring the data. Upon re-starting the client, aund does not respond to *I AM. Re-starting aund restores operation.
User is able to open a file for writing and then save to the same filename with the handle open.
When sending a request on an (supposedly) open file with an invalid file handle there is a check to make sure the handle is valid, for example in fs_getbyte:
if ((h = fs_check_handle(c->client, request->handle)) != 0) {
But if this test fails no error is sent. I believe this should be sending back the "Channel" error, i.e. the else part should be:
else
fs_err(c, EC_FS_E_CHANNEL);
This applies to gs_getbyte, fs_getbytes, fs_putbyte, fs_putbytes.
Posix_spawn causes compile issue on root, because It was not set. This change was introduced while trying to fix this spawning process in a linux system and needed to be reverted.
The user can create a directory with the same name as an existing file
./configure runs fine but when I type make it refers to a file 'documents/aund/missing' under your home directory which is therefore not in the package as cloned, or part of a standard Linux install.
When running with the null user managment option, which seems to be the default with the supplied example config file, logging on (*I AM) causes a segmentation fault when trying to invoke:
c->client->priv = userfuncs->get_priv(c->client->login);
in fs_cmd_i_am in fs_cli.c. This is because this method, and several others, are not defined for this user option which has:
struct user_funcs const user_null = {
null_validate, null_urd, null_change, null_set_opt4
};
compared with:
struct user_funcs const user_pw = {
pw_validate, pw_urd, pw_change, pw_set_opt4, pw_set_priv, pw_get_priv,
pw_add_user, pw_is_user, pw_del_user
};
in pw.c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.