Open for files ending in .
Andrew Bartlett
abartlet at samba.org
Sun Nov 9 06:44:28 GMT 2003
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 *'.
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20031109/acee74ba/attachment.bin
More information about the samba-technical
mailing list