version 1.54, 2006/08/12 20:46:46 |
version 1.55, 2007/02/19 10:45:58 |
|
|
|
|
#include "channels.h" |
#include "channels.h" |
#include "session.h" |
#include "session.h" |
|
#include "servconf.h" |
|
|
/* Imports */ |
/* Imports */ |
extern int compat20; |
extern int compat20; |
|
|
extern struct monitor *pmonitor; |
extern struct monitor *pmonitor; |
extern Buffer input, output; |
extern Buffer input, output; |
extern Buffer loginmsg; |
extern Buffer loginmsg; |
|
extern ServerOptions options; |
|
|
int |
int |
mm_is_monitor(void) |
mm_is_monitor(void) |
|
|
{ |
{ |
Buffer m; |
Buffer m; |
struct passwd *pw; |
struct passwd *pw; |
u_int pwlen; |
u_int len; |
|
ServerOptions *newopts; |
|
|
debug3("%s entering", __func__); |
debug3("%s entering", __func__); |
|
|
|
|
buffer_free(&m); |
buffer_free(&m); |
return (NULL); |
return (NULL); |
} |
} |
pw = buffer_get_string(&m, &pwlen); |
pw = buffer_get_string(&m, &len); |
if (pwlen != sizeof(struct passwd)) |
if (len != sizeof(struct passwd)) |
fatal("%s: struct passwd size mismatch", __func__); |
fatal("%s: struct passwd size mismatch", __func__); |
pw->pw_name = buffer_get_string(&m, NULL); |
pw->pw_name = buffer_get_string(&m, NULL); |
pw->pw_passwd = buffer_get_string(&m, NULL); |
pw->pw_passwd = buffer_get_string(&m, NULL); |
|
|
pw->pw_class = buffer_get_string(&m, NULL); |
pw->pw_class = buffer_get_string(&m, NULL); |
pw->pw_dir = buffer_get_string(&m, NULL); |
pw->pw_dir = buffer_get_string(&m, NULL); |
pw->pw_shell = buffer_get_string(&m, NULL); |
pw->pw_shell = buffer_get_string(&m, NULL); |
|
|
|
/* copy options block as a Match directive may have changed some */ |
|
newopts = buffer_get_string(&m, &len); |
|
if (len != sizeof(*newopts)) |
|
fatal("%s: option block size mismatch", __func__); |
|
if (newopts->banner != NULL) |
|
newopts->banner = buffer_get_string(&m, NULL); |
|
copy_set_server_options(&options, newopts, 1); |
|
xfree(newopts); |
|
|
buffer_free(&m); |
buffer_free(&m); |
|
|
return (pw); |
return (pw); |