Return error on refusing to run CSD trojan, rather than exiting
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 11 Mar 2010 18:38:55 +0000 (10:38 -0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 11 Mar 2010 18:43:52 +0000 (10:43 -0800)
This fixes the error handling in the NM auth dialog. Fix the message so that
it doesn't refer to the command-line option, too.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c

diff --git a/http.c b/http.c
index 2c877d0..535fc2b 100644 (file)
--- a/http.c
+++ b/http.c
@@ -365,10 +365,10 @@ static int run_csd_script(struct openconnect_info *vpninfo, char *buf, int bufle
        int fd, ret;
 
        if (!vpninfo->uid_csd_given) {
-               vpninfo->progress(vpninfo, PRG_ERR, "Error: You are trying to "
-                                 "run insecure CSD code without specifying the CSD user.\n"
-                                 "       Use command line option \"--csd-user\"\n");
-               exit(1);
+               vpninfo->progress(vpninfo, PRG_ERR,
+                                 "Error: Server asked us to download and run a 'Cisco Secure Desktop' trojan.\n"
+                                 "This facility is disabled by default for security reasons, so you may wish to enable it.");
+               return -EPERM;
        }
 
 #ifndef __linux__