+ if(!xamandad_path || strlen(xamandad_path) <= 1)
+ xamandad_path = vstralloc(amlibexecdir, "/", "amandad", NULL);
+ if(!xclient_username || strlen(xclient_username) <= 1)
+ xclient_username = CLIENT_LOGIN;
+ if(!xclient_port || strlen(xclient_port) <= 1)
+ xclient_port = NULL;
+
+ myargs = g_ptr_array_sized_new(20);
+ g_ptr_array_add(myargs, SSH);
+ for (ssh_option = ssh_options; *ssh_option != NULL; ssh_option++) {
+ g_ptr_array_add(myargs, *ssh_option);
+ }
+ g_ptr_array_add(myargs, "-l");
+ g_ptr_array_add(myargs, xclient_username);
+ if (xclient_port) {
+ g_ptr_array_add(myargs, "-p");
+ g_ptr_array_add(myargs, xclient_port);
+ }
+ if (ssh_keys && strlen(ssh_keys) > 1) {
+ g_ptr_array_add(myargs, "-i");
+ g_ptr_array_add(myargs, xssh_keys);
+ }
+ g_ptr_array_add(myargs, rc->hostname);
+ g_ptr_array_add(myargs, xamandad_path);
+ g_ptr_array_add(myargs, "-auth=ssh");
+ g_ptr_array_add(myargs, NULL);
+
+ cmd = g_strjoinv(" ", (gchar **)myargs->pdata);
+ g_debug("exec: %s", cmd);
+ g_free(cmd);
+