Lines Matching full:path

60 mkdir_for_user(const char *path, const struct passwd *p,  in mkdir_for_user()  argument
63 if (g_mkdir(path, mode) == -1) { in mkdir_for_user()
65 path, g_strerror(errno)); in mkdir_for_user()
69 if (chown(path, p->pw_uid, p->pw_gid) == -1) { in mkdir_for_user()
71 path, g_strerror(errno)); in mkdir_for_user()
75 if (chmod(path, mode) == -1) { in mkdir_for_user()
77 path, g_strerror(errno)); in mkdir_for_user()
85 write_authkeys(const char *path, const GStrv keys, in write_authkeys() argument
92 if (!g_file_set_contents(path, contents, -1, &err)) { in write_authkeys()
93 error_setg(errp, "failed to write to '%s': %s", path, err->message); in write_authkeys()
97 if (chown(path, p->pw_uid, p->pw_gid) == -1) { in write_authkeys()
99 path, g_strerror(errno)); in write_authkeys()
103 if (chmod(path, 0600) == -1) { in write_authkeys()
105 path, g_strerror(errno)); in write_authkeys()
265 g_autofree char *path = NULL; in test_authorized_keys_set() local
268 path = g_build_filename(g_get_home_dir(), ".ssh", NULL); in test_authorized_keys_set()
269 ret = g_mkdir_with_parents(path, 0700); in test_authorized_keys_set()
271 g_free(path); in test_authorized_keys_set()
273 path = test_get_authorized_keys_path(); in test_authorized_keys_set()
274 g_file_set_contents(path, contents, -1, &err); in test_authorized_keys_set()
282 g_autofree char *path = NULL; in test_authorized_keys_equal() local
285 path = test_get_authorized_keys_path(); in test_authorized_keys_equal()
286 g_file_get_contents(path, &contents, NULL, &err); in test_authorized_keys_equal()