Commit Graph

29 Commits

Author SHA1 Message Date
Levi Neely 63d650b6c8
Fix #162: Add distro-agnostic mbedtls detection (#169)
- Use pkg-config to dynamically detect mbedtls variants (mbedtls3.x, mbedtls)
- Fallback to /usr/local if pkg-config unavailable
- Tested on Fedora 41 (mbedtls3.6), Arch Linux (mbedtls 3.6.5), Debian Bookworm, and Slackware
- Eliminates need for hardcoded version-specific paths

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-02-27 09:20:06 +01:00
Jonathan Senkerik 441a0d69ed
Refactor logging, add cache-size, fs-event-log (#163)
Much appreciated! Merged. :)
2026-02-27 08:38:28 +01:00
V10lator bd576e3c5b
Allow custom flags (#141)
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-03-18 19:55:15 +01:00
Levi Neely 9014edb99a
98 create a pdbg namespace (#139)
* pdbg split from plibs
* pdbg namespace
* add SSLDBGLVL build option
2025-03-13 20:28:09 +01:00
Levi Neely 826c2e3edf
upgrade to mbedtls 3.x (#118)
Migrate mbedtls 2.x to mbedtls 3.x.
2025-03-09 15:16:46 +01:00
Levi Neely 8ad1fe6086
Code cleanup and readline for better CLI UX (#116)
* pcommands.h for command ids

* remove compiler compat junk

* transient and unnecessary includes resolved

* unnecessary goto

* function naming and whatnot

* use readline for better command line UX

* add readline to CI workflow
2025-03-09 09:14:12 +01:00
Levi Neely bc5452fc0a
Revert mbedtls3 migration (#114)
* Revert "migrate mbedtls to 3.x (#89)"

This reverts commit f87367211d.

* prevent multiple execution of psync_fs_do_sotp and use atexit in sig hnd

* remove debug.[ch] in favor of plibs debug

* eliminate pcompat

* Decompose namespaces and other cleanup

* add missing unistd.h to psys.c (#113)

* remove useless comment
2025-03-08 12:49:33 +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 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 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 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 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
Levi Neely c364996aad
Aur pkg prep (#35)
* version placeholder and makefile updates

* fixes
2024-08-15 10:47:59 +02:00
Levi Neely 536608ccd9
upgrade mbedtls to 2.x (#30)
* tagged mbedtls lib with version

* added source tree for mbedtls 2.1.14

* pcloudcc compiles with upgraded library mbedtls-2.x

* working on a segfault

* Revert "pcloudcc compiles with upgraded library mbedtls-2.x"

This reverts commit 8ccdb71ab8.

* build with debugging symbols

* trying a different approach; upgrading pupload.c

* updated mbedtls headers, using compat header

* all but pssl now using new headers

* updated pssl.h dependencies

* mbedtls2 rename.pl on all but pssl.{c,h}

* removed more commented code

* removed mbedtls-1.x from cmakelists

* program compiles with mbedtls 2.x, but remains offline.. why?

* removed mbedtls-1.x from source tree

* fixed handshake, now peer cert returning null

* mbedtls upgrade to 2.x completed!

* compat header removed; startcrypto no longer working

* fix start_crypto handler; need to check ret == 0

* fix linking problem on first login

* fixed startcrypto!
2024-08-14 23:50:09 +02:00
Levi Neely 27d34be43f
Fix finalize cmd crash (#29)
* build with debug symbols

* ignore overlay_client test binary

* fix SendCall memory leaks

* fixed crash, now investigating why it's returning failed

* safer sendcalls in control_tools

* error codes and stray strndup

* fixed finalize command crash

* removed ret from caller checks; fixed stopcrypto and startcrypto
2024-08-14 22:12:28 +02:00
Levi Neely 7801d1af76 more reorganization 2024-06-27 22:32:13 +02:00
Levi Neely 952f931be0 wrong option 2024-06-27 22:14:53 +02:00
Levi Neely 7343b7ec1e working on cmakelists and makefile 2024-06-27 22:14:32 +02:00
Levi Neely e7fae7b935 fixed makefile 2024-06-27 22:08:56 +02:00
Levi Neely 2a01c043ff simplified directory structure 2024-06-27 22:05:44 +02:00
Levi Neely 8c3d737815 pCloudCC/ formatting 2024-06-25 13:12:55 +02:00
Levi Neely 8a07a7b1e8 independent fork of pcloudcc/console-client 2024-06-25 01:09:07 +02:00