Shared folders allows creating some unusable entries (blank space, .
, ..
) that cannot be deleted afterwards (well, .
and ..
were marked as deleted and disappeared from cockpit interface after some tries and after refreshing the page):
echo '{"action":"delete","item":{"SmbRecycleBinStatus":"disabled","SmbRecycleBinVersionStatus":"disabled","SmbAuditStatus":"disabled","SmbShareBrowseable":"enabled","guestAccess":"enabled","name":"","OwningGroup":"","acls":{"EVERYONE":"rw"},"Description":"","SmbRecycleBinVersionsStatus":"disabled","files":-1,"size":-1,"migrateVhost":null}}' | /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-samba/sharedfolders/delete | jq
{
"type": "GenericError",
"id": 1571480270,
"message": "generic_error"
}
# db accounts show
=ibay
AclRead=
AclWrite=
Description=
GroupAccess=
OtherAccess=
OwningGroup=
SmbAuditStatus=disabled
SmbGuestAccessType=rw
SmbRecycleBinStatus=disabled
SmbRecycleBinVersionsStatus=disabled
SmbShareBrowseable=enabled
.=ibay
AclRead=
AclWrite=
Description=
GroupAccess=
OtherAccess=
OwningGroup=
SmbAuditStatus=disabled
SmbGuestAccessType=rw
SmbRecycleBinStatus=disabled
SmbRecycleBinVersionsStatus=disabled
SmbShareBrowseable=enabled
..=ibay
AclRead=
AclWrite=
Description=
GroupAccess=
OtherAccess=
OwningGroup=
SmbAuditStatus=disabled
SmbGuestAccessType=rw
SmbRecycleBinStatus=disabled
SmbRecycleBinVersionsStatus=disabled
SmbShareBrowseable=enabled
It is the same behavior as with firewall objects (services):
Also, some missing validation message: