commands-posix-ssh.c (83851c7c60c90e9fb6a23ff48076387a77bc33cd) | commands-posix-ssh.c (54aa3de72ea2aaa2e903e7e879a4f3dda515a00e) |
---|---|
1 /* 2 * This work is licensed under the terms of the GNU GPL, version 2 or later. 3 * See the COPYING file in the top-level directory. 4 */ 5#include "qemu/osdep.h" 6 7#include <glib-unix.h> 8#include <glib/gstdio.h> --- 279 unchanged lines hidden (view full) --- 288 "authorized_keys", NULL); 289 authkeys = read_authkeys(authkeys_path, errp); 290 if (authkeys == NULL) { 291 return NULL; 292 } 293 294 ret = g_new0(GuestAuthorizedKeys, 1); 295 for (i = 0; authkeys[i] != NULL; i++) { | 1 /* 2 * This work is licensed under the terms of the GNU GPL, version 2 or later. 3 * See the COPYING file in the top-level directory. 4 */ 5#include "qemu/osdep.h" 6 7#include <glib-unix.h> 8#include <glib/gstdio.h> --- 279 unchanged lines hidden (view full) --- 288 "authorized_keys", NULL); 289 authkeys = read_authkeys(authkeys_path, errp); 290 if (authkeys == NULL) { 291 return NULL; 292 } 293 294 ret = g_new0(GuestAuthorizedKeys, 1); 295 for (i = 0; authkeys[i] != NULL; i++) { |
296 strList *new; 297 | |
298 g_strstrip(authkeys[i]); 299 if (!authkeys[i][0] || authkeys[i][0] == '#') { 300 continue; 301 } 302 | 296 g_strstrip(authkeys[i]); 297 if (!authkeys[i][0] || authkeys[i][0] == '#') { 298 continue; 299 } 300 |
303 new = g_new0(strList, 1); 304 new->value = g_strdup(authkeys[i]); 305 new->next = ret->keys; 306 ret->keys = new; | 301 QAPI_LIST_PREPEND(ret->keys, g_strdup(authkeys[i])); |
307 } 308 309 return g_steal_pointer(&ret); 310} 311 312#ifdef QGA_BUILD_UNIT_TEST 313#if GLIB_CHECK_VERSION(2, 60, 0) 314static const strList test_key2 = { --- 202 unchanged lines hidden --- | 302 } 303 304 return g_steal_pointer(&ret); 305} 306 307#ifdef QGA_BUILD_UNIT_TEST 308#if GLIB_CHECK_VERSION(2, 60, 0) 309static const strList test_key2 = { --- 202 unchanged lines hidden --- |