Coder Social home page Coder Social logo

aund's People

Contributors

mjwoodcock avatar sai2791 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aund's Issues

Normal Server Logging

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.

Link fails with library crypt missing on Raspberry Pi

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

Attemping *. when not logged in goes into a timeout loop

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

Core dump in posix_spawn unless -f is set for foreground

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.

Support AUN protocol

Aund currently only supports the Beebem aun protocol. The server needs to be changed to accept either Beebem AUN or the AUN protocol

Handling of read-only files and a file descriptor leak

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.

Errors when sending large amounts of data

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.

Aund gets stuck if the client stops talking

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.

No error returned for invalid handles

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 compiler issue

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.

Building refers to files in your home directory

./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.

The "null" user management option has missing methods, results in coredump.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.