Lines Matching defs:hostsfile
151 FILE * hostsfile = NULL;
182 hostsfile = fopen(filename, "a+");
184 if (hostsfile != NULL) {
186 fseek(hostsfile, 0, SEEK_SET);
192 hostsfile = fopen(filename, "r");
197 if (hostsfile == NULL) {
198 TRACE(("hostsfile didn't open: %s", strerror(errno)))
206 return hostsfile;
211 FILE *hostsfile = NULL;
220 hostsfile = open_known_hosts_file(&readonly);
221 if (!hostsfile) {
232 if (buf_getline(line, hostsfile) == DROPBEAR_FAILURE) {
304 fseek(hostsfile, 0, SEEK_END); /* In case it wasn't opened append */
319 fwrite(buf_getptr(line, line->len), line->len, 1, hostsfile);
324 if (hostsfile != NULL) {
325 fclose(hostsfile);