Re: [Afpfs-ng-devel] UAMs
Status: Alpha
Brought to you by:
alexthepuffin
From: Derrik P. <de...@de...> - 2007-02-01 02:44:04
|
Alex: After some diagnosing, I discovered that the password length was hardcoded in your 'afp_server_mount_request' structure at 9 characters (obviously 8 characters plus a trailing \0). Unfortunately that means that any time you have a longer password, you can never authenticate, as it always gets truncated. (The DHCAST128 UAM supports passwords up to 64 characters; DHX2 on the other hand supports passwords up to 255 characters.) After lengthening the password field in the structure definition, and altering the snprintf() invocation in client.c to allow a password of up to 255 characters, nothing worked - it appears the structure was long enough that it broke the whole system. (The check in process_mount(), comparing len to sizeof(struct afp_server_mount_request), fails.) After changing the username and password field lengths to 127 characters each, it started working again. After doing this, I could successfully authenticate against a MacOS X 10.4 system at the office using the DHCAST128 UAM. I've also transcribed my Randnum and 2-way Randnum UAMs, but I don't currently have a means to test them. Also, it seems that the function that should be returning the dirent list for a directory is only getting a small fraction of the entries; I suspect that FPEnumerate{,Ext,Ext2} (whichever you're using) is only getting called one time; you need to call the enumerator in a loop, until you don't get any more entries, otherwise with anything other than a very small directory, entries will be missed. -- Derrik Pates de...@de... |