summaryrefslogtreecommitdiff
path: root/libs
AgeCommit message (Collapse)Author
2024-10-31sftp: Verify server fingerprintJoel Klinghed
If no fingerprint is stored -> save whatever the server gives If a fingerprint is stored -> error if fingerprint does not match
2024-10-31sftp: Let a selection of tests use private key authenticationJoel Klinghed
Tests switch between password authentication and private key authentication depending on the hash of the method name. It's a fairly even spread. Update the docker config, it never wanted a pem file, it wanted a ssh-rsa format public key.
2024-10-31sftp: Simplify authentication with private keyJoel Klinghed
Let ssh2 derive the public key from the private key. Much easier.
2024-10-31Make path returned by resolve more consistentJoel Klinghed
2024-10-23Update OpenSSL to 3.4.0Joel Klinghed
2024-10-16Update libssh2 to 1.11.1Joel Klinghed
2024-10-14Add path to LinkJoel Klinghed
It's implementation specific if path is relative or absolute but it contains the link target. Especially useful for NoTarget.
2024-10-14Add tests for create dir/file/link that already existsJoel Klinghed
Fix implementations to work as expected (that createDirectory/File/Link fails if an entry with that name already exists).
2024-09-25sftp: Use val when possibleJoel Klinghed
2024-09-25samba & sftp: Share path utils methodsJoel Klinghed
Add tests for them, and add basename, currently unused, for completeness
2024-09-25Add unicode filename testJoel Klinghed
And fix errors in MUTF-8 conversion in jni.cpp
2024-09-25samba: Fix testJoel Klinghed
When robolectric loads multiple SDK versions it initialize the NativeSamba class multiple times but loading libsamba.so multiple times doesn't work. Avoid the problem by going back to only testing one SDK level for samba.
2024-09-25samba: Remove untested symlink codeJoel Klinghed
Not been able to test the symlink code (as it is SMB1 only), instead of having a lot of (possibly, most likely) broken code that might be used by someone, remove it all.
2024-09-25samba: Fix description testJoel Klinghed
Leftover from early test, there is a tree already.
2024-09-25samba: Follow clang-tidy suggestionsJoel Klinghed
2024-09-25samba: Fix output dir for testsJoel Klinghed
2024-09-25Add libs:sftpJoel Klinghed
sftp implementation using libssh2 and openssl
2024-09-10Add libs:documentsJoel Klinghed
Reads the abomination that is SAF, or Androids best effort to make files and directories completely and utterly unusable on Android. The androidTest was (and is) a pain, only known to work on a Pixel3 API 34 emulator but it showed a lot of things that the fake content provider in the unit tests failed to show.
2024-09-03test: Verify that removeDir, removeFile and removeLink return expected valueJoel Klinghed
2024-09-03Remove robolectric from test-utilsJoel Klinghed
Will make it possible to use TreeAbstractTest in androidTest as well as unittest
2024-09-03Add robolectric.propertiesJoel Klinghed
For some reason robolectric doesn't pick up the right min and max sdk by itself so it was testing the wrong versions
2024-09-03Move test options to android-conventions pluginJoel Klinghed
2024-08-25Document io classesJoel Klinghed
2024-08-25Combine tests from both local and sambaJoel Klinghed
Most the tests test the Tree implementation and thus should work on all such implementations. Current exception is symlinks which Samba backend doesn't (currently?) support. Improve the Samba remove methods to better match the expected behavior.
2024-08-25samba: Remove unused importJoel Klinghed
2024-08-25samba: Add support for live listJoel Klinghed
Using polling (every 10s) as libsmb2 has no watch/event support. (Unsure if SMB protocol has any support).
2024-08-25samba: Fix reading/writing large amounts of dataJoel Klinghed
Two bugs: * Didn't consider smb2_context max read/write size. * total was not increased when max was hit
2024-08-23samba: Style fixesJoel Klinghed
Remove unused imports and shorten lone lines
2024-08-23samba: Add support for read/write fileJoel Klinghed
2024-08-23local: Simply PathFile.writeJoel Klinghed
Don't fiddle around with temp files and such. This needs to be handled on a higher level. Otherwise, how do you know if the temp file should be replaced or not when close is called?
2024-08-22fixup! samba: Add docker server run by testsJoel Klinghed
follow symlinks = no doesn't have intended effect
2024-08-22samba: Cleanup jni layerJoel Klinghed
Remember that jni::GlobalRef can be used on multiple threads so we can't store the env, need to call AttachCurrentThread. Fix AttachCurrentThread (g_vm was forgotten). More consistent move and copy constructors in refs. Removed env() method as it would only be valid for Param and Local anyway.
2024-08-22samba: Disable follow symlinks on samba serverJoel Klinghed
Also no unix extensions (as that is SMB1).
2024-08-22fixup! samba: Add docker server run by testsJoel Klinghed
Kotlin + truth is somewhat pedantic at times
2024-08-22samba: Add docker server run by testsJoel Klinghed
Current user needs to be in docker group (or in some other way have access to the docker.socket) for this to work. Two current problems: * listRoot() fails, no directories are found. * gradle hangs after running the samba tests
2024-08-22samba: Fix crash when url->path == nullJoel Klinghed
2024-08-22Add AutoClosable to Tree interfaceJoel Klinghed
Some backends have resources to free, such as the SambaTree.
2024-08-20Support building libsamba.so for unittestsJoel Klinghed
Unittests still fail as there is no samba server to talk to (step 2).
2024-08-20Update gradle to 8.10Joel Klinghed
2024-08-19Increase the samba implemetationJoel Klinghed
With the exception of openDir, largely untested.
2024-07-25samba: Add credentials objectJoel Klinghed
Ask for enough permissions to be able to create sockets.
2024-07-23Add initial code for samba implementation based on libsmb2Joel Klinghed
2024-07-16Break out io code in libsJoel Klinghed
Preparing for adding more io implementations. Really tried writing the convention plugins in kotlin dsl but could not find the exact right hacks to get it to work.