[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54561] [PATCH 1/4] services: Add samba service.
From: |
Maxime Devos |
Subject: |
[bug#54561] [PATCH 1/4] services: Add samba service. |
Date: |
Sun, 27 Mar 2022 16:13:46 +0200 |
User-agent: |
Evolution 3.38.3-1 |
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?
> > + #~(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.
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?
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
[bug#54561] [PATCH 3/4] doc: Add documentation for WSDD service., Simon Streit, 2022/03/25
[bug#54561] [PATCH 2/4] doc: Add "Samba" chapter., Simon Streit, 2022/03/25
[bug#54561] [PATCH 4/4] services: Add wsdd service., Simon Streit, 2022/03/25