Confused file name in directory

guy at gorodish.UUCP guy at gorodish.UUCP
Sun Mar 1 14:40:50 AEST 1987


>>In article <105 at aob.UUCP> someone finds a directory entry with an
>>embedded NUL, and has nothing handy to fix it.
>
>I have a public-domain c program call rmfile which is interactive
>and lets you either delete or rename files (including those with
>garbage characters in their names).  I've never paid attention to
>how it works, but I've used it and it DOES work.

Unless this program does so by opening the raw disk and writing
directly on the directories, it *cannot* work if you try to use it to
handle files with embedded NULs in their names.  Since the file names
passed as arguments to UNIX system calls are C strings, which *by
definition* cannot have embedded NULs, no UNIX system call can
possibly refer to such a file (unless you throw in a system call that
takes character arrays representing containing NON-NUL-terminated
strings as arguments).



More information about the Comp.unix.xenix mailing list