Open for files ending in .

Andrew Bartlett abartlet at
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)) {
		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
Manager, Authentication Subsystems, Samba Team  abartlet at
Student Network Administrator, Hawker College   abartlet at
-------------- 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 :

More information about the samba-technical mailing list