]> andersk Git - openssh.git/blobdiff - sftp-server.c
- (dtucker) [entropy.c] Needs unistd.h too.
[openssh.git] / sftp-server.c
index e882216b108457c4a5dc7f4fdf5768e1a60fe053..c57958b0f327fe4cf955ac90efe917b8d36434de 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.58 2006/07/06 10:47:57 djm Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.70 2006/08/03 03:34:42 deraadt Exp $ */
 /*
  * Copyright (c) 2000-2004 Markus Friedl.  All rights reserved.
  *
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
 #include "includes.h"
 
 #include <sys/types.h>
+#include <sys/param.h>
 #include <sys/stat.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 
 #include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <pwd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <pwd.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdarg.h>
 
+#include "xmalloc.h"
 #include "buffer.h"
-#include "bufaux.h"
 #include "log.h"
-#include "xmalloc.h"
 #include "misc.h"
 #include "uidswap.h"
 
@@ -123,7 +137,7 @@ string_from_portable(int pflags)
 #define PAPPEND(str)   {                               \
                if (*ret != '\0')                       \
                        strlcat(ret, ",", sizeof(ret)); \
-               strlcat(ret, str, sizeof(ret));         \
+               strlcat(ret, str, sizeof(ret));         \
        }
 
        if (pflags & SSH2_FXF_READ)
@@ -478,9 +492,9 @@ process_open(void)
        int handle, fd, flags, mode, status = SSH2_FX_FAILURE;
 
        id = get_int();
-       debug3("request %u: open flags %d", id, pflags);
        name = get_string(NULL);
        pflags = get_int();             /* portable flags */
+       debug3("request %u: open flags %d", id, pflags);
        a = get_attrib();
        flags = flags_from_portable(pflags);
        mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 0666;
@@ -1199,7 +1213,6 @@ main(int argc, char **argv)
        SyslogFacility log_facility = SYSLOG_FACILITY_AUTH;
        char *cp;
 
-       extern int optind;
        extern char *optarg;
        extern char *__progname;
 
@@ -1214,7 +1227,7 @@ main(int argc, char **argv)
                case 'c':
                        /*
                         * Ignore all arguments if we are invoked as a
-                        * shell using "sftp-server -c command" 
+                        * shell using "sftp-server -c command"
                         */
                        skipargs = 1;
                        break;
This page took 0.03447 seconds and 4 git commands to generate.