From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=altlinux.org; s=dkim; h=Subject:Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RJrhERkj+UX8/4Y7Gf1KZh1nL3H2JvASYpE7YYkLAAg=; b=dOS2KTpz53MkygFhcrKRMUuRNf UVjhOAYuMv+FEvlC693JGhNQU9SjcR8d0/E1CVQZZom7Dr/d8KRIFXqSEPlhsOUuhX8v1TqhmQWGv 3NOrfSFtgOkBKMaOoX6yg8Dy/GqlgF5LoSQE+pwQiVOd6lXHtPMv8qsb6vsNVwnwgmNDTUYW4d820 AotXNQDXcjKskH/GPOo6ouWQBajJUO+xGvhYgf6KbWUJxvRun7V2HMWYiw2B0wEA8fVxY7EITkNg5 8kiLr++J+eAXXWjCNPtS+BUQ+AbKmEG1tSTziNJUIYSzExQhc8T4abXo1/jcbTy5LYX5tFBd/8Nd+ ipysGmqw==; From: Arseny Maslennikov To: devel@lists.altlinux.org, ldv@altlinux.org Date: Thu, 22 Oct 2020 14:43:37 +0300 Message-Id: <20201022114343.1810141-1-arseny@altlinux.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 37.204.119.143 X-SA-Exim-Mail-From: arseny@altlinux.org X-SA-Exim-Version: 4.2.1 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) Cc: Arseny Maslennikov Subject: [devel] [PATCH hasher-priv v2 0/6] hasher-privd X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2020 11:44:06 -0000 Archived-At: List-Archive: List-Post: This series is essentially [1], but squashed. Additional fixes not included in [1]: * The listening unix-domain endpoints are now located at drwx--x--- root hashman /run/hasher-priv. * Minor code style adjustments. Known issues: On Thu, Sep 17, 2020 at 04:09:35PM +0300, Arseny Maslennikov wrote: > There's an issue when hasher-privd tries to fulfill a chrootuid{1,2} > request: the (eventually) unprivileged task executor process > successfully invokes waitpid() or the likes on a child process, > select()s on I/O descriptors, but gets CHLD later — and it looks like > the inherited signal handler causes it to wait again. Ultimately the > task executor stops forwarding standard I/O of the task to/from the > caller and hangs. See also: devel@ discussion of v1[2]. [1] http://git.altlinux.org/people/arseny/packages/?p=hasher-priv.git;a=shortlog;h=refs/heads/legion-daemon-v1-p [2] https://lists.altlinux.org/pipermail/devel/2020-September/211871.html Alexey Gladkov (3): Turn hasher-priv into a daemon Add systemd and sysvinit service files Add preliminary cgroup support Arseny Maslennikov (3): Link with libsetproctitle by Dmitry V. Levin daemon: set titles for subprocesses Install hasher-priv without set ugids hasher-priv/.gitignore | 1 + hasher-priv/DESIGN | 281 +++++++++++++-------- hasher-priv/Makefile | 37 ++- hasher-priv/caller.c | 81 +++--- hasher-priv/caller_server.c | 385 +++++++++++++++++++++++++++++ hasher-priv/caller_task.c | 226 +++++++++++++++++ hasher-priv/cgroup.c | 119 +++++++++ hasher-priv/cmdline.c | 27 +- hasher-priv/communication.c | 394 ++++++++++++++++++++++++++++++ hasher-priv/communication.h | 79 ++++++ hasher-priv/config.c | 150 +++++++++++- hasher-priv/epoll.c | 39 +++ hasher-priv/epoll.h | 18 ++ hasher-priv/hasher-priv.c | 78 ++++++ hasher-priv/hasher-priv.spec | 12 +- hasher-priv/hasher-privd.c | 381 +++++++++++++++++++++++++++++ hasher-priv/hasher-privd.service | 14 ++ hasher-priv/hasher-privd.sysvinit | 103 ++++++++ hasher-priv/io_log.c | 2 +- hasher-priv/io_x11.c | 2 +- hasher-priv/killuid.c | 2 +- hasher-priv/logging.c | 71 ++++++ hasher-priv/logging.h | 55 +++++ hasher-priv/main.c | 75 ------ hasher-priv/pass.c | 117 ++++++++- hasher-priv/pidfile.c | 129 ++++++++++ hasher-priv/pidfile.h | 44 ++++ hasher-priv/priv.h | 35 ++- hasher-priv/server.conf | 22 ++ hasher-priv/sockets.c | 183 ++++++++++++++ hasher-priv/sockets.h | 32 +++ hasher-priv/x11.c | 1 + 32 files changed, 2945 insertions(+), 250 deletions(-) create mode 100644 hasher-priv/caller_server.c create mode 100644 hasher-priv/caller_task.c create mode 100644 hasher-priv/cgroup.c create mode 100644 hasher-priv/communication.c create mode 100644 hasher-priv/communication.h create mode 100644 hasher-priv/epoll.c create mode 100644 hasher-priv/epoll.h create mode 100644 hasher-priv/hasher-priv.c create mode 100644 hasher-priv/hasher-privd.c create mode 100644 hasher-priv/hasher-privd.service create mode 100755 hasher-priv/hasher-privd.sysvinit create mode 100644 hasher-priv/logging.c create mode 100644 hasher-priv/logging.h delete mode 100644 hasher-priv/main.c create mode 100644 hasher-priv/pidfile.c create mode 100644 hasher-priv/pidfile.h create mode 100644 hasher-priv/server.conf create mode 100644 hasher-priv/sockets.c create mode 100644 hasher-priv/sockets.h -- 2.25.4