GNU bug report logs -
#54561
[PATCH 0/4] Add service declarations for Samba
Previous Next
Reported by: Simon Streit <simon <at> netpanic.org>
Date: Fri, 25 Mar 2022 08:49:01 UTC
Severity: normal
Tags: patch
Done: Lars-Dominik Braun <lars <at> 6xq.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Maxime Devos <maximedevos <at> telenet.be> writes:
> fesoj000 schreef op zo 27-03-2022 om 03:07 [+0200]:
>> > +(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"))
>
> Is it necessary to put the configuration file there?
> Can be we do something like (system* "/.../testparm" #$smb.conf), where
> smb.conf is the generated configuration file?
No, not really. The Samba suit has a lot of tools that may want to look
into the default config directory. It seems that any relevant
configuration belonging to Samba lands in smb.conf, that is looked into
anytime when needed. That is my impression, and thus
placed it there.
>> 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.
I'm not so sure myself. That was the end result of what had to be
created to have the service successfully initiate itself. True that I
have not investigated this myself yet. While writing this service I was
comparing the directory structure with Debian and Arch Linux, to be sure
that it would work.
>
> FWIW, you can use 'mkdir-p/perms' to set the permission bits.
> The (string-append ...) can be simplified to:
>
> (system* #$(file-append package "/bin/testparm" "--suppres-prompt
> #$smb.conf).
>
> Also, would it be a good idea to use (invoke ...) instead of system, to
> make sure errors are detected? What is the 'suppress-prompt' for?
My understanding now would be better to write invoke. Thanks for
pointing this out.
This bug report was last modified 2 years and 235 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.