From 9f16dc623c229a29d5a15c60d54e81472fb71277 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 28 Jul 2019 16:02:50 -0400 Subject: Add empty commands --- .gitignore | 5 +++++ Makefile | 7 ++++++- ingest.c | 24 ++++++++++++++++++++++++ menu.c | 24 ++++++++++++++++++++++++ setup.c | 24 ++++++++++++++++++++++++ sshd_config | 2 +- view.c | 24 ++++++++++++++++++++++++ wrapper.c | 24 ++++++++++++++++++++++++ 8 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 ingest.c create mode 100644 menu.c create mode 100644 setup.c create mode 100644 view.c create mode 100644 wrapper.c diff --git a/.gitignore b/.gitignore index cc74683..734cf37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ chroot.tar config.mk +ingest +menu root +setup stream tags +view +wrapper diff --git a/Makefile b/Makefile index c27b886..a510ad2 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,12 @@ LDLIBS = -lutil -include config.mk -BINS = stream +BINS += ingest +BINS += menu +BINS += setup +BINS += stream +BINS += view +BINS += wrapper all: tags ${BINS} diff --git a/ingest.c b/ingest.c new file mode 100644 index 0000000..dde890a --- /dev/null +++ b/ingest.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2019 C. McEnroe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +int main(void) { + // TODO: Read info, listen on socket, emulate terminal. +} diff --git a/menu.c b/menu.c new file mode 100644 index 0000000..fbab9d3 --- /dev/null +++ b/menu.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2019 C. McEnroe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +int main(void) { + // TODO: Present menu of streams, option to create. +} diff --git a/setup.c b/setup.c new file mode 100644 index 0000000..11bd01d --- /dev/null +++ b/setup.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2019 C. McEnroe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +int main(void) { + // TODO: Stream name, terminal size, listed, instructions. +} diff --git a/sshd_config b/sshd_config index 4a965d0..f7a3ea6 100644 --- a/sshd_config +++ b/sshd_config @@ -4,7 +4,7 @@ Match User stream PasswordAuthentication yes PermitEmptyPasswords yes ChrootDirectory /home/stream - ForceCommand ssh-command + ForceCommand wrapper AllowAgentForwarding no AllowTcpForwarding no diff --git a/view.c b/view.c new file mode 100644 index 0000000..77a236d --- /dev/null +++ b/view.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2019 C. McEnroe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +int main(void) { + // TODO: Connect to socket, emulate terminal. +} diff --git a/wrapper.c b/wrapper.c new file mode 100644 index 0000000..b3aaf28 --- /dev/null +++ b/wrapper.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2019 C. McEnroe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +int main(void) { + // TODO: Grab SSH_ORIGINAL_COMMAND, check isatty(3). +} -- cgit 1.4.1