71 Commits

Author SHA1 Message Date
cy33hc 82d8bb6bbf smb2_echo fails if socket fd is valid 2025-04-19 16:53:47 -07:00
Tryggvi Larusson 5b9a7af89d Added example command smb2-notify under examples 2025-01-03 10:30:22 +10:00
Tryggvi Larusson 9112597a89 Implementation of change_notify client 2025-01-03 10:30:12 +10:00
Ronnie Sahlberg 3f5c3d5c15 Do not dereference data_cb during shutdown for smb2_close
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-12-19 14:36:00 +10:00
Ronnie Sahlberg 6a161d055b opendir: don't dereference cb_data when in shutdown mode
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-12-18 16:15:16 +10:00
Ronnie Sahlberg 157342911f Fix lifetime of cb_data for smb2_opendir
Pass ownership of the cb_data object over to smb2dir
when a direcotry has been successfully opened
so that it follows the lifetime of the smb2dir object.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-12-16 08:09:13 +10:00
Ronnie Sahlberg ce73a290da fix SEGV on failed opendir()
Reported-by: erikbernsen
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-12-14 11:32:41 +10:00
Ronnie Sahlberg 497ab9eb1a fix lead in disconnect_share on session failures
prog_ls now runs valgrind clean for all the 43 calls to
readv() that it does in my test environment.

connect_share
opendir
readlink
disconnect_share

now all run with no leaks when the commands are aborted mid-command

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-10-07 10:37:29 +10:00
Ronnie Sahlberg 05eac44c0e opendir: fix leak of cb_data on session failures
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-10-07 08:54:49 +10:00
Ronnie Sahlberg 5304e6705b cb_data: make the initial cb_data an embedded struct
in smb2_context.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-10-07 08:06:49 +10:00
Ronnie Sahlberg 9918577312 libsmb2: fix cb_data leak when session fails during early connect
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-10-07 07:23:39 +10:00
Ronnie Sahlberg e8d5a21da8 connect: we should not free cb_data if we have initiated the connect
but it later fails.  This should be freed in the appropriate callback once all
processing has finished.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-10-06 14:20:31 +10:00
Ronnie Sahlberg 59b4656a98 connect: fix memoryleak if the session is lost during connect
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-10-06 14:04:09 +10:00
Wolf3s 15e571f620 Merge branch 'master' into winsock1_support 2024-05-29 09:39:02 -03:00
André Guilherme 43277900bc Update sync.c 2024-05-24 21:20:20 -03:00
Wolf3s 0531dc02a2 Improvements. 2024-05-22 08:51:48 -03:00
Wolf3s aef0a9574d Support winsock api 2024-05-20 20:51:56 -03:00
Wolfywolfy 83e2f5f469 Update to latest PS2SDK. 2024-05-19 10:10:16 -03:00
Wolf3s 84c267f7ba Change _SOCKET to be more portable 2024-05-04 11:03:23 -03:00
Matthew Allen 1a1617fe01 Make the socket validity check robust under windows. 2024-03-23 13:59:46 +11:00
Wolf3s 878e9ddb28 Remove msvc implementations 2024-02-03 21:03:47 -03:00
André Guilherme 5dc276cab5 Merge branch 'sahlberg:master' into amigaos 2023-12-28 08:44:54 -03:00
Wolfywolfy 8d41ddde01 Support sys/time.h, sys/fcntl.h and sys/unistd.h for ps2(and others) 2023-12-23 12:55:04 -03:00
Wolfywolfy 0f63e7d747 Remove USE_PASSWORD 2023-12-20 20:11:16 -03:00
André Guilherme af06f6eb38 Merge branch 'sahlberg:master' into amigaos 2023-12-17 18:45:42 -03:00