Commit Graph

212 Commits

Author SHA1 Message Date
Rémi Denis-Courmont cc129a71d7 Remove old mail address from sources 2019-09-04 22:11:04 +03:00
Steve Lhomme 5363279805 remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
Rémi Denis-Courmont c212795864 tls: separate client and server types
They are manipulated differently. It makes sense to use the same types
for session, but not so much for credentials.
2018-11-18 17:56:52 +02:00
Rémi Denis-Courmont 39077be1b9 ftp: publicize IsASCII() helper
Also document and avoid sign overflow (on platforms where char is
unsigned).
2018-07-07 11:32:12 +03:00
Steve Lhomme 26fef56c52 core: make DEMUX/STREAM_GET_PTS_DELAY officially a vlc_tick_t 2018-07-06 10:48:19 +02:00
Steve Lhomme f8872ec589 modules: the "network-caching" is always translated to a vlc_tick_t 2018-07-06 09:53:20 +02:00
Rémi Denis-Courmont 4c48e035a2 ftp: add format attribute 2018-05-04 20:48:15 +03:00
Romain Vimont ff2901aff3 core: remove global *_sys_t typedefs
Do not declare *_sys_t typedefs globally in vlc_common.h. Instead,
declare them locally in each module that provides a definition.

This paves the way to move C++ definitions into anonymous namespaces in
order to respect C++ ODR.

The picture_resource_t and sout_stream_id_sys_t typedefs will be handled
separately, since they require specific additional changes.

See #18033

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-04-30 14:20:50 +02:00
Hugo Beauzée-Luyssen dde0b69477 ftp: Don't assert on a valid connection handle in Read()
When seeking, if the reconnection fails, the connection handle will be
NULL. Instead, try to reconnect and signal EOF if this can't be done.
2018-03-09 11:24:40 +01:00
Thomas Guillem 8360f356d3 ftp: fix credentials regression
Normal user credentials could not be found since the "anonymous" never matched
in keystore.

This is a partial revert of 9366465979
Since we now log anonymous per default. A proper fix need a vlc_credential
change that we won't do now.
2018-02-06 19:29:04 +01:00
Thomas Guillem 9bb080af57 ftp: fix cast ugliness
Fixes #19616
2018-02-06 18:58:58 +01:00
Thomas Guillem 2d45569c50 ftp: check vlc_UrlParseFixup return 2017-12-06 10:12:42 +01:00
Thomas Guillem d4055e377b ftp: use vlc_UrlParseFixup
Refs #18991
2017-12-06 10:12:42 +01:00
Thomas Guillem cf4676c1e8 core: rename vlc_*alloc to vlc_obj_*alloc
In order to avoid confusion with future vlc_alloc.
2017-11-11 17:20:34 +01:00
Thomas Guillem 9366465979 ftp: fix login dialog not shown
Ask the user before trying the anonymous access.

Before this commit, you could connect with a specific user only if the
anonymous access on the server was disabled.
2017-10-31 11:59:10 +01:00
Thomas Guillem 4ce1905da0 input: extends vlc_readdir_helper_additem()
Add a new parameter: psz_flatpath. If not NULL, readdir_helper_additem() will
un-flatten the folder hierarchy. It will create an input item for each sub
folders (separated by '/') of psz_nullpath.

Example: a stream directory that have the following items:
 - "foo/bar/item1"
 - "foo/bar/item2"

will output the following items while using this new parameter:
 - foo
   - bar
     - item1
     - item2

This functionality can be used by "stream directory" modules that have a
flattened folder hierarchy, like libarchive.

