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:MIME-Version: Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: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=DdhV94YdW2y7rQYliuQwpK+9EA6vk+kgRcFfB/Bnaik=; b=bRE4NVYGGF6X1VRUBaVgfDcigF /SCuDCTxRLtuDND7OOw2iiIfg7acYtKvI9CIFLtUUmJXn+w2t/0xB61nGoAmdjcA+EB70++4UgrxM R9GwXK+icISvlrIlXkQLg2P1Ld0x1+1rSIDBri1FUU6hJHLGHbCxfgyFLgh9TRvcTR6/bh7byk49M zYOiYmS7Jjun6udohWPgQhlLIQB51AZK+pTmbrF9cjeN8v4bClLIBIftS2U8Cn0V7OZdxGWHmO6R7 io+gjN9aKp2YyczAyrH+57rcMTGfLg//hnDVa7gy226NuSS0nRda4orCL87vU4BV23F9jNvBvCtkB WFkVq48g==; From: Arseny Maslennikov To: devel@lists.altlinux.org Date: Tue, 24 Aug 2021 11:24:29 +0300 Message-Id: <20210824082436.1555890-1-arseny@altlinux.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 10.15.13.28 X-SA-Exim-Mail-From: arseny@altlinux.org X-SA-Exim-Version: 4.2.1 X-SA-Exim-Scanned: No (on mail.cs.msu.ru); Unknown failure Cc: Arseny Maslennikov Subject: [devel] [PATCH hasher-priv v3 0/7] 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: Tue, 24 Aug 2021 08:25:05 -0000 Archived-At: List-Archive: List-Post: This is an effort to make hasher-priv a privileged daemon which operates in response to requests from unprivileged client processes. In short, we want this to clear the set-uid root privilege from /usr/libexec/hasher-priv/hasher-priv for the tool to be compatible with no_new_privs environments, among other benefits. The cgroup patch[3]] is not yet ready for submission, so it's dropped for now. See also: devel@ discussion of v1[1], v2[2], commit message of 1/7. [1] https://lore.altlinux.org/devel/cover.1576183643.git.legion@altlinux.org/ [2] https://lore.altlinux.org/devel/20201022114343.1810141-1-arseny@altlinux.org/ [3] https://lore.altlinux.org/devel/20201022114343.1810141-7-arseny@altlinux.org/ Alexey Gladkov (1): Add systemd and sysvinit service files Arseny Maslennikov (6): Turn hasher-priv into a daemon sockets: xsendmsg: get rid of SIGPIPE on socket writes chrootuid: explicitly reset signal mask before forking off payload 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 | 35 ++- hasher-priv/caller.c | 81 +++--- hasher-priv/caller_server.c | 350 ++++++++++++++++++++++++ hasher-priv/caller_task.c | 225 +++++++++++++++ hasher-priv/chrootuid.c | 5 + hasher-priv/cmdline.c | 27 +- hasher-priv/communication.c | 394 +++++++++++++++++++++++++++ hasher-priv/communication.h | 80 ++++++ hasher-priv/config.c | 147 +++++++++- hasher-priv/daemon.conf | 13 + 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 | 439 ++++++++++++++++++++++++++++++ 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 | 57 +++- hasher-priv/sockets.c | 180 ++++++++++++ hasher-priv/sockets.h | 32 +++ hasher-priv/x11.c | 1 + 32 files changed, 2859 insertions(+), 250 deletions(-) create mode 100644 hasher-priv/caller_server.c create mode 100644 hasher-priv/caller_task.c create mode 100644 hasher-priv/communication.c create mode 100644 hasher-priv/communication.h create mode 100644 hasher-priv/daemon.conf 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/sockets.c create mode 100644 hasher-priv/sockets.h -- 2.32.0