flathub icon indicating copy to clipboard operation
flathub copied to clipboard

WIP: Add com.todesk.ToDesk

Open chenyuanrun opened this issue 10 months ago • 24 comments

ToDesk as a safe and free unlimited remote control software, through the leading network technology to build and operate their own network system, with global coverage of multi-node, multi-service, milliseconds latency application layer routing system, bringing the user like the use of local computers like the sense of experience. Support in any scenario at any time remotely connected to the company or personal off-site equipment, not only with file transfer, remote printing, remote control camera, privacy screen, security verification of confidentiality and many other features, but also to achieve the management of unattended equipment, operation and maintenance, while enterprise business personnel can be ToDesk remote support for external partners, external equipment, customer SOS services.

  • Home page: https://www.todesk.com/
  • Linux download page: https://www.todesk.com/linux.html

Please confirm your submission meets all the criteria

  • [x] Please describe your application briefly.
  • [x] I have read the App Requirements and App Maintenance pages.
  • [x] My pull request follows the instructions at App Submission.
  • [x] I have built and tested the submission locally.
  • [x] I am using only the minimal set of permissions. (If not, please explain each non-standard permission.)
  • [x] All assets referenced in the manifest are redistributable by any party. If not, the unredistributable parts are using an extra-data source type.
  • [ ] I am an author/developer/upstream contributor of the project. If not, I contacted upstream developers about submitting their software to Flathub. Link:
  • [ ] The domain used for the application ID is controlled by the application developers either directly or through the code hosting (e.g. GitHub, GitLab, SourceForge, etc.). The application id guidelines are followed.
  • [ ] Any additional patches or files have been submitted to the upstream projects concerned. (If not, explain why.)

chenyuanrun avatar Mar 31 '24 05:03 chenyuanrun

bot, build com.todesk.ToDesk

chenyuanrun avatar Mar 31 '24 05:03 chenyuanrun

Queued test build for com.todesk.ToDesk.

flathubbot avatar Mar 31 '24 05:03 flathubbot

Started test build 111058

flathubbot avatar Mar 31 '24 05:03 flathubbot

Build 111058 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/93873/com.todesk.ToDesk.flatpakref

flathubbot avatar Mar 31 '24 05:03 flathubbot

@hfiguiere

I trace the syscall of ToDesk_Service and it show that ToDesk_Service will create config files in the upper directory of the executable file:

14    readlink("/proc/self/exe", "/app/extra/todesk/bin/ToDesk_Service", 4096) = 36
14    openat(AT_FDCWD, "/app/extra/todesk/config/hotkey.json", O_RDONLY) = -1 ENOENT (No such file or directory)
14    access("/app/extra/todesk/config/config.ini", F_OK) = -1 ENOENT (No such file or directory)
14    access("/app", F_OK)              = 0
14    access("/app/extra", F_OK)        = 0
14    access("/app/extra/todesk", F_OK) = 0
14    access("/app/extra/todesk/config", F_OK) = -1 ENOENT (No such file or directory)
14    mkdir("/app/extra/todesk/config", 0755) = -1 EROFS (Read-only file system)
14    access("/app/extra/todesk/config/config.ini", F_OK) = -1 ENOENT (No such file or directory)
14    access("/app", F_OK)              = 0
14    access("/app/extra", F_OK)        = 0
14    access("/app/extra/todesk", F_OK) = 0
14    access("/app/extra/todesk/config", F_OK) = -1 ENOENT (No such file or directory)
14    mkdir("/app/extra/todesk/config", 0755) = -1 EROFS (Read-only file system)
14    access("/app/extra/todesk/config/config.ini", F_OK) = -1 ENOENT (No such file or directory)
14    access("/app", F_OK)              = 0
14    access("/app/extra", F_OK)        = 0
14    access("/app/extra/todesk", F_OK) = 0
14    access("/app/extra/todesk/config", F_OK) = -1 ENOENT (No such file or directory)
14    mkdir("/app/extra/todesk/config", 0755) = -1 EROFS (Read-only file system)
14    newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=561, ...}, 0) = 0
14    access("/app/extra/todesk/config/config.ini", F_OK) = -1 ENOENT (No such file or directory)
14    access("/app", F_OK)              = 0
14    access("/app/extra", F_OK)        = 0
14    access("/app/extra/todesk", F_OK) = 0
14    access("/app/extra/todesk/config", F_OK) = -1 ENOENT (No such file or directory)
14    mkdir("/app/extra/todesk/config", 0755) = -1 EROFS (Read-only file system)

That is the reason that I need to copy the binary files to a writable direcotry, and even Steam do the same thing while you first start it or install games from the store. Could I know what your security concerns are here?

Do you have any suggestions about this? @bbhtt

chenyuanrun avatar Apr 04 '24 07:04 chenyuanrun

bot, build com.todesk.ToDesk

chenyuanrun avatar Apr 04 '24 07:04 chenyuanrun

Queued test build for com.todesk.ToDesk.

flathubbot avatar Apr 04 '24 07:04 flathubbot

Started test build 112198

flathubbot avatar Apr 04 '24 07:04 flathubbot

Build 112198 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/95013/com.todesk.ToDesk.flatpakref

flathubbot avatar Apr 04 '24 07:04 flathubbot

and even Steam do the same thing

Two wrongs don't make a right.

hfiguiere avatar Apr 04 '24 11:04 hfiguiere

and even Steam do the same thing

Two wrongs don't make a right.

I'll report it to the upstream and wait for them to fix it.

chenyuanrun avatar Apr 04 '24 11:04 chenyuanrun

Do you have any suggestions about this? @bbhtt

No other than the app should be fixed, it's a poor solution.

bbhtt avatar Apr 04 '24 14:04 bbhtt

@hfiguiere @bbhtt I have added a preload library to cheat the app for it's executable path, and it work now without coping all the files to XDG_DATA_HOME, can you review this again?

chenyuanrun avatar Apr 05 '24 04:04 chenyuanrun

bot, build com.todesk.ToDesk

chenyuanrun avatar Apr 05 '24 06:04 chenyuanrun

Queued test build for com.todesk.ToDesk.

flathubbot avatar Apr 05 '24 06:04 flathubbot

Started test build 112412

flathubbot avatar Apr 05 '24 07:04 flathubbot

Build 112412 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/95227/com.todesk.ToDesk.flatpakref

flathubbot avatar Apr 05 '24 07:04 flathubbot

bot, build com.todesk.ToDesk

bbhtt avatar Apr 06 '24 10:04 bbhtt

Queued test build for com.todesk.ToDesk.

flathubbot avatar Apr 06 '24 10:04 flathubbot

Started test build 112682

flathubbot avatar Apr 06 '24 10:04 flathubbot

Personally I would've preferred to not have a C library live in Flathub repo and wait for upstream. But none are very ideal solutions in this situation.

bbhtt avatar Apr 06 '24 10:04 bbhtt

Build 112682 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/95495/com.todesk.ToDesk.flatpakref

flathubbot avatar Apr 06 '24 10:04 flathubbot

Personally I would've preferred to not have a C library live in Flathub repo and wait for upstream. But none are very ideal solutions in this situation.

Seriously. A remote control software, that is supposed to be secure, that needs to be in a r/w location to run. What other basic security violation do they do we can't see since it's proprietary?

Very suspicious. So many red flags.

hfiguiere avatar Apr 06 '24 13:04 hfiguiere

Personally I would've preferred to not have a C library live in Flathub repo and wait for upstream. But none are very ideal solutions in this situation.

Seriously. A remote control software, that is supposed to be secure, that needs to be in a r/w location to run. What other basic security violation do they do we can't see since it's proprietary?

Very suspicious. So many red flags.

I quite agree with you.

ToDesk need a service call ToDesk_Service to run in background, and it is this process that needs to create the configuration file. In a traditional deployment (deb or rpm), ToDesk_Service run as root (as a systemd service) and have the permission to create the configuration file anywhere it want. This is totally bad, unsafe and ugly.

I need this software to connect to my company (I pay for it), I have sent a email to them and I will mark this PR as WIP until they change their behaviors, before that I will use my local build.

chenyuanrun avatar Apr 06 '24 15:04 chenyuanrun