Open for files ending in .
Jeremy Allison
jra at samba.org
Tue Nov 18 01:42:22 GMT 2003
On Sun, Nov 09, 2003 at 05:44:28PM +1100, Andrew Bartlett wrote:
> I came across this a little while back:
>
> In our fd_open() code (Samba 3.0 cvs), we have the following snippit:
>
> fd = SMB_VFS_OPEN(conn,fname,flags,mode);
>
> /* Fix for files ending in '.' */
> if((fd == -1) && (errno == ENOENT) &&
> (strchr_m(fname,'.')==NULL)) {
> pstrcat(fname,".");
> fd = SMB_VFS_OPEN(conn,fname,flags,mode);
> }
>
> As we now mangle all filenames that end in '.' (rather than the old
> 'strip dot' and the like) should we still allow an open by appending a
> '.'? Fixing this would also mean we have one less place where we pstr*
> into a string passed (apparently safely, in this case) as an argument,
> and can move it to a 'const char *'.
Actually I just tested and we don't in the hash2 mangling method.
I will fix this (we do treat "name." as invalid in hash mangling,
but not hash2) then I think I'll make this change.
Jeremy.
More information about the samba-technical
mailing list