[vlc-commits] telnet: refuse to start without a password

Rémi Denis-Courmont git at videolan.org
Sun Mar 25 18:45:24 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 25 19:44:38 2012 +0300| [cfabc878d7242f6b1d7a5b55dc0de789d03f8364] | committer: Rémi Denis-Courmont

telnet: refuse to start without a password

(This should probably be moved to Lua code.)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cfabc878d7242f6b1d7a5b55dc0de789d03f8364
---

 modules/lua/intf.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/lua/intf.c b/modules/lua/intf.c
index f7f15b4..8d1af49 100644
--- a/modules/lua/intf.c
+++ b/modules/lua/intf.c
@@ -423,5 +423,13 @@ int Open_LuaCLI( vlc_object_t *p_this )
 
 int Open_LuaTelnet( vlc_object_t *p_this )
 {
+    char *pw = var_CreateGetNonEmptyString( p_this, "telnet-password" );
+    if( pw == NULL )
+    {
+        msg_Err( p_this, "password not configured" );
+        msg_Info( p_this, "Please specify the password in the preferences." );
+        return VLC_EGENERIC;
+    }
+    free( pw );
     return Start_LuaIntf( p_this, "telnet" );
 }



More information about the vlc-commits mailing list