From 29cafb7ea4c08239cad2eec94695214620604510 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 28 Feb 2010 18:28:44 +0000 Subject: [PATCH] added check for ssh2 --- lam/lib/lamdaemon.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lam/lib/lamdaemon.inc b/lam/lib/lamdaemon.inc index b634b32a..11325f8b 100644 --- a/lam/lib/lamdaemon.inc +++ b/lam/lib/lamdaemon.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2009 Roland Gruber + Copyright (C) 2004 - 2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,6 +40,9 @@ $Id$ * */ function lamdaemon($commands, $server) { + if (!function_exists('ssh2_connect')) { + return array('ERROR,' . _('This module requires the PHP ssh2 extension.')); + } $commands = implode("\n", $commands) . "\n"; // get username and password of the current lam-admin $credentials = $_SESSION['ldap']->decrypt_login();