aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 8130676..bb9a5c8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,7 +18,7 @@
static void ssh_protocol_preinit(const char *ssh_ports[], protocol_ctx *ctx[],
const char *jail_ports[], const size_t siz);
-static void ssh_protocol_postinit(protocol_ctx *ctx[], const size_t siz);
+static void ssh_protocol_init(protocol_ctx *ctx[], const size_t siz);
static void ssh_protocol_preinit(const char *ssh_ports[], protocol_ctx *ctx[],
@@ -34,7 +34,7 @@ static void ssh_protocol_preinit(const char *ssh_ports[], protocol_ctx *ctx[],
}
}
-static void ssh_protocol_postinit(protocol_ctx *ctx[], const size_t siz)
+static void ssh_protocol_init(protocol_ctx *ctx[], const size_t siz)
{
for (size_t i = 0; i < siz; ++i) {
ABORT_ON_FATAL( proto_listen(ctx[i]),
@@ -117,12 +117,7 @@ int main(int argc, char *argv[])
proto_ports[1] = "22223";
assert(SIZEOF(proto_ports) == SIZEOF(jail_ports));
ssh_protocol_preinit(proto_ports, ssh_proto, jail_ports, proto_siz);
-
- D2("Main process is dropping privileges to %s:%s", "nobody", "NULL");
- ABORT_ON_FATAL( change_user_group("nobody", NULL),
- "Main process dropping privileges" );
-
- ssh_protocol_postinit(ssh_proto, proto_siz);
+ ssh_protocol_init(ssh_proto, proto_siz);
memset(rdr, 0, sizeof(rdr));
rdr_ports[0] = "2222";