From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mEI+LQC5P2KSaQAAgWs5BA (envelope-from ) for ; Sun, 27 Mar 2022 03:08:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MOHsKQC5P2LfNwEAauVa8A (envelope-from ) for ; Sun, 27 Mar 2022 03:08:16 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7040023685 for ; Sun, 27 Mar 2022 03:08:16 +0200 (CEST) Received: from localhost ([::1]:37322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYHOA-0005qt-RG for larch@yhetil.org; Sat, 26 Mar 2022 21:08:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYHNz-0005qc-90 for guix-patches@gnu.org; Sat, 26 Mar 2022 21:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYHNx-0003UA-Uz for guix-patches@gnu.org; Sat, 26 Mar 2022 21:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nYHNx-0002Jp-LU for guix-patches@gnu.org; Sat, 26 Mar 2022 21:08:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54561] [PATCH 1/4] services: Add samba service. Resent-From: fesoj000 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Mar 2022 01:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54561 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54561@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16483432638878 (code B ref -1); Sun, 27 Mar 2022 01:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Mar 2022 01:07:43 +0000 Received: from localhost ([127.0.0.1]:54972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYHNe-0002J3-G5 for submit@debbugs.gnu.org; Sat, 26 Mar 2022 21:07:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:35194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYHNd-0002Iu-9y for submit@debbugs.gnu.org; Sat, 26 Mar 2022 21:07:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYHNd-0005qF-41 for guix-patches@gnu.org; Sat, 26 Mar 2022 21:07:41 -0400 Received: from [2a00:1450:4864:20::62a] (port=38439 helo=mail-ej1-x62a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYHNb-0003SR-0y for guix-patches@gnu.org; Sat, 26 Mar 2022 21:07:40 -0400 Received: by mail-ej1-x62a.google.com with SMTP id r13so22102663ejd.5 for ; Sat, 26 Mar 2022 18:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=3gFO+Oabr99bNkZ29lsG6HzBm7Q8pAQ/Pb1pHsAww3A=; b=SMu5IwikpFtLNWWYh06chvZ0/JjRXl2oAkdgaEyq92bA5HWc0bmCIamYb5sYh3qgfv qRRIRYM+22Y+9NVSv0V5S6GaJcK2z7xEnDqATvig9AMEgk+EACjAi/JdQ/FD4F4Jk7Pi M77VVY8m01g+NHVX+MPmxvjIU1LKMZqZuX8mS+pugmdu1GpMxnDUcJPLfLyiDtuqv/kf FybJ0oHPesDCF2Slz2SDJ4VxLYPrR9dGU2lk+8tl1HcVX0f9oa6F9i4uJx1WJOuWAHTM //qxXSACoU39bSPKOlXy65Awp7zp5ltsxfAdknyHEpfP6UBzpom2h/kMoj7y9HebzqeA pKOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=3gFO+Oabr99bNkZ29lsG6HzBm7Q8pAQ/Pb1pHsAww3A=; b=0jombSHwUvdwVrcabO0UAsOgXKGWQ/0ff5xIg8JJQShcjzkNMsy+puazlXG+mEguOQ XHSEGOZJsqOJtMF1oS9vf78mj6wozy6doW4Oixvcd8ZYcxFH7vsg6dvBUHSVk3gveTsZ eHNXsZBd6WgZEejbp5XsIevl1Bi7pTUfA6wiNZD2ZTLYo6h8Wm4cwvfGf1HNJpdg4g7C ptk2R9P7jwoAv1Gdut5KBcAdnCeeCNKbyvHzhOE+P274c/xvom9l1/Nze7K2d/e7YGBe SOPr/hJiX5EIIbI/BzgzP8u//glPwb70QvFu6ZYRl/lRzlxv06ymBTlb/SoAzDbV8eWM UwGg== X-Gm-Message-State: AOAM532laTYY5B/q0NstmHnvHfOVvq1A0s2+i+VN2mdY2v/dpr1UDiVH wv4IOLJpMhK8w4qtmZA9JVCqhCFn7q0= X-Google-Smtp-Source: ABdhPJx5Kw4kzseH0TTqHxBCPmX1H45oh1uQJ1oGA5cYvfBZezIR2rffsXchXf9qihLKm/xE/Q0RRg== X-Received: by 2002:a17:907:162a:b0:6db:b0e8:9721 with SMTP id hb42-20020a170907162a00b006dbb0e89721mr19585024ejc.579.1648343255204; Sat, 26 Mar 2022 18:07:35 -0700 (PDT) Received: from ?IPV6:2003:ee:af13:4e00:138c:330:2a14:b8fb? (p200300eeaf134e00138c03302a14b8fb.dip0.t-ipconnect.de. [2003:ee:af13:4e00:138c:330:2a14:b8fb]) by smtp.gmail.com with ESMTPSA id kb28-20020a1709070f9c00b006d5d8bf1b72sm3993787ejc.78.2022.03.26.18.07.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Mar 2022 18:07:34 -0700 (PDT) Message-ID: <2f1eb553-2d1d-2e83-1412-948011d502cc@gmail.com> Date: Sun, 27 Mar 2022 03:07:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US References: From: fesoj000 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=fesoj000@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648343296; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3gFO+Oabr99bNkZ29lsG6HzBm7Q8pAQ/Pb1pHsAww3A=; b=gKlbNiQI9Bw4I8Mss+wHrGjOUI7ZCP0Qtg+lT2mbzz/b0u+8XoWpirMIEgvl5lB+XgwHog 0TeljHrAIempcEtub2lKpbAYMNUBKXXd69B83gcUtEFS3o+14j6JUU1yJnCP3XVoUiiItL tdRHj8Ln5ydOvhESHwzPVZPMzUAEijMP4v84xoAbF3OmcqO3Rlo/0R8muupF7xeFBGpY0x pEMkol9X93n4TgDj4PWqJCmrPqid0Lk3n89dv3XADekjV7G6Z8ogO5Nz+9BcnkFTiVoGIz d2f8lNfCwsVNGeh2Anc02dqkzxtf8AtJKuLB+EKJP4ZnjEb+Rbnl5Xs+De3wNw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648343296; a=rsa-sha256; cv=none; b=gsSu2losnd0piI04FJs89o19wbmWzIp5xditd+htcqGGSlkUt4gVblWw/bRkjXkbn69t9+ oZmGLdacfDWIr0dxCm3axDG8yssK/Dm9aI5Uro1dFWwaWf5Hi/l/ThB3zdKGstuciHOOBU 6/9GTg+XZnPtSFWUPhmpLHVXq64TH5KZW/bJzLArV+wOZZqecly0YaveZWXb1kUsdASn44 4VRM36w+QGP1n78/nMG3ABZNpv89Wmb6BcFJbWoCXz7LFJMa95knB+ytG8ijEijWDzWPny Jk/EMLGwAFCQ4P3mgtdiVsiXL6VQ4/ztx3aYtUx6y00a9VJjZHf5DqBrl2YW3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SMu5Iwik; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.62 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SMu5Iwik; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7040023685 X-Spam-Score: 4.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2IDywMFJBNxK I have a local service definition for samba i wanted to upstream at some point. Your service looks better then mine though. > +(define (samba-activation config) > + (let ((package (samba-configuration-package config)) > + (config-file (samba-configuration-config-file config))) > + (with-imported-modules '((guix build utils)) > + (let ((lib-directory "/var/lib/samba") > + (log-directory "/var/log/samba") > + (run-directory "/var/run/samba") > + (smb.conf "/etc/samba/smb.conf")) > + #~(begin > + (use-modules (guix build utils)) > + > + (mkdir-p #$log-directory) > + (mkdir-p #$run-directory) > + (mkdir-p (string-append #$lib-directory "/private")) > + (mkdir-p "/etc/samba") > + (copy-file #$config-file #$smb.conf) > + (system* (string-append #$package "/bin/testparm") > + "--suppress-prompt" #$smb.conf)))))) Is it a good idea to create all those directories with the default umask? I always wanted to investigate which of those directories contains sensitive data. I never got around to. Another thing i wanted to investigate: can samba and friends be run as non-root users? I think it would be a good idea to do that if possible. fyi: I currently use samba as an AD DC.