Re: [PATCH 3/3] Limit length and set of characters allowed of devname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/21/22 06:50, Mariusz Tkaczyk wrote:
> When the user creates a device with a name that contains whitespace,
> mdadm timeouts and throws an error. This issue is caused by udev, which
> truncates /dev/md link until the first whitespace.
> 
> This patch introduces prohibition of characters other than A-Za-z0-9.-_
> in the device name. Also, it prohibits using leading "-" in device name,
> so name won't be confused with cli parameter.
> Set of allowed characters is taken from POSIX 3.280 Portable Character
> Set. Also, device name length now is limited to NAME_MAX.
> 
> In some places there are other requirements for string length (e.g. size
> up to MD_NAME_MAX for device name). This routine is made to follow POSIX
> and other, more strict limitations should be checked separately.
> We are aware of the risk of regression in exceptional cases (as
> escape_devname function is removed) that should be fixed by updating
> the array name.
> 
> The posix validation is added for:
> - 'name' parameter in every mode.
> - secondary device name (first devlist entry), only for create and
> assembly.
> 
> To limit regression risk, config entries are excluded from POSIX
> validation.
> 
> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@xxxxxxxxxxxxxxx>

Hi Mariusz,

This no longer applies cleanly. Any chance you can post an updated version?

Thanks,
Jes





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux