]> andersk Git - openssh.git/blobdiff - ssh-add.c
- stevesk@cvs.openbsd.org 2006/07/22 20:48:23
[openssh.git] / ssh-add.c
index f8db1eb3d59e6728328116c8c49e268e0a035941..f79ffb9156714d3f3a6c0f05c5ebd74bd574bfd5 100644 (file)
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.82 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.85 2006/07/22 20:48:23 stevesk Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -44,6 +44,8 @@
 
 #include <fcntl.h>
 #include <pwd.h>
+#include <string.h>
+#include <unistd.h>
 
 #include "ssh.h"
 #include "rsa.h"
@@ -135,7 +137,7 @@ add_file(AuthenticationConnection *ac, const char *filename)
        char msg[1024];
        int fd, perms_ok, ret = -1;
 
-       if ((fd = open(filename, 0)) < 0) {
+       if ((fd = open(filename, O_RDONLY)) < 0) {
                perror(filename);
                return -1;
        }
This page took 0.109483 seconds and 4 git commands to generate.