Name Mangling and Case
Back in the days of DOS and Windows 3.1, every filename was limited to eight upper-case characters, followed by a dot, and three more uppercase characters. This was known as the 8.3 format , and was a huge nuisance. Windows 95/98, Windows NT, and Unix have since relaxed this problem by allowing many more case-sensitive characters to make up a filename. Table 5.6 shows the current naming state of several popular operating systems.
Table 5-6. Operating System Filename Limitations
|
Operating System |
File Naming Rules |
|---|---|
|
DOS 6.22 or below |
Eight characters followed by a dot followed by a three-letter extension (8.3 format); case insensitive |
|
Windows 3.1 for Workgroups |
Eight characters followed by a dot followed by a three-letter extension (8.3 format); case insensitive |
|
Windows 95/98 |
127 characters; case sensitive |
|
Windows NT |
127 characters; case sensitive |
|
Unix |
255 characters; case sensitive |
Samba still has to remain backwards compatible with network clients who store files only in the 8.3 format, such as Windows for Workgroups. If a user creates a file on a share called antidisestablishmentarianism.txt, a Windows for Workgroups client couldn’t tell it apart from another file in the same directory called antidisease.txt. Like Windows 95/98 and Windows NT, Samba has to employ a special methodology of translating a long filename to an 8.3 filename in such a way that similar filenames will not cause collisions. This is called name mangling, and Samba deals ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access