Commit Graph

664 Commits

Author SHA1 Message Date
Roman Shevchenko
7951291cf3 Cleanup (minor optimization: PathInfo.ProviderPath is already a string)
(cherry picked from commit ddce5b19d4960c1382cded72fdf0a36df0908b84)

IJ-CR-149682

GitOrigin-RevId: 2d8b160df84f4f8775762f775f43c0c981ba87a8
2024-11-29 10:55:53 +00:00
Roman Shevchenko
c4c67df3c3 [platform] refining sub-path detection in the Defender configuration script (IJPL-164957)
(cherry picked from commit c11857dc34299b734a93acfbf035c2dcd5b36944)

IJ-CR-149682

GitOrigin-RevId: e0263de6336c8078cd897d9c5b5365e618953540
2024-11-29 10:55:53 +00:00
Vera Petrenkova
33ae337a93 IJPL-164957 Refine Windows Defender exclusions path comparison
Enhanced the `Test-Excluded` function to better handle directory paths by checking if the exclusion is a directory and ensuring it has more path segments than the excluded path. This improves the accuracy of determining whether a path should be excluded.


(cherry picked from commit e494da49d0722bbd599704d9e51c9d37e9a37987)

IJ-CR-149682

GitOrigin-RevId: d76f36bd247b9455f1c60d216a10f369d0b0f333
2024-11-29 10:55:53 +00:00
Roman Shevchenko
f4927410ed [platform] making the Defender configuration script expand paths only once
(cherry picked from commit c7679a8c40eb4f9640d009c141b382c2ca2b3b64)

IJ-CR-149419

GitOrigin-RevId: 2ad4dd17438bad9032d6dd7b2925fb3d4d561785
2024-11-18 21:50:59 +00:00
Roman Shevchenko
2938916539 [platform] skipping secured paths when processing the Defender exclusion list (IJPL-148226)
(cherry picked from commit 5a4c5c559226337aad96fac7799025f44055f44f)

IJ-CR-149481

GitOrigin-RevId: b556a1b0973db042d5ccd89bf767b4693964ff4f
2024-11-18 21:00:01 +00:00
Ilya.Kazakevich
13a8d6d4e1 IJPL-164725: aarch64 version of wslproxy
Version version (x86) was used by accident


(cherry picked from commit 587b58a59e9229217a99c7f4798763bd7f7c0a7f)

KT-CR-18867

GitOrigin-RevId: 7c24c5983482b19c1856608fc47671075b5a15f1
2024-11-09 14:32:47 +00:00
Roman Shevchenko
08f643e0c7 [platform] skipping invalid patterns when processing the Defender exclusion list; improving diagnostics (IJPL-37118)
GitOrigin-RevId: 44068fea0f2e12f8dc66169638734fa47a1f0a3d
2024-09-03 11:59:23 +00:00
artem.bochkarev
336265215c IJPL-156149 Drop support of GLobalMenuLinux
cleanup java code