Access modules should not need this functionality.
2017-09-20 17:37:22 +02:00
Thomas Guillem e4a403d78b input: rename access_fsdir to vlc_readdir_helper
This helper can now be used by other modules like "stream directory".
2017-09-20 17:37:17 +02:00
Rémi Denis-Courmont bebae22bc0 ftp: fix leak on error 2017-09-12 20:16:42 +03:00
Rémi Denis-Courmont e15084442c ftp: fix data reception (fixes #18803) 2017-09-12 20:16:42 +03:00
Rémi Denis-Courmont a5f8015d2d ftp: avoid reserved identifier as function name 2017-08-02 18:18:57 +03:00
Rémi Denis-Courmont e4ba64d291 Remove access_t 2017-07-23 08:55:40 +03:00
Rémi Denis-Courmont 740dd861a4 access: allocate p_sys vlc_malloc/vlc_calloc 2017-06-19 22:48:08 +03:00
Rémi Denis-Courmont a565aadd33 ftp: remove redundant casts 2017-04-19 20:46:56 +03:00
Rémi Denis-Courmont c0d5d15812 stream: removed unused control argument 2017-04-18 21:54:09 +03:00
Rémi Denis-Courmont c6c7b68eae ftp: factor network I/O code using vlc_tls_t 2017-02-23 21:08:06 +02:00
Rémi Denis-Courmont 4890a413e8 ftp: handle preliminary (1xx) reply systematically 2016-11-20 19:31:20 +02:00
Rémi Denis-Courmont bc9fc74d68 ftp: factor common line receive code 2016-11-20 19:18:18 +02:00
Filip Roséen 9eb3099ef9 access/ftp: do not log sensitive information
PASS and ACCT are by their definition sensitive data, as such we
should not log their payload when such requests are sent.

These changes simply censors the payload, as well as the number of
bytes sent (so that the length of the payload is not leaked).

fixes #17440

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2016-09-26 09:02:07 +02:00
Rémi Denis-Courmont 3f63255470 ftp: fix memory leaks 2016-09-15 14:11:58 +03:00
Rémi Denis-Courmont 09a26099cf ftp: fix scan string injection 2016-09-15 14:11:42 +03:00
Rémi Denis-Courmont abedaae3de ftp: fix memory leak 2016-09-15 14:11:23 +03:00
Jean-Baptiste Kempf d18f0a8c32 FTP: fail earlier if filename uri_encode fails 2016-08-11 17:27:19 +02:00
Jean-Baptiste Kempf e8da99ea88 FTP: support UTF-8 filenames in directory listings 2016-08-11 16:30:30 +02:00
Jean-Baptiste Kempf 21b926c644 FTP: support MLSD extension to detect directories 2016-07-28 13:57:08 +02:00
Jean-Baptiste Kempf aac16bcbf7 FTP: fix root folder parsing 2016-07-28 13:44:20 +02:00
Jean-Baptiste Kempf 5b35e3c857 FTP: use psz_url instead of psz_location 2016-07-28 12:03:18 +02:00
Rémi Denis-Courmont 6e1ace8a75 access: make access_t.p_sys void * (refs #17078) 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 4489a0487e access: rename access_t.psz_access to psz_name 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 3e01621dc6 access: remove ACCESS controls, use STREAM
They have been identical for a while.
2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont da458bc49c access: info.b_eof is always false during probe 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont de280a5d11 access: set EOF implicitly when read returns 0 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 616a010c7f access: reset EOF implicitly on succesful seek 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont cc6267ceb5 access: use void pointer for pf_read callback
This matches the stream_t.pf_read convention.
2016-07-20 22:54:50 +03:00
Thomas Guillem a78bbdd234 access: change ACCESS_IS_DIRECTORY / STREAM_IS_DIRECTORY args
The first sort argument is no longer necessary.
2016-05-19 15:55:27 +02:00
Thomas Guillem 9109718b77 access: re-refactor pf_readdir
This commit changes pf_readdir callback to its original behavior. Accesses and
streams now add items to a node.

Archive stream_filters will now be able to add nodes to a node (when an archive
has directory). This was not possible before.

This commit also adds an access_fsdir helper to help fs accesses (file, smb,
nfs, ftp, sftp) adding items to a node. These accesses need the same treatment
that is now done by this helper:
 - hide hidden files or not (depending on "show-hiddenfiles" option)
 - skip some file extensions (depending on "ignore-filetypes" option)
 - sort items by type and alphabetically (depending on "directory-sort"
   option).
 - For a next commit: attach slaves to items

The directory demux won't do these operations anymore for every access/stream.

This commit doesn't change the interruptible state of the pf_readdir function,
accesses/streams are still interruptible in the middle of a pf_readdir call.

This partially reverts commit 88ffe15878.
2016-05-19 15:55:27 +02:00
Thomas Guillem e49ee59ad9 input/item: factor input_item_t New*() functions
Remove "int options, const char *const *options, unsigned option_flags"
arguments from every New() functions since these args are mainly unused. You
now have to call input_item_AddOptions after input item creation to add
options.

Add input_item_net_type enum in order to avoid confusion between 2 int
arguments: i_duration and i_net that could both be -1, 0 or > 0.

Replace input_item_NewWithType and input_item_NewWithTypeExt with
input_item_NewExt.

Add input_item_NewCard, input_item_NewDisc, input_item_NewStream,
input_item_NewDirectory, input_item_NewFile MACRO. These MACROS avoid to use
useless arguments for an item type (for example, it's useless to specify a
duration for a directory type).
2016-04-17 08:11:57 +03:00
Thomas Guillem 965f507598 keystore: add a unique memory keystore
This keystore is used to store credentials on memory if no others keystore is
found or if the user doesn't want to store them permanently. This keystore is
owned by libvlc and is shared with all vlc objects. It's released when the
libvlc instance is released.
2016-02-26 10:57:34 +01:00
Thomas Guillem 183d5cda47 dialog: use new API 2016-02-04 15:03:58 +01:00
Rémi Denis-Courmont 2c1bb0b798 tls: accept abstract transport layer stream for client sessions
Instead of a socket file descriptor, client sessions are now run on
top of an abstract I/O stream. This enables e.g. TLS over TLS, which
would be required for HTTPS through HTTPS proxy.
2016-01-13 21:53:58 +02:00
Rémi Denis-Courmont 1348cb1c47 ftp: load and unload X.509 certs only once 2016-01-12 21:55:28 +02:00