From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19232 invoked from network); 1 Jul 2023 16:02:03 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 1 Jul 2023 16:02:03 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id B737340BE2; Sun, 2 Jul 2023 02:01:59 +1000 (AEST) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by minnie.tuhs.org (Postfix) with ESMTPS id F20E840B9B for ; Sun, 2 Jul 2023 02:01:44 +1000 (AEST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fbc54cab6fso21988525e9.0 for ; Sat, 01 Jul 2023 09:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688227303; x=1690819303; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=aMINRAVk/nRFW9cWnPGen8rVrfC3RsRNJFG3D8ZhnUY=; b=H01se0k2JC0d+NWMWc/tg3bGEy2JaA9mKHDPPIh3HVc+Jt9icu2R+46kaH3sdylRQE j2zz5kjfMVs2oVuMT5PtFzTFydBOAyp1cDJAOKewzga+UdzulxzuGQHpFbCYQh7M5N6m +if4qUmTaGvEX6HFLmnLz7kTNGRj9vLlt2EbbchaWjrFOrLvWhOtFASCJivrkkcCgTJb 1FZPQSBswn1kNMSg3aTQ4V/VRvxGBO/8MheCxGzBXJQ1YEyqa0Lat5u4J9iSdgxjiN8A jFkiCV2/ca0kFrZWShWQdhJLqUdZlrYjSIjyoLiVL9PE0wGyEG4OBpA/pXucE5C3iNPJ tE+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688227303; x=1690819303; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aMINRAVk/nRFW9cWnPGen8rVrfC3RsRNJFG3D8ZhnUY=; b=WbU8tLjJOelYu9USKEav3jnX/dppjyFUWM+8bVfjR6EWWc4/qw7QZB2DVopRbRyohI Y+D9K3o2CVi/x1nKaRf1PJM3SZ1hR08jaexrOO0UMIOBrXxj3V9iMxUbEuhne34Xcedi f2BDpwRD3gYxP7EG0YLb4EqqBB0JddWv2dcxbrKulPAnS4Qtzi8t0zcWdJccRvzzfKik KvFn5xqpNcDXHPymEpCWqvr8qHsnMz6aUY/tptf7S5LWwtsGrD7yNPqIZ4hx/e1EvFNA 3nFH7uG+9c/joUyJToG0CIY97b0y/RrXZCmPNeLCHlCDvpKauon3P5OuGALycB7DxcyY 5PWw== X-Gm-Message-State: AC+VfDyODQfuyTOR3+AoJALmYgz0KSLn+BvJ4L+1RqlDfBbqUqPNdGHn fBSV3u64fw9Pl5j31ftsRtbhewSfMYAbtw== X-Google-Smtp-Source: ACHHUZ6ne3Yy0OLNJOsewQ4rEavuznGV4E+hat9gsgw1X/kHUyoSMhwHVxq7Mfgr9UuJqLx1bvQi4w== X-Received: by 2002:a7b:c409:0:b0:3f8:946:115d with SMTP id k9-20020a7bc409000000b003f80946115dmr4369853wmi.30.1688227302803; Sat, 01 Jul 2023 09:01:42 -0700 (PDT) Received: from schwarzy (lfbn-idf3-1-667-244.w86-252.abo.wanadoo.fr. [86.252.237.244]) by smtp.gmail.com with ESMTPSA id k16-20020a7bc410000000b003fbc9b9699dsm3732774wmi.45.2023.07.01.09.01.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 09:01:42 -0700 (PDT) From: Edouard Klein To: coff@tuhs.org Date: Sat, 01 Jul 2023 18:00:07 +0200 Message-ID: <877crjfwnv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Message-ID-Hash: B6BT6HECXRSQN3CTL2WIRLH5BAPPSHNK X-Message-ID-Hash: B6BT6HECXRSQN3CTL2WIRLH5BAPPSHNK X-MailFrom: edouardklein@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] A slack clone in 5 lines of bash List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Dear Old Farts, I've written a chat system that relies at its core on UNIX's permission system. All the explanations are here: https://the-dam.org/docs/explanations/suc.html I thought it would be of interest to the list as it has one foot in the past (using system primitives from the 70's for access control) and one foot in the future: (optionally) using GNU Guix's declarative configuration to create the necessary users, groups, and files. I know most of you have used (and some maybe still do) talk et al. This system is even simpler, just a forever loop: while /usr/bin/true do read -r line || exit 0 # EOF /usr/bin/echo "$(/usr/bin/date --iso-8601=seconds)"\ "$(printf "%-9s" "$(/usr/bin/id --user --name --real)")" \ "$line" >> /var/lib/suc/"$1" done I'd be happy to hear any comments or to welcome you on the Dam, where we test this stuff. Cheers ! Edouard.