Lines Matching refs:fd
88 sshkey_perm_ok(int fd, const char *filename)
92 if (fstat(fd, &st) == -1)
116 int fd, r;
123 if ((fd = open(filename, O_RDONLY)) == -1)
126 r = sshkey_perm_ok(fd, filename);
130 r = sshkey_load_private_type_fd(fd, type, passphrase, keyp, commentp);
134 close(fd);
147 sshkey_load_private_type_fd(int fd, int type, const char *passphrase,
155 if ((r = sshbuf_load_fd(fd, &buffer)) != 0 ||
173 int r, fd;
178 if ((fd = open(filename, O_RDONLY)) == -1)
180 if ((r = sshbuf_load_fd(fd, &buffer)) != 0 ||
193 close(fd);
493 int fd, oerrno;
497 if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
499 if ((f = fdopen(fd, "w")) == NULL) {
501 close(fd);