diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-08-20 20:32:23 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-08-20 20:32:23 +0000 |
commit | 46dbd8c06009ad9e64251ae844fb16f2a30f5ab7 (patch) | |
tree | b3665c4cdda6e60c2e85218f6778213817b4210f /source3/include | |
parent | c76dc7c2963d1205cf46849df6b6f0edbf63692d (diff) | |
download | samba-46dbd8c06009ad9e64251ae844fb16f2a30f5ab7.tar.gz samba-46dbd8c06009ad9e64251ae844fb16f2a30f5ab7.tar.bz2 samba-46dbd8c06009ad9e64251ae844fb16f2a30f5ab7.zip |
Changes to allow Samba to return the same error code as Windows NT.
Takes care of the cases where a Windows program is parsing a pathname
component by component and expects 2 different errors.
ERRbadpath - if a component in the path doesn't exist.
ERRbaddirectory - if a component in the path exists but is not a directory.
Extra error code added to smb.h to support this.
Code based on suggestions from "Christian Groessler" <chris@fast-ag.de>.
Jeremy (jallison@whistle.com)
(This used to be commit 28b3c6db8a81b41b448a4f3cd98e9cd2c4b5fb2e)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/include/smb.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 56bdbfe865..f716c1f9a9 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -691,7 +691,7 @@ void killkids(void); mode_t unix_mode(int cnum,int dosmode); int dos_mode(int cnum,char *path,struct stat *sbuf); int dos_chmod(int cnum,char *fname,int dosmode,struct stat *st); -BOOL unix_convert(char *name,int cnum,pstring saved_last_component); +BOOL unix_convert(char *name,int cnum,pstring saved_last_component, BOOL *bad_path); int disk_free(char *path,int *bsize,int *dfree,int *dsize); int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize); BOOL check_name(char *name,int cnum); diff --git a/source3/include/smb.h b/source3/include/smb.h index 0f2dc01865..1dbe04abc8 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -175,14 +175,15 @@ implemented */ #define ERRbadshare 32 /* Share mode on file conflict with open mode */ #define ERRlock 33 /* Lock request conflicts with existing lock */ #define ERRfilexists 80 /* File in operation already exists */ +#define ERRunknownlevel 124 #define ERRbadpipe 230 /* Named pipe invalid */ #define ERRpipebusy 231 /* All instances of pipe are busy */ #define ERRpipeclosing 232 /* named pipe close in progress */ #define ERRnotconnected 233 /* No process on other end of named pipe */ #define ERRmoredata 234 /* More data to be returned */ +#define ERRbaddirectory 267 /* Invalid directory name in a path. */ #define ERROR_EAS_DIDNT_FIT 275 /* Extended attributes didn't fit */ #define ERROR_EAS_NOT_SUPPORTED 282 /* Extended attributes not suppored */ -#define ERRunknownlevel 124 #define ERRunknownipc 2142 @@ -928,4 +929,7 @@ enum case_handling {CASE_LOWER,CASE_UPPER}; /* Size of buffer to use when moving files across filesystems. */ #define COPYBUF_SIZE (8*1024) +/* Integers used to override error codes. */ +extern int unix_ERR_class; +extern int unix_ERR_code; /* _SMB_H */ |