diff --git a/interfaces/builtin/custom_device.go b/interfaces/builtin/custom_device.go index e39abedc197..98e81665462 100644 --- a/interfaces/builtin/custom_device.go +++ b/interfaces/builtin/custom_device.go @@ -52,7 +52,7 @@ var ( customDeviceInternalError = errors.New(`custom-device interface internal error`) // Validating regexp for filesystem paths - customDevicePathRegexp = regexp.MustCompile(`^/[^"@]*$`) + customDevicePathRegexp = regexp.MustCompile(`^/[^"]*$`) // Validating regexp for udev device names. // We forbid: diff --git a/interfaces/builtin/custom_device_test.go b/interfaces/builtin/custom_device_test.go index 19de629758d..83f4928f335 100644 --- a/interfaces/builtin/custom_device_test.go +++ b/interfaces/builtin/custom_device_test.go @@ -72,9 +72,11 @@ slots: read-devices: - /dev/js* files: - write: [ /bar ] + write: [ /bar, /baz@qux ] read: - /dev/input/by-id/* + - /dev/dma_heap/qcom,qseecom + - /sys/devices/platform/soc@0/soc@0:bus@30000000/30350000.ocotp-ctrl/imx-ocotp0/nvmem udev-tagging: - kernel: input/mice subsystem: input @@ -208,10 +210,6 @@ apps: "devices: [/dev/foo**]", `custom-device "devices" path contains invalid glob pattern "\*\*"`, }, - { - "devices: [/dev/@foo]", - `custom-device "devices" path must start with / and cannot contain special characters.*`, - }, { "devices: [/dev/foo|bar]", `custom-device "devices" path must start with /dev/ and cannot contain special characters.*`,