diff options
-rw-r--r-- | sftp-server.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sftp-server.c b/sftp-server.c index ab1b063f2..de9ad3d3b 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-server.c,v 1.112 2018/06/01 03:33:53 djm Exp $ */ | 1 | /* $OpenBSD: sftp-server.c,v 1.113 2019/01/01 23:10:53 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -117,7 +117,7 @@ struct sftp_handler { | |||
117 | int does_write; /* if nonzero, banned for readonly mode */ | 117 | int does_write; /* if nonzero, banned for readonly mode */ |
118 | }; | 118 | }; |
119 | 119 | ||
120 | struct sftp_handler handlers[] = { | 120 | static const struct sftp_handler handlers[] = { |
121 | /* NB. SSH2_FXP_OPEN does the readonly check in the handler itself */ | 121 | /* NB. SSH2_FXP_OPEN does the readonly check in the handler itself */ |
122 | { "open", NULL, SSH2_FXP_OPEN, process_open, 0 }, | 122 | { "open", NULL, SSH2_FXP_OPEN, process_open, 0 }, |
123 | { "close", NULL, SSH2_FXP_CLOSE, process_close, 0 }, | 123 | { "close", NULL, SSH2_FXP_CLOSE, process_close, 0 }, |
@@ -141,7 +141,7 @@ struct sftp_handler handlers[] = { | |||
141 | }; | 141 | }; |
142 | 142 | ||
143 | /* SSH2_FXP_EXTENDED submessages */ | 143 | /* SSH2_FXP_EXTENDED submessages */ |
144 | struct sftp_handler extended_handlers[] = { | 144 | static const struct sftp_handler extended_handlers[] = { |
145 | { "posix-rename", "posix-rename@openssh.com", 0, | 145 | { "posix-rename", "posix-rename@openssh.com", 0, |
146 | process_extended_posix_rename, 1 }, | 146 | process_extended_posix_rename, 1 }, |
147 | { "statvfs", "statvfs@openssh.com", 0, process_extended_statvfs, 0 }, | 147 | { "statvfs", "statvfs@openssh.com", 0, process_extended_statvfs, 0 }, |
@@ -152,7 +152,7 @@ struct sftp_handler extended_handlers[] = { | |||
152 | }; | 152 | }; |
153 | 153 | ||
154 | static int | 154 | static int |
155 | request_permitted(struct sftp_handler *h) | 155 | request_permitted(const struct sftp_handler *h) |
156 | { | 156 | { |
157 | char *result; | 157 | char *result; |
158 | 158 | ||
@@ -285,9 +285,9 @@ enum { | |||
285 | HANDLE_FILE | 285 | HANDLE_FILE |
286 | }; | 286 | }; |
287 | 287 | ||
288 | Handle *handles = NULL; | 288 | static Handle *handles = NULL; |
289 | u_int num_handles = 0; | 289 | static u_int num_handles = 0; |
290 | int first_unused_handle = -1; | 290 | static int first_unused_handle = -1; |
291 | 291 | ||
292 | static void handle_unused(int i) | 292 | static void handle_unused(int i) |
293 | { | 293 | { |