summaryrefslogtreecommitdiffstats
path: root/src/home/homework-cifs.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-10-26 16:58:56 +0200
committerLennart Poettering <lennart@poettering.net>2021-10-27 22:46:46 +0200
commit4c2ee5c7f26fda41d7eb1250c61c85cc869a90de (patch)
tree4c7a6c4433e6fcbb6d2104c5b4b44ef7bf5e3f57 /src/home/homework-cifs.c
parenthomework: actually try all supplied passwords (diff)
downloadsystemd-4c2ee5c7f26fda41d7eb1250c61c85cc869a90de.tar.xz
systemd-4c2ee5c7f26fda41d7eb1250c61c85cc869a90de.zip
homework: allow specifying explicit additional mount options when using CIFS backend
This is useful since certain shares can only be mounted with additional mount flags. For example the SMB share in modern AVM Fritz!Boxes requires "noserverino" to be set to work from Linux.
Diffstat (limited to 'src/home/homework-cifs.c')
-rw-r--r--src/home/homework-cifs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/home/homework-cifs.c b/src/home/homework-cifs.c
index 6184d7c30e..6a4431c229 100644
--- a/src/home/homework-cifs.c
+++ b/src/home/homework-cifs.c
@@ -83,6 +83,10 @@ int home_setup_cifs(
p, h->uid, user_record_gid(h), user_record_access_mode(h), user_record_access_mode(h)) < 0)
return log_oom();
+ if (h->cifs_extra_mount_options)
+ if (!strextend_with_separator(&options, ",", h->cifs_extra_mount_options))
+ return log_oom();
+
r = safe_fork("(mount)", FORK_RESET_SIGNALS|FORK_RLIMIT_NOFILE_SAFE|FORK_DEATHSIG|FORK_LOG|FORK_STDOUT_TO_STDERR, &mount_pid);
if (r < 0)
return r;