summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
commitd96a52541f0f89836e99fea2d1bb8e3f4a1f4144 (patch)
tree4eedfa1c5b7e94fb6d930e2528c4d3eb6c27a7c2 /svr-chansession.c
parentecd850521816dc2a78792fc53dd9c6c80d5d1b91 (diff)
parent9fdab3ced8374b991bfadce0056cf5bdf7cfb3d6 (diff)
Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index 5bed8fc..e44299e 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -343,7 +343,7 @@ static void closechansess(struct Channel *channel) {
* or x11/authagent forwarding. These are passed to appropriate handlers */
static void chansessionrequest(struct Channel *channel) {
- unsigned char * type = NULL;
+ char * type = NULL;
unsigned int typelen;
unsigned char wantreply;
int ret = 1;
@@ -406,7 +406,7 @@ out:
static int sessionsignal(struct ChanSess *chansess) {
int sig = 0;
- unsigned char* signame = NULL;
+ char* signame = NULL;
int i;
if (chansess->pid == 0) {
@@ -557,7 +557,7 @@ static void get_termmodes(struct ChanSess *chansess) {
static int sessionpty(struct ChanSess * chansess) {
unsigned int termlen;
- unsigned char namebuf[65];
+ char namebuf[65];
struct passwd * pw = NULL;
TRACE(("enter sessionpty"))
@@ -583,7 +583,7 @@ static int sessionpty(struct ChanSess * chansess) {
return DROPBEAR_FAILURE;
}
- chansess->tty = (char*)m_strdup(namebuf);
+ chansess->tty = m_strdup(namebuf);
if (!chansess->tty) {
dropbear_exit("Out of memory"); /* TODO disconnect */
}
@@ -603,6 +603,7 @@ static int sessionpty(struct ChanSess * chansess) {
return DROPBEAR_SUCCESS;
}
+#ifndef USE_VFORK
static void make_connection_string(struct ChanSess *chansess) {
char *local_ip, *local_port, *remote_ip, *remote_port;
size_t len;
@@ -624,6 +625,7 @@ static void make_connection_string(struct ChanSess *chansess) {
m_free(remote_ip);
m_free(remote_port);
}
+#endif
/* Handle a command request from the client. This is used for both shell
* and command-execution requests, and passes the command to