Commit Graph

142 Commits

Author SHA1 Message Date
Levi Neely f98b7c88e1 fmt 2025-03-04 17:48:14 +01:00
Levi Neely 935319f918 OMG this code is driving me nuts!!! 2025-03-04 17:41:22 +01:00
Levi Neely 4cc4152223 norly... 2025-03-04 17:34:52 +01:00
Levi Neely 42be0ee67e yes i'm really that picky 2025-03-04 17:33:44 +01:00
Levi Neely 87f6a36df4 constant name cleanup 2025-03-04 17:32:44 +01:00
Levi Neely 27f6e313dc type name clarification 2025-03-04 17:29:20 +01:00
Levi Neely 9b2c9ab74a more cleanup, less indirection 2025-03-04 17:23:56 +01:00
Levi Neely f92295f99e more cleanup... 2025-03-04 16:58:07 +01:00
Levi Neely 3b26f18692 cleanup 2025-03-04 16:51:49 +01:00
Levi Neely 8bc27f85d9 pssl decomposed to pssl, prsa, paes, psymkey for brevity / clarity 2025-03-04 16:41:06 +01:00
Levi Neely 4ef8ecfdbd more cleanup 2025-03-04 15:01:42 +01:00
Levi Neely f25a393ee2 pssl namespace 2025-03-04 14:58:25 +01:00
Levi Neely c6a0165c64 we don't need the hack anymore!!! 2025-03-04 14:39:44 +01:00
Levi Neely 73894ec450 cleanup 2025-03-04 13:45:38 +01:00
Levi Neely 6814e92a99 formatting, remove thin wrappers 2025-03-04 11:47:49 +01:00
Levi Neely 22f3929aca remove compiler compatibility junk, don't inline aes enc/dec 2025-03-04 10:58:09 +01:00
Levi Neely 4b289c3021 remove ssl compatibility junk, rely on mbedtls for hw accel 2025-03-04 10:43:41 +01:00
Levi Neely 1106028eba
WIP: Decompose namespaces and other cleanup (#94)
* papi namespace, remove some transient dependencies

* ptask namespace and cleanup

* pcache namespace and cleanup

* refactor pcallbacks into pqevent and ptevent

* pcryptofolder namespace and cleanup

* pcryptofolder missed a rename

* pdeflate namespace and cleanup

* pcrypto namespace

* pcrypto cleanup

* pcrypto consistency

* pcrypto more consistency

* pdevmon namespace and cleanup

* pdiff namespace

* pdownload namespace and cleanup

* pstatus namespace and cleanup

* pfileops namespace, fix header inlining abuse

* pfoldersync API, start chipping away at the psynclib monster

* pfscrypto namespace

* plocks namespace

* pnotify namespace

* pnotify formatting

* prpc namespace (got rid of confusing "overlay")

* pp2p namespace and cleanup

* ppagecache namespace

* ppassword namespace

* ppathstatus namespace

* prunratelimited => prun with throttling

* pscanner.c => psuggest namespace

* ptimer namespace

* ptools namespace (move to putil namespace someday)

* ptree namespace

* moved public link definitions into publiclinks.h, no clear namespace here though...

* pupload namespace

* formatting

* pcrc32c namespace
2025-03-01 22:21:54 +01:00
Levi Neely 2b6508a275
eliminate pcompat (#92)
* code cleanup and removal
- remove useless wrapper functions
- remove obfuscating typedefs
- code reorganization and reformatting
- function renames for clarification

* prepare pcompat.h for decomposition

* remove dead function psync_rebuild_icons, reorganize pfsstatic.c headers

* separate pdevice from pcompat

* reorg function prototypes, remove more compat stuff

* renamed mutex for brevity

* remove dead debug code; plibs version is more sophisticated

* remove dead code, stale comments

* moved psync_delete_cached_crypto_keys to psynclib

* forgot to remove the function prototype from pdiff.h

* reorganized functions by accessibility, inlined useless psync_cache_contacts function

* remove unused header

* ppath object decomposed from pcompat

* ppath namespace

* ppath struct renames

* ppath final cleanup

* refactor, remove compatibility code

* format

* prun decomposed from pcompat for thread mgmt

* slim down prun.c

* remove useless comments

* move pagesize to pmemlock, pmemlock namespace

* pmem decomposed from pcompat, pmem namespace

* decompose psys from pcompat

* fix psys function names, remove more compatibility junk

* prand decomposed from pcompat

* psock decomposed from pcompat

* types renamed for ns consistency, brevity

* cleanup psock, remove unused proxy code

* remove unused headers psock

* putil for utility macros and functions

* forgot to move some psock constants

* move time macro to psys

* eliminate pcompat completely; new pfile namespace

* cleanup
- moved thread name definition
- explicit externs in implementation instead of headers for now
- better extern name
2025-02-28 22:47:32 +01:00
Levi Neely c04f887249
prevent multiple execution of psync_fs_do_stop, and use atexit in the signal handler (#91) 2025-02-26 20:31:25 +01:00
Levi Neely f87367211d
migrate mbedtls to 3.x (#89)
* migrate mbedtls to 3.x

* update github c-cpp workflow to use trixie

* update README and container-build
- default image and tag for container-build is now debian:trixie
- README for debian bookworm users

* final readme tweaks

* second attempt to update ci build workflow

* third attempt on ci build workflow

* fix deprecated calls in pssl.c
2025-02-26 19:18:01 +01:00
Levi Neely 5ecece7547
#64 simplify messaging and #71 deserialize failed (#88)
* small lsp error fixes

* simplify messaging and remove serialize/deserialize
- messaging is reverted to API requests and responses only
- remove serialize and deserialize functions
- implement shared memory (pshm) for overlay callback return values

* fix memory leak

Fix #64 and #71
2025-02-25 09:46:46 +01:00
FloFri 5a5dec975f
Add basic 2FA (code from https://github.com/pcloudcom/console-client/pull/163) (#86)
Co-authored-by: Florian Friedrich <friedrich@procster.de>
2025-01-12 17:34:39 +01:00
Levi Neely 8737bec43f
Update README.md (#83)
Security notice
2024-12-14 12:09:21 +01:00
Levi Neely 8d4baaa1b4
fix sync add command, help text for other cmds (#82)
Problem was that the way the add sync folder command was handling local and remote path was based on the previous CLI processor, i.e., one string for all args. This patch updates it for CLI11.hpp
2024-12-14 11:56:30 +01:00
Levi Neely bc1bba6ec7
Revert "Streamline CLI11.hpp to functionality actually used by pcloudcc" (#81)
This reverts commit aae646033b. The code reduction breaks some functionality in sync folder add.
2024-12-10 21:48:15 +01:00
Levi Neely 37d97a9b42
Add device validation workarounds to README.md (#79) 2024-12-07 11:42:11 +01:00
ahuemmer efe9517364
fix: add missing include to make build work again (#77)
* fix: add  to make build work again

* fix: add  to make build work again

* fix: add  to make build work again

* fix: correct alphabetical order
2024-12-03 20:55:55 +01:00
Levi Neely 5fdd3d5c8c
Streamline CLI11.hpp to functionality actually used by pcloudcc (#76) 2024-11-30 15:42:06 +01:00
Levi Neely 2dccc714e7
improve cli command parser (#74)
* implement new command line processor using CLI11.hpp

command reference section updates

readme

* fix include in control_tools.cpp
2024-11-27 22:11:40 +01:00
Levi Neely ca80afd658
Appease the LSP server (#73)
* newline conversions

* formatting changes and lsp appeasement
2024-11-26 19:36:49 +01:00
Levi Neely 53f785ac1f
Cherry pick 20240910 (#69)
* consolidate devscripts, build debian dev host

* devhost supports fuse, can now build and run pcloudcc

* working on a sync capability

* devhost with working ssh

* sync capability done

* added a devhost script and readme

* useless end paragraph

* update sync section
2024-09-10 16:26:16 +02:00
Levi Neely a80e82b7a8
Document request-response flow (#63)
* documented request-response flow

* export result only

* header remove

* formatting
2024-08-25 23:30:28 +02:00
Levi Neely 3ca4253033
Update README.md: command reference (#61) 2024-08-25 22:03:22 +02:00
Levi Neely c687484707
Implement add, remove, and list sync folder commands (#59)
* list_sync_folders seems to work

* list_sync_folders breaks with sync folders in db; message size problem?

* fixed sync folders list

* fix double free and buffer overflow

* wip: add and remove sync folder; need to fix request->value in instance_thread

* remove comment

* removed pclsync_lib_c.{h,cpp}

* cleanup get_answer_to_request

* update comment

* changed reply struct to type response containing payload and msg

* cleanup

* refactored overlay_client, and poverlay; added docs

* better naming

* sock path in poverlay_protocol.h

* clarify comment

* refactor psync_overlay_get_response

* clarifications

* response_messages work with and without payload

* removed commented code

* syncadd works, but i need to fix the error handling

* remove sync folder

* remove commented code, change printfs to debug or simply remove

* removed unnecessary print

* removed more prints

* removed dead var

* update error handling in add_sync_folder, fix memleak

* simplified finalize
2024-08-25 21:54:41 +02:00
Levi Neely 21aa356ed3
Update README.md (#58) 2024-08-20 23:17:09 +02:00
Levi Neely 1aecb9fb63
Update README.md (#57) 2024-08-20 23:11:57 +02:00
Levi Neely 020dc04d24
Update README.md (#56) 2024-08-20 22:57:11 +02:00
Levi Neely cb8f905298
fixed (#55) 2024-08-20 22:26:20 +02:00
Levi Neely ed06599b7d
Bug fixes, build containers, minor updates (#54)
* openssl is a dependency

* openssl is not a real dpendency

* static link by default

* wip: build containers

* rm comments

* build containers, fix DEADLYSIGNAL on run with no args

* debug tools in deb/ubuntu, fix #44

* no slack container :(

* ensure P_LINUX_OS always defined

* error check fuse unmount ops

* fsanitize=thread temporarily

* undo

* clang static analysis

* fix dead assignment

* makefile quality of life stuff

* make install and uninstall; ignore scan results

* addressed dead assignments from static analysis

* debug and release builds possible

* gcc still default compiler

* debug symbols on debug build only
2024-08-20 22:00:38 +02:00
Levi Neely f06f333301
Aktualisieren von README.md (#51) 2024-08-20 01:46:49 +02:00
Levi Neely cd336a29fa
Update README.md (#50)
update deps
2024-08-20 01:28:04 +02:00
Levi Neely ccbfc3e7b7
Static build opt (#49)
* static build option

* make install static condition

* fix error
2024-08-20 01:21:55 +02:00
Levi Neely ef66640919
Static build opt (#48)
* static build option

* make install static condition
2024-08-20 01:19:29 +02:00
Levi Neely 4cd556cb13
static build option (#47)
make STATIC=1 to statically link libpcloudcc_lib.so
2024-08-20 01:15:56 +02:00
Levi Neely 0a3b596492
Merge pclsync and poverlay_linux (#46)
* fixed 2 of the 3 memory leaks

* fixed more memleaks

* more leaks

* another one

* BUGHUNT mode to look for more mem leaks

* merge poverlay_linux and pclsync
2024-08-18 15:09:21 +02:00
Levi Neely 8d3c496754
memleak fixes (#40)
* fixed 2 of the 3 memory leaks

* fixed more memleaks

* more leaks

* another one

* BUGHUNT mode to look for more mem leaks
2024-08-15 23:06:55 +02:00
Levi Neely bec97722cd
reorg source tree, link system mbedtls (#38)
* reorg source tree, link system mbedtls

* remove cmakelists.txt

* update ci workflow

* -Werror to -Wall

* libpcloudcc_so in makefile

* single makefile works

* removed extra makefiles
2024-08-15 19:49:57 +02:00
Levi Neely ea16dce3a9
install rule (#37) 2024-08-15 11:18:55 +02:00
Levi Neely 51001d37b7
makefile destdir (#36) 2024-08-15 11:12:36 +02:00