Allow mounting CIFS as guest (#4384)

This commit is contained in:
Joakim Sørensen 2023-06-20 16:20:06 +02:00 committed by GitHub
parent 254ec2d1af
commit 4bed8c1327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -359,8 +359,8 @@ class CIFSMount(NetworkMount):
"""Options to use to mount."""
return (
super().options + [f"username={self.username}", f"password={self.password}"]
if self.username
else []
if self.username and self.password
else ["guest"]
)

View File

@ -116,6 +116,7 @@ async def test_load(
"mnt-data-supervisor-mounts-backup_test.mount",
"fail",
[
["Options", Variant("s", "guest")],
["Type", Variant("s", "cifs")],
["Description", Variant("s", "Supervisor cifs mount: backup_test")],
["What", Variant("s", "//backup.local/backups")],

View File

@ -177,6 +177,7 @@ async def test_load(
"mnt-data-supervisor-mounts-test.mount",
"fail",
[
["Options", Variant("s", "guest")],
["Type", Variant("s", "cifs")],
["Description", Variant("s", "Supervisor cifs mount: test")],
["What", Variant("s", "//test.local/share")],