456 Commits
Author SHA1 Message Date
igorshandIgor Shutrov 8ca3758efb apps/ftpd: bound the pasv port search (#710)
On a failed bind cmdPASV jumped straight back to .next_port, and
nextpasvport wraps within [start, end], so a range with no usable port
spun forever without reading the control connection again: the client
hangs.

Count the ports in the range (end - start + 1), decrement after a
failed bind and give up at zero, then close the listener, reset the
state and answer 425 Can't open data connection. The counter lives in a
new thread_data field rather than a register, because mcall bind
clobbers eax/ebx/ecx/edx/esi/edi and esi already carries the sockaddr
length for bind. Decrementing after the failed bind and not before the
next attempt is what keeps a single-port range (start = end) working:
it still gets its one attempt.

Also validate the pair read from the ini. With start > end the range
degenerates and no port is bindable, so fall back to 2000/5000.

---------

Co-authored-by: Igor Shutrov <kolibridev@inbox.ru>
Reviewed-on: KolibriOS/kolibrios#710
Reviewed-by: Kiril Lipatov <lipatov.kiril@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: Igor shutrov <kolibridev@mail.ru>
2026-09-25 09:17:16 +00:00
0150178c90 ftpd: actually close the passive listening socket (#707)
mcall close takes the socket number in ecx, but the operand was
commented out in the two places that close the PASV listener, so close
ran with whatever ecx happened to hold. Both call sites had just put the
listener in ecx, so the socket was closed by accident: the code worked
only as long as that accident held. The cmdPASV cleanup was commented
out completely, so a second PASV before the client connected left the
previous listener open.

Restore the operand in threadloop (ftpd.asm) and in open_datasock, and
re-enable the cmdPASV prologue, which also resets passivesocknum to -1.

Closing the data socket needed the same care: datasocketnum only holds
a live socket in MODE_PASSIVE_OK and MODE_ACTIVE, so the new
close_data_sock helper closes it in those two states only. The
.cannot_open label is also reachable before open_datasock runs (the
length checks at the top of cmdSTOR), where datasocketnum is either
stale or never initialised, and closing it unconditionally there could
have closed an unrelated socket that had reused the number. The field
is now initialised to -1 at thread start and reset to -1 after every
close.

---------

Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-authored-by: Igor Shutrov <kolibridev@inbox.ru>
Reviewed-on: KolibriOS/kolibrios#707
Reviewed-by: Kiril Lipatov <lipatov.kiril@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: igorsh <kolibridev@mail.ru>
2026-09-19 23:45:35 +00:00
3caf2a7a72 apps/ftpd: truncate the file on STOR instead of overwriting in place (#706)
cmdSTOR opens the destination with O_CREATE + O_WRITE, and libio only
truncates on write when the position is already at EOF (libio.asm:314),
which never happens here. Replacing a longer file with a shorter one
therefore kept the old tail: 4096-byte A overwritten by 1024-byte B
produced a 4096-byte file holding B followed by A[1024:4096], and
overwriting with zero bytes left the file completely untouched.

Call file.truncate (SF 70.4, size = Position = 0) right after a
successful open so that STOR replaces the file, as RFC 959 requires.
The descriptor survives the call in ebx because sendFTP clobbers the
registers. A failed truncate closes the descriptor and answers 550
through a new .truncate_error path.

The libio import list gains file_truncate, exported since 2009.

-------------------------

STOR: усекать файл при перезаписи, чтобы не оставался старый хвост

Проблема

cmdSTOR открывает целевой файл с O_CREATE + O_WRITE, а libio усекает файл при записи только если позиция уже находится в EOF (libio.asm:314). В этом сценарии условие никогда не выполняется. Поэтому при замене длинного файла коротким сохранялся старый хвост: 4096-байтный A, перезаписанный 1024-байтным B, давал 4096-байтный файл, содержащий B, а затем A[1024:4096]. Перезапись нулевым количеством байт вообще не изменяла файл.

Решение

Сразу после успешного открытия вызывается file.truncate (SF 70.4, size = Position = 0), чтобы STOR заменял файл, как требует RFC 959. Дескриптор сохраняется в ebx после вызова, так как sendFTP затирает регистры. Если truncate завершается ошибкой, дескриптор закрывается, а ответ 550 отправляется через новый обработчик .truncate_error.

Дополнительно

В список импортов libio добавлен file_truncate (экспортируется с 2009 года).
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-authored-by: Igor Shutrov <kolibridev@inbox.ru>
Reviewed-on: KolibriOS/kolibrios#706
Reviewed-by: Kiril Lipatov <lipatov.kiril@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: igorsh <kolibridev@mail.ru>
2026-09-19 16:56:31 +00:00
Leency 02070aa233 zeroconf: do not report IP conflict when device is gone (#677)
Sysfn 76 returns -1 for a missing device. The ARP conflict counter
check in .maintain_link treats any change of the value as a new
conflict, so when a device disappeared the counter jumped 0 -> -1 -> 0
across the reconnect and a bogus "IP address conflict" notification
popped up on every replug of a USB network device.

Skip the check when the query fails.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Reviewed-on: KolibriOS/kolibrios#677
Reviewed-by: hidnplayr <hidnplayr@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
2026-09-03 10:12:36 +00:00
Leency 44465b3cc2 zeroconf: restart DHCP after network device removal (#676)
Sysfn 74 returns -1 for a missing device, not 0, so the device-presence
check in .maintain_link never took the .link_down path and the interface
stayed in connected state forever. As a result DHCP was never restarted
when a device reappeared on the same slot (e.g. an Android phone
re-enumerating in RNDIS tethering mode with a new random MAC), leaving
the interface with a stale IP and a dead gateway.

Compare against 1 (Ethernet), the same way the .link_up? path already
does, so a vanished device properly resets the interface state and DHCP
runs again on reconnect.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Reviewed-on: KolibriOS/kolibrios#676
Reviewed-by: hidnplayr <hidnplayr@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
2026-09-03 09:51:49 +00:00
Leency 1215116155 add netsurf app that download and run (or only run) the NeSurf (#648)
+ update icon path, add to menu

Reviewed-on: KolibriOS/kolibrios#648
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
2026-08-17 16:32:03 +00:00
Doczom 850ddc3a64 App/socketdbg: updated *SOCKET structs and fixed stack in loop 2026-06-21 12:49:43 +00:00
Igor ShutrovandBurer ae758389f5 apps/ftpd: add MKD command (#342)
- Add MKD command
- Add universal table of filesystem errors

---------

Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#342
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: Igor Shutrov <kolibridev@inbox.ru>
Co-committed-by: Igor Shutrov <kolibridev@inbox.ru>
2026-06-07 17:12:18 +00:00
LeencyandBurer 9b450ff4aa apps/downloader: rename to httpget to fit into 8.3 (author accepted the change), unify web programs names in menu (#465)
Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#465
Reviewed-by: Burer <burer@kolibrios.org>
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2026-06-04 11:48:09 +00:00
LeencyandBurer 1a3c1e7173 apps/ftpc: update kolibrios ftp server address, make files browser higher (#464)
Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#464
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2026-06-04 08:38:46 +00:00
Igor ShutrovandBurer 68f0454682 ftpd: Add RMD command (#353)
Added RMD command

---------

Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#353
Reviewed-by: Burer <burer@kolibrios.org>
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Co-authored-by: Igor Shutrov <kolibridev@inbox.ru>
Co-committed-by: Igor Shutrov <kolibridev@inbox.ru>
2026-05-19 18:40:19 +00:00
Egor00fandBurer 175bd31489 add autobuild of some tcc libs (#339)
Implement autobuild for(this libs in [`programs/develop/ktcc/bin/lib/`](https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/programs/develop/ktcc/bin/lib)):
+ `crt0.o`
+ `libtcc1.a`
+ `tiny.o`
+ `libshell.a`
+ `libcryptal.a`
+ `libsound.a`

it autobuild for kolibrios image and programs build.

`link_tcc` automatically add this libs to `extra_inputs`

roots of this grow from #311

---------

Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#339
Reviewed-by: Burer <burer@kolibrios.org>
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Co-authored-by: Егор <y.yarin@inbox.ru>
Co-committed-by: Егор <y.yarin@inbox.ru>
2026-05-16 08:30:18 +00:00
ace-dent 2cda4a9682 libraries/box_lib: Post-SVN tidy (#433)
- Move source code from `trunk` into root directory.
- Update build files and ASM include paths. Add SPDX license header where appropriate.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.

(Work towards [#75](KolibriOS/kolibrios#75), point 3)

Reviewed-on: KolibriOS/kolibrios#433
Reviewed-by: Burer <burer@kolibrios.org>
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Co-authored-by: Andrew <dent.ace@gmail.com>
Co-committed-by: Andrew <dent.ace@gmail.com>
2026-04-23 11:50:10 +00:00
ace-dentandBurer a4f3f3545a develop/ktcc: Post-SVN tidy (#425)
- Move source code from `trunk` into root directory.
- Update build files and ASM include paths. Add SPDX license header where appropriate.
- These changes also update the CI build files in `.gitea/workflows/`.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.

(Work towards [#75](KolibriOS/kolibrios#75), point 3)

---------

Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#425
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: Andrew <dent.ace@gmail.com>
Co-committed-by: Andrew <dent.ace@gmail.com>
2026-04-19 16:41:37 +00:00
Igor Shutrov f9425f5bd0 ftpd: Add help command 2026-02-23 21:18:26 +00:00
Igor Shutrov 668fd4deeb ftpd: add ip to first message 2026-02-17 22:08:04 +05:00
c580d4ac5b ftpd: Add XPWD and XCWD commands (#309)
Добавлены команды XPWD и XCWD, дублирующие PWD и CWD

Co-authored-by: Igor Shutrov <igor@shutrov.ru>
Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#309
Reviewed-by: Burer <burer@noreply.localhost>
Co-authored-by: igorsh <kolibridev@inbox.ru>
Co-committed-by: igorsh <kolibridev@inbox.ru>
2026-01-08 17:03:23 +00:00
Igor Shutrov 17c33521c3 ftpd: Fix typo 2026-01-07 19:41:28 +00:00
Igor Shutrov f6395c9501 ftpd: Fix typo 2026-01-07 19:41:28 +00:00
Igor Shutrov 000288ce8b ftpd: Fix RETR for small and empty files 2026-01-06 18:20:39 +00:00
Igor Shutrov bc5b2f884a Remove redundant space before 220 code 2025-12-29 06:32:40 +00:00
b00bl1k 11562988b1 Fix ftpc crash 2025-06-12 19:31:16 +02:00
IgorA 75b6663ce0 Ftpc: Update (#185)
- fix for bugs with buffers 'remote_list_buf', 'buf_buffer2';
- fix stack leak when navigating files;
- change sorting of folders and files, clean code;
- added option to show|hide log;
- icons are taken from @reshare;
- added icons to the 'disconnect' and 'search' buttons.

Reviewed-on: KolibriOS/kolibrios#185
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: IgorA <aie85playm@gmail.com>
Co-committed-by: IgorA <aie85playm@gmail.com>
2025-04-10 18:47:13 +02:00
ace-dent f4fd3f6ea0 Fix EN typos
- Corrections for en_US language.
- Some whitespace sanitation.

git-svn-id: svn://kolibrios.org@10062 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-05-29 14:27:12 +00:00
ace-dent 2d3e0ac7f4 Fix EN typos
- Corrections for en_US language.
- Some whitespace sanitation.

git-svn-id: svn://kolibrios.org@10061 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-05-29 12:47:33 +00:00
ace_dent 4febef90c3 Optimize png files for network/ftpc
Lossless optimization of png image files, using `pngslim` and other tools.
Program graphics (compiled or included with software):
- Slimmed 102 B (~102 B kpacked), average ~11% saving for 2 files.

git-svn-id: svn://kolibrios.org@10024 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-05-13 13:13:12 +00:00
hidnplayr 5f4e6c65ce Bugfix in CTCP
git-svn-id: svn://kolibrios.org@9992 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-03-11 21:52:38 +00:00
hidnplayr 97d2b9be48 Automatic algorithm selection.
git-svn-id: svn://kolibrios.org@9991 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-03-10 18:38:46 +00:00
hidnplayr cc6df1e340 Added support for encrypt-then-mac modes (hmac-sha2-256-etm,hmac-sha2-512-etm)
git-svn-id: svn://kolibrios.org@9990 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-03-09 20:05:21 +00:00
hidnplayr c60d5b31c6 -Added Poly1305-Chacha20 cipher (new hardcoded default)
-Use HMAC and CTR/CBC from libcrash instead of our own implementations
-Fixed stack allocation for keystroke handler thread

git-svn-id: svn://kolibrios.org@9987 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-03-06 20:22:01 +00:00
hidnplayr 199ad2d9a4 Small speedup in modular exponentation routine (still not side channel resiliant)
git-svn-id: svn://kolibrios.org@9985 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-03-05 19:57:16 +00:00
hidnplayr eb7e44a0e0 Fixed bug when parsing JOIN command.
Implemented proper handeling of partially received commands.

git-svn-id: svn://kolibrios.org@9984 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-03-05 09:49:00 +00:00
hidnplayr a190416448 -Fixed bug where some commands were terminated with \r\r instead of \r\n
git-svn-id: svn://kolibrios.org@9981 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-02-28 20:48:02 +00:00
hidnplayr e102235346 Allow cursor keys in editboxes (as mentioned in bug #153)
git-svn-id: svn://kolibrios.org@9980 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-02-23 21:37:26 +00:00
hidnplayr 1c69f80f04 -Fixed bug #150: ping reply length
-Fixed bug where some commands were terminated with \n\r instead of \r\n

git-svn-id: svn://kolibrios.org@9979 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-02-23 21:15:46 +00:00
hidnplayr 32b5aca57d Fixed bug #149 : parsing of subsequent non-printable characters
git-svn-id: svn://kolibrios.org@9978 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-02-23 16:55:00 +00:00
Doczom 7f50e02fca FTPd: added the DELE and STOR functions, fixed the output code for the new connection
git-svn-id: svn://kolibrios.org@9916 a494cfbc-eb01-0410-851d-a64ba20cac60
2023-06-08 05:55:41 +00:00
Doczom 171a745608 ircc: small fix
git-svn-id: svn://kolibrios.org@9826 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-05-31 18:31:22 +00:00
turbocat 23e31695bd Whois: Now uses auto-import.
git-svn-id: svn://kolibrios.org@9658 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-01-18 19:50:12 +00:00
vitalkrilov 46d9482bb0 Fixed misuse of "/rd/1" (changed to "/sys") for all other programs
git-svn-id: svn://kolibrios.org@9587 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-01-07 12:42:44 +00:00
sdongles 99057c5ac7 AR8152: activate supporting by serzhu
git-svn-id: svn://kolibrios.org@9569 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-01-04 04:14:56 +00:00
IgorA 0311a61f7f fix function name 'edit_box' to 'edit_box_draw'
git-svn-id: svn://kolibrios.org@9568 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-01-03 21:03:06 +00:00
hidnplayr 3aa9014b7b add very simple UDP server example
git-svn-id: svn://kolibrios.org@9228 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-11-01 07:19:05 +00:00
dunkaist 553742f877 libcrash: sync with upstream.
* Implement new algorithms:
  - MACs: Poly1305, HMAC (SHA2_256, SHA2_512),
  - ciphers: ChaCha20, AES256CTR, AES256CBC.
* Remove MD4 hash.
* Change API (it happens).
* Update crashtest example.


git-svn-id: svn://kolibrios.org@9216 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-10-15 00:52:46 +00:00
hidnplayr 261bcf35ff FTPC: improved error handeling in wait_for_servercommand
git-svn-id: svn://kolibrios.org@9164 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-08-29 17:37:31 +00:00
hidnplayr 2f33c5d0a4 AR81xx: Add PCI ID's of some more possibly working devices. (Disabled in netcfg for now)
git-svn-id: svn://kolibrios.org@9150 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-08-23 20:57:10 +00:00
hidnplayr 8822960988 AR81xx: Bugfixes (now also works on non-gigabit devices such as QCA8172), refactoring.
git-svn-id: svn://kolibrios.org@9146 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-08-22 20:18:00 +00:00
hidnplayr 760d64a3cd CP866->UTF8 input recode
git-svn-id: svn://kolibrios.org@9132 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-08-11 20:59:10 +00:00
hidnplayr 86308adc77 Cosmetic fixes
git-svn-id: svn://kolibrios.org@9129 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-08-09 16:01:04 +00:00
hidnplayr 3524e7c3b1 Ctrl+C for ping, tracert.
git-svn-id: svn://kolibrios.org@9128 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-08-09 06:14:00 +00:00