RTEMS | rfs: Does not check for names too long (#5069)

Chris Johns (@chris) gitlab at rtems.org
Thu Jun 5 00:31:22 UTC 2025




Chris Johns commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5069#note_123128


The Open Group [rename](https://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html) call says about the `ENAMETOOLONG` :

> The length of a component of a pathname is longer than {NAME_MAX}.

The `libio` [rtems_filesystem_rename_t](https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/cpukit/include/rtems/libio.h?ref_type=heads#L462) handler passes in to the file system only the component and it provides the length. The standard also says all components must be less than the `NAME_MAX` size and FreeBSD also adds the path length should be less than 1023 characters. The RFS cannot check the path as `libio` provides a LOC for the path.

I will not fix this in the RFS and it is a `libio` bug. The `expected-fail` on the RFS is false and should be removed.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5069#note_123128
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250605/f887f2ab/attachment.htm>


More information about the bugs mailing list