Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add com.todesk.ToDesk #5109

Draft
wants to merge 5 commits into
base: new-pr
Choose a base branch
from

Conversation

chenyuanrun
Copy link

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.

Please confirm your submission meets all the criteria

  • Please describe your application briefly.
  • I have read the App Requirements and App Maintenance pages.
  • My pull request follows the instructions at App Submission.
  • I have built and tested the submission locally.
  • I am using only the minimal set of permissions. (If not, please explain each non-standard permission.)
  • 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.)

Signed-off-by: Chen Yuanrun <chen-yuanrun@foxmail.com>
@chenyuanrun
Copy link
Author

bot, build com.todesk.ToDesk

@flathubbot
Copy link

Queued test build for com.todesk.ToDesk.

@flathubbot
Copy link

Started test build 111058

@flathubbot
Copy link

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

- --share=ipc
- --socket=x11
- --socket=pulseaudio
- --own-name=com.todesk.toc.ui
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you submit using this ID? If that's what they use internally.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think com.todesk.toc.ui is a good id for ToDesk, it is more like a internal implemention detail choosen by todesk.com and may be changed in the future if the implemention changes. ToDesk is the product name for this app from todesk.com, I think com.todesk.ToDesk is better and more stable than com.todesk.toc.ui.

com.todesk.ToDesk.yaml Outdated Show resolved Hide resolved
todesk.sh Outdated Show resolved Hide resolved
todesk.sh Outdated
export LIBVA_DRIVERS_PATH="$APP_HOME/todesk/bin"

"$APP_HOME/todesk/bin/ToDesk_Service" &
exec "$APP_HOME/todesk/bin/ToDesk"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would this run out of XDG_DATA_HOME ? Why do you copy things there? This feel like installing malware.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToDesk will create config files along with the binary files, so it must be run in a writable direcotry. All these files is come from todesk.com, and the app is still run inside the flatpak sandbox, so I think it is safe.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I think it is safe.

I beg to differ.

@chenyuanrun
Copy link
Author

@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

Signed-off-by: Chen Yuanrun <chen-yuanrun@foxmail.com>
@chenyuanrun
Copy link
Author

bot, build com.todesk.ToDesk

@flathubbot
Copy link

Queued test build for com.todesk.ToDesk.

@flathubbot
Copy link

Started test build 112198

@flathubbot
Copy link

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

@hfiguiere
Copy link
Contributor

and even Steam do the same thing

Two wrongs don't make a right.

@chenyuanrun
Copy link
Author

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.

@bbhtt
Copy link
Contributor

bbhtt commented Apr 4, 2024

Do you have any suggestions about this? @bbhtt

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

Signed-off-by: Chen Yuanrun <chen-yuanrun@foxmail.com>
@chenyuanrun
Copy link
Author

@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
Copy link
Author

bot, build com.todesk.ToDesk

@flathubbot
Copy link

Queued test build for com.todesk.ToDesk.

@flathubbot
Copy link

Started test build 112412

@flathubbot
Copy link

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

Signed-off-by: Chen Yuanrun <chen-yuanrun@foxmail.com>
@bbhtt
Copy link
Contributor

bbhtt commented Apr 6, 2024

bot, build com.todesk.ToDesk

@flathubbot
Copy link

Queued test build for com.todesk.ToDesk.

@flathubbot
Copy link

Started test build 112682

@bbhtt
Copy link
Contributor

bbhtt commented Apr 6, 2024

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.

@flathubbot
Copy link

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

@hfiguiere
Copy link
Contributor

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.

@chenyuanrun
Copy link
Author

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 chenyuanrun changed the title Add com.todesk.ToDesk WIP: Add com.todesk.ToDesk Apr 6, 2024
@chenyuanrun chenyuanrun marked this pull request as draft April 6, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants