Mercurial > dropbear
diff svr-x11fwd.c @ 1461:fb90a5ba84e0
Merge pull request #49 from fperrad/20170812_lint
Some linting, const parameters
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 25 Jan 2018 21:55:25 +0800 |
parents | 58a74cb829b8 |
children | 79eef94ccea9 |
line wrap: on
line diff
--- a/svr-x11fwd.c Tue Jan 23 22:44:18 2018 +0800 +++ b/svr-x11fwd.c Thu Jan 25 21:55:25 2018 +0800 @@ -38,9 +38,9 @@ #define X11BASEPORT 6000 #define X11BINDBASE 6010 -static void x11accept(struct Listener* listener, int sock); +static void x11accept(const struct Listener* listener, int sock); static int bindport(int fd); -static int send_msg_channel_open_x11(int fd, struct sockaddr_in* addr); +static int send_msg_channel_open_x11(int fd, const struct sockaddr_in* addr); /* Check untrusted xauth strings for metacharacters */ /* Returns DROPBEAR_SUCCESS/DROPBEAR_FAILURE */ @@ -126,7 +126,7 @@ /* accepts a new X11 socket */ /* returns DROPBEAR_FAILURE or DROPBEAR_SUCCESS */ -static void x11accept(struct Listener* listener, int sock) { +static void x11accept(const struct Listener* listener, int sock) { int fd; struct sockaddr_in addr; @@ -154,7 +154,7 @@ /* This is called after switching to the user, and sets up the xauth * and environment variables. */ -void x11setauth(struct ChanSess *chansess) { +void x11setauth(const struct ChanSess *chansess) { char display[20]; /* space for "localhost:12345.123" */ FILE * authprog = NULL; @@ -220,7 +220,7 @@ }; -static int send_msg_channel_open_x11(int fd, struct sockaddr_in* addr) { +static int send_msg_channel_open_x11(int fd, const struct sockaddr_in* addr) { char* ipstring = NULL;