comparison svr-x11fwd.c @ 1460:58a74cb829b8

Pointer parameter could be declared as pointing to const (callback)
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 19 Aug 2017 22:39:53 +0200
parents 06d52bcb8094
children 79eef94ccea9
comparison
equal deleted inserted replaced
1459:06d52bcb8094 1460:58a74cb829b8
36 #include "auth.h" 36 #include "auth.h"
37 37
38 #define X11BASEPORT 6000 38 #define X11BASEPORT 6000
39 #define X11BINDBASE 6010 39 #define X11BINDBASE 6010
40 40
41 static void x11accept(struct Listener* listener, int sock); 41 static void x11accept(const struct Listener* listener, int sock);
42 static int bindport(int fd); 42 static int bindport(int fd);
43 static int send_msg_channel_open_x11(int fd, const struct sockaddr_in* addr); 43 static int send_msg_channel_open_x11(int fd, const struct sockaddr_in* addr);
44 44
45 /* Check untrusted xauth strings for metacharacters */ 45 /* Check untrusted xauth strings for metacharacters */
46 /* Returns DROPBEAR_SUCCESS/DROPBEAR_FAILURE */ 46 /* Returns DROPBEAR_SUCCESS/DROPBEAR_FAILURE */
124 return DROPBEAR_FAILURE; 124 return DROPBEAR_FAILURE;
125 } 125 }
126 126
127 /* accepts a new X11 socket */ 127 /* accepts a new X11 socket */
128 /* returns DROPBEAR_FAILURE or DROPBEAR_SUCCESS */ 128 /* returns DROPBEAR_FAILURE or DROPBEAR_SUCCESS */
129 static void x11accept(struct Listener* listener, int sock) { 129 static void x11accept(const struct Listener* listener, int sock) {
130 130
131 int fd; 131 int fd;
132 struct sockaddr_in addr; 132 struct sockaddr_in addr;
133 socklen_t len; 133 socklen_t len;
134 int ret; 134 int ret;