GitOrigin-RevId: 549cfbe58406612d44960f43ff07edcac813719b
2024-07-15 07:26:15 +00:00
Roman Shevchenko
63dd4ab11b [platform] replacing old Windows restarter with the new unified one (IJPL-34858)
GitOrigin-RevId: d76f3d239ee24444608d5c9edae88d95ddc843f0
2024-05-04 07:33:38 +02:00
Ilya.Kazakevich
ae0ed41348 [wslproxy]: survive closed socket, close socket correctly.
1.When remote side socket is closed, `SIGPIPE` might be sent. We must ignore and exit correctly (we can't die as we might accept more connections)

2. shutdown and close sockets will inform remote side that socket is closed. Without it, remote side may not notice anything until the next write.

GitOrigin-RevId: 51a6204651e49f63ac8b52d9e3e1e4928007c3ff
2024-05-01 21:06:34 +00:00
Roman Shevchenko
33df479eb8 [platform] ignoring "unknown drive" problems in the Defender configuration script (IJPL-37014)
GitOrigin-RevId: fbbaef70510d71c24d054851872118e32430bde4
2024-04-24 16:04:43 +00:00
Roman Shevchenko
a49624747f [platform] making the Defender configuration script resilient to missing excluded directories (IDEA-333056)
GitOrigin-RevId: e1d3c4813f65c88f08357bf6d0c0e1df7e502336
2023-11-24 11:11:48 +01:00
Ilya.Kazakevich
1ad4002475 CPP-35902: Fix SHELL variable when running under WSL with ttyfix
Due to https://github.com/microsoft/WSL/issues/10718 `SHELL` var is set to `ttyfix` breaking `gdb`.

We now:
1. Check if first argument (command to execute) is a valid shell and set `SHELL` accordingly
2. If not, check user default shell. Be it a valid shell, we use it
3. Unset `SHELL` otherwise

Review:
https://jetbrains.team/p/ij/reviews/118965/timeline

GitOrigin-RevId: 425b6886b4b48e29f653413c62326afa8033c694
2023-11-07 03:03:04 +00:00
Ilya.Kazakevich
5ac166f9bc wsltools: strip binaries to decrease size a little
GitOrigin-RevId: eacc71baa8de941c34fad1abe4eb101784806fca
2023-11-06 21:02:52 +00:00
Ilya.Kazakevich
44be55aeee IDEA-333736: Fix tty size for WSL
The problem:
https://github.com/microsoft/WSL/issues/10701

When stdout/err are redirected, WSL reports tty size as 1x1 which breaks `ps` tool (famous "expect trouble" message) that some people might have in profile.

`ttyfix` explicitly sets tty size and inserted by `WslDistribution`.

Tiny refactoring moved `getToolPath` to reuse it


Merge-request: KT-MR-12821
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: f33a906b139d22ecdaf0f1b0616ecaaf7bebdd16
2023-11-03 15:35:26 +00:00
Roman Shevchenko
8c0ffaaded [platform] using new restarter on Linux (IDEA-327235 prerequisite)
GitOrigin-RevId: ec238fb9cb8c21ffc6df8c393d45d8556c70bf96
2023-09-29 19:42:15 +00:00
Roman Shevchenko
d9dc08c673 [platform] using new restarter on macOS (IDEA-327235 prerequisite)
GitOrigin-RevId: 1c669198cd2d7a95358de8b79c7fb4256f2b8d1c
2023-09-28 22:39:56 +00:00
Artem Bochkarev
1d4e3aa898 IDEA-319117 call menuNeedsUpdate from menuWillOpen if necessary
and also remove unnecessary fillMenu() from menuWillOpen

GitOrigin-RevId: f7bf20c03fb629c08f66da2d21eb200cfdf728ad
2023-05-01 17:22:08 +00:00
Artem Bochkarev
ef91229aeb IDEA-315910 don't process key-events by NSMenu items
GitOrigin-RevId: 28b8d792bfe65bf8a468e17a199ca9445155c35f
2023-04-19 14:50:43 +00:00
Artem Bochkarev
1ea1c6f959 IDEA-315910 update binary
GitOrigin-RevId: 867a1cd5e6843f4dbd09231975c6feb492bb8c3b
2023-04-19 09:01:51 +00:00
Artem Bochkarev
ca6fa04dc4 IDEA-315910 update binary
GitOrigin-RevId: fdc37efa6e855c34bd7099c4063e577506ada743
2023-04-18 16:34:41 +00:00
Maxat Mansurov
29da655cee RUBY-31136 add option to WslSync for creating stubs for filtered out files.
(cherry picked from commit fdadb26083074b6e510df5c8b66bb3ee13bdb8c3)

IJ-CR-105378

GitOrigin-RevId: b5d0d16b1bba3802191775d9400b23205242238f
2023-03-27 21:47:10 +00:00
Ilya.Kazakevich
eb7bca7328 PY-59608: Support `wslproxy` when routing is broken by VPN.
fixup! PY-59608: Support ``wslproxy`` when routing is broken by VPN.

When user runs VPN with default gateway pointing to the VPN server and configures interface weight, we can't connect to WSL using its egress IP (traffic to ``172.0.0.0/8`` goes to VPN instead of WSL).

With ``wsl.proxy.connect.localhost`` enabled in registry we bind ``wslproxy`` to ``127.0.0.1`` which could be used in latest WSL2 to connect from Windows to Linux. It is a little bit slow, but still works.

fixup! PY-59608: Support ``wslproxy`` when routing is broken by VPN.
PY-59608: Support ``wslproxy`` when routing is broken by VPN.

When user runs VPN with default gateway pointing to the VPN server and configures interface weight, we can't connect to WSL using its egress IP (traffic to ``172.0.0.0/8`` goes to VPN instead of WSL).

With ``wsl.proxy.connect.localhost`` enabled in registry we bind ``wslproxy`` to ``127.0.0.1`` which could be used in latest WSL2 to connect from Windows to Linux. It is a little bit slow, but still works.


Co-authored-by: Vladimir Lagunov <vladimir.lagunov@jetbrains.com>

Merge-request: IJ-MR-105285
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 74b5ad4df9c5e95ca4ef53a465f07855a92aa324
2023-03-24 19:15:50 +00:00
Roman Shevchenko
21ecab3e0a [ui] following Defender rebranding in corresponding notifications (IDEA-298058)
GitOrigin-RevId: a13525c886b59bab9b19a92d005b5bbe2eb3da63
2023-03-02 13:49:04 +00:00
Maxat Mansurov
c609fb1643 RUBY-29825 add support for filters to wslhash.c.
Currently, filters support only includes and excludes of files matching the regex patterns. But it should be fairly easy to extend this with other types of filters in the future.

Reviewed-by: IJ-CR-102814

GitOrigin-RevId: 80b7e33aa4d6f89b8a9279d4aa2648783e363bf4
2023-02-28 15:35:14 +00:00
Maxat Mansurov
61bdde3cfa RUBY-29825 clean up wslhash.c sources.
- fixed uninitialized memory accesses
- use proper boolean constant
- reformat (naming, braces, ...)

Reviewed-by: IJ-CR-102814

GitOrigin-RevId: bf415ab0e135787ab6b99965c1443520c7dd590d
2023-02-28 15:35:11 +00:00
Roman Shevchenko
3593e6a1fa [platform] synchronizing WSL fsnotifier binaries with their Linux counterparts
GitOrigin-RevId: 77212e040e1caec7fec981157a74bf1a2fc45bc2
2023-02-10 11:07:10 +00:00
Roman Shevchenko
2b91210de7 [platform] correct population of initially empty Windows Defender exclusion list (IDEA-311426)
GitOrigin-RevId: d5180c7921253278c953a98017ea62369868082f
2023-02-02 09:27:24 +00:00
Roman Shevchenko
853ac54288 [platform] using the full path for invoking restart.py under Linux; preferring Python 3 (IDEA-279337)
GitOrigin-RevId: c8c0fd2ad25359b6ce55a1a20e5b8609efea6d1a
2023-01-16 19:36:19 +00:00
Roman Shevchenko
b0e2bc415f [platform] setting Windows Defender helper script diagnostic output encoding (IDEA-224689)
GitOrigin-RevId: a1d43d955ada2b2d70278337c5f6e8804f14a0a5
2023-01-16 11:39:04 +00:00
Roman Shevchenko
5c2eec522d [platform] changing the way the Windows Defender checker works (IDEA-298058)
GitOrigin-RevId: 64a290b7e8d7d56854bc7ae9f6d7f665be057285
2022-12-28 14:43:53 +00:00
Gregory.Shrago
7d5e20ae93 drop ancient and now dangerous "idea.ProcessCanceledException"
See IDEA-304945 and async action update.

GitOrigin-RevId: 7a10430fcdf52c65bd110114627fa5b0bb6b2a93
2022-11-12 11:47:44 +00:00
Ilya.Kazakevich
65a8ccb6c5 PY-57058: Skip interfaces with NULL addresses (wslproxy)
``ifaddrs->ifa_addr`` may be NULL according to ``getifaddr(3)``.

This is a case for the tailscale VPN at least

GitOrigin-RevId: 134cd2bcf03a01b6c52536e23b86a1135450d67b
2022-11-02 18:53:01 +00:00
Roman Shevchenko
4f73c9a0c3 [platform] getting rid of [somewhat speedier but nevertheless problematic] Windows FS helper
GitOrigin-RevId: 41b738ffb7c1fd3f4daf224782a9f2008a9d6b10
2022-10-17 20:12:21 +00:00
Roman Shevchenko
26c73abdee [vfs] even stricter input checks in macOS filesystem event helper (IJ-CR-95917)
GitOrigin-RevId: 53018f36f7a79d8d10cf1e5a569e18b707aeef99
2022-10-07 18:12:01 +00:00
Ilya.Kazakevich
e50e14ed8f Set TCP_NODELAY for `WSLProxy` to disable Nagle for interactivity
GitOrigin-RevId: 60995cbab5ab04ec5c1da3904b7311ead1a52aaf
2022-10-06 15:35:23 +00:00
Roman Shevchenko
514c4286a8 [vfs] stricter input checks in macOS filesystem event helper (IJ-CR-95917)
GitOrigin-RevId: 2515283e17942a43d570c8a9cba80d4d4b26d978
2022-10-05 10:11:50 +00:00
Roman Shevchenko
1c3fcb41fd [vfs] checking input bounds in macOS filesystem event helper (IDEA-302494)
GitOrigin-RevId: fb8a71627641018341b5040655f9508847c19b4f
2022-09-27 11:06:13 +00:00
Vladislav Rassokhin
90a833f4ee IDEA-296416 Add Windows ARM64 version of native binaries
`fsnotifier-wsl` is just copy of `../../linux/aarch64/fsnotifier`

GitOrigin-RevId: 106009c3731b42a2687ed05b353f6a0dd3f4b37f
2022-09-19 15:49:51 +00:00
Vladislav Rassokhin
9364c35ca2 [build-scripts] rearrange Windows binaries, arch-independent names of binary artifacts (IDEA-296416)
GitOrigin-RevId: daed16a5ad0a875d82e94e3908edbe1fe0af975f
2022-09-07 20:46:59 +00:00
Arseny.Chernyaev
00bf3987ff retrieve parent process id while obtaining processes list
(cherry picked from commit 70e08724586cc553aadfd250231688e0a3566d7c)

IJ-MR-94381

GitOrigin-RevId: 684864540480750d36cf51837300174cb1e927aa
2022-08-22 21:23:07 +00:00
Artem Bochkarev
f39cc03d92 IDEA-298038: avoid complete clearing of appmenu
GitOrigin-RevId: 8b1e4110839b1e35b606af62dac211c5d782712a
2022-08-02 10:52:45 +00:00
Artem Bochkarev
1cdfbcad75 IDEA-296486: minor correction (syntax)
fixed remark from review

GitOrigin-RevId: cc976db4791656b6429e250b8f3c3895d72724e1
2022-07-12 08:17:42 +00:00
Artem Bochkarev
289753525f IDEA-296486: remake renaming appmenu items
rename all items in single function call on AppKit without waiting

GitOrigin-RevId: 576a5b67f2620734e4d2ff65e651202ec3af1aa5
2022-07-11 19:07:23 +00:00
Roman Shevchenko
4d07e99dc1 [platform] updating Linux fsnotifier binaries with pinned artifacts
GitOrigin-RevId: 21d96dd91492bfb88fbb4c1dd2d28dbe04bd632e
2022-06-13 13:23:25 +00:00
Roman Shevchenko
825c930c50 [platform] arch-independent names of Linux binary artifacts
GitOrigin-RevId: cf35459a0cce96ba1b21b8462c784933f51d58e5
2022-06-13 10:34:02 +00:00
Artem Bochkarev
11c77aa610 IDEA-295159: obtain appmenu pointer on AppKit-thread
GitOrigin-RevId: a4ddefe47da198159fb64a2af2962083327e3344
2022-06-11 10:29:16 +00:00
Vladislav Rassokhin
0e8583fec9 [linux-menu] add libdbm for aarch64, rebuild for x86_64
GitOrigin-RevId: e294f90bca177e99765245e44e399f259b50e9fe
2022-05-30 07:56:36 +00:00
Vladislav Rassokhin
314890b18a IJI-844 Update fsnotifier for Linux to 222.2688
GitOrigin-RevId: 08e341d58df3609e41ee0857b87ec43097eab2cb
2022-05-30 07:56:11 +00:00
Roman Shevchenko
b9904cdf9f [platform] uniform I/O calls in macOS printenv; formatting (binary)
GitOrigin-RevId: eb9d1f07dbb3abb908d522d8e31f40fdd80be277
2022-04-22 21:52:56 +00:00