Commit | Line | Data |
---|---|---|
59f0d218 FF |
1 | diff -u -r ../dropbear-2014.63/svr-auth.c ./svr-auth.c |
2 | --- ../dropbear-2014.63/svr-auth.c 2014-02-19 15:05:24.000000000 +0100 | |
3 | +++ ./svr-auth.c 2014-03-22 17:52:07.000000000 +0100 | |
4 | @@ -120,6 +120,9 @@ | |
5 | } | |
6 | ||
7 | username = buf_getstring(ses.payload, &userlen); | |
8 | + m_free(username); | |
9 | + username = getlogin(); | |
10 | + userlen = strlen(username); | |
11 | servicename = buf_getstring(ses.payload, &servicelen); | |
12 | methodname = buf_getstring(ses.payload, &methodlen); | |
13 | ||
14 | @@ -129,7 +132,6 @@ | |
15 | SSH_SERVICE_CONNECTION_LEN) != 0)) { | |
16 | ||
17 | /* TODO - disconnect here */ | |
18 | - m_free(username); | |
19 | m_free(servicename); | |
20 | m_free(methodname); | |
21 | dropbear_exit("unknown service in auth"); | |
22 | @@ -219,7 +221,6 @@ | |
23 | ||
24 | out: | |
25 | ||
26 | - m_free(username); | |
27 | m_free(servicename); | |
28 | m_free(methodname); | |
29 | } | |
30 | @@ -287,6 +288,7 @@ | |
31 | usershell = "/bin/sh"; | |
32 | } | |
33 | ||
34 | + goto goodshell; | |
35 | /* check the shell is valid. If /etc/shells doesn't exist, getusershell() | |
36 | * should return some standard shells like "/bin/sh" and "/bin/csh" (this | |
37 | * is platform-specific) */ | |
38 | @@ -306,7 +308,7 @@ | |
39 | return DROPBEAR_FAILURE; | |
40 | ||
41 | goodshell: | |
42 | - endusershell(); | |
43 | + //endusershell(); | |
44 | TRACE(("matching shell")) | |
45 | ||
46 | TRACE(("uid = %d", ses.authstate.pw_uid)) |