summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2005-03-17 14:32:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:05 -0500
commit99509cb0b502c34815dfe9ad33c0ba9c4c524713 (patch)
tree4856284177d4a1ae44269b614bc331c60053d277 /source3/smbd/open.c
parent9a4e3f7e6fdffeb51ac608aecdb029ae2af7cb34 (diff)
downloadsamba-99509cb0b502c34815dfe9ad33c0ba9c4c524713.tar.gz
samba-99509cb0b502c34815dfe9ad33c0ba9c4c524713.tar.bz2
samba-99509cb0b502c34815dfe9ad33c0ba9c4c524713.zip
r5854: Fix coredump when OS/2 checks for long file name support (with .+,;=[].).
Bugzilla 2338. Thanks to Guenter Kukkukk <guenter.kukkukk@kukkukk.com> (This used to be commit c13736287104d96fcc87ada0784eb43c6e373171)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 79c27388dc..9d9d9d9208 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1146,17 +1146,15 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_
oplock_request = 0;
}
- /* this is for OS/2 EAs - try and say we don't support them */
+ /* this is for OS/2 long file names - say we don't support them */
if (strstr(fname,".+,;=[].")) {
unix_ERR_class = ERRDOS;
/* OS/2 Workplace shell fix may be main code stream in a later release. */
-#if 1 /* OS2_WPS_FIX - Recent versions of OS/2 need this. */
unix_ERR_code = ERRcannotopen;
-#else /* OS2_WPS_FIX */
- unix_ERR_code = ERROR_EAS_NOT_SUPPORTED;
-#endif /* OS2_WPS_FIX */
-
- DEBUG(5,("open_file_shared: OS/2 EA's are not supported.\n"));
+ unix_ERR_ntstatus = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ DEBUG(5,("open_file_shared: OS/2 long filenames are not supported.\n"));
+ /* need to reset errno or DEVELOPER will cause us to coredump */
+ errno = 0;
file_free(fsp);
return NULL;
}