]> git.sesse.net Git - vlc/commit
vlc security: As i've seen very little improvement on that front, i've decided to...
authorDamien Fouilleul <damienf@videolan.org>
Wed, 16 Jan 2008 19:30:12 +0000 (19:30 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Wed, 16 Jan 2008 19:30:12 +0000 (19:30 +0000)
commit658b4f830b832b19a6de708764f91e1398e501a1
tree400524ec6b2a69034b1789a652d339c402463f60
parent4f028428053d0342c55deb6ba8b8da114c6a0caa
vlc security: As i've seen very little improvement on that front, i've decided to check in my take on handling the problem of managing harmful options. I'm pretty sure this is going to be very controversial, but I think my approach is quite simple and yet very effective Anyway, my approach makes the following assumptions:

- most vlc options are considered safe, only a handful are particularily unsafe and need be declared as such in their definition (they mostly deal with writing to an output file or URL)
- unsafe options are only considered potentially harmful when used as an input option, ie. the ':option' format. Configuration options are always considered safe 'i.e --option'
- unsafe options are associated with a global security policy, which dictates how these are handled. At the moment, The policy can be either block, allow or prompt, and is set using the '--security-policy' option (which itself is considered unsafe ;)

the policy can be set by the user at the command line or in the preferences, it curently defaults to prompt, which is the desirable state for deskop use. However, it can be overriden depending on context, for example, the activex and mozilla will force the security-policy to block regardless of preference settins.

the code is a bit rough at the moment, but i will optimize/clean it up if the dev community this approach is worth keeping.

try the following example, and you'll see quickly what i mean:

./vlc -vvv <a mrl> :sout=#transcode{vcodec=mp1v,vb=1024,acodec=mpga,ab=192}:standard{mux=ts,dst=vlc-output.ts,access=file}"

Enjoy,
   Damien
14 files changed:
include/vlc_configuration.h
modules/access_filter/record.c
modules/access_filter/timeshift.c
modules/audio_output/file.c
modules/demux/demuxdump.c
modules/demux/ts.c
modules/misc/logger.c
modules/stream_out/es.c
modules/stream_out/rtp.c
modules/stream_out/standard.c
src/config/chain.c
src/libvlc-module.c
src/misc/variables.c
src/modules/entry.c