diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-26 03:49:25 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-26 03:49:25 +0000 |
commit | a377543cc0af26ddcaf58aa4bc368afd70bca5ec (patch) | |
tree | 076cc6cd9002bbbfdf4b0cc5176c3770d0162753 /source3/smbd/reply.c | |
parent | b053652d490c8b37084797a64f14cdd44ff82578 (diff) | |
download | samba-a377543cc0af26ddcaf58aa4bc368afd70bca5ec.tar.gz samba-a377543cc0af26ddcaf58aa4bc368afd70bca5ec.tar.bz2 samba-a377543cc0af26ddcaf58aa4bc368afd70bca5ec.zip |
Fixed the problem with reply_getatr() being passed a "" name in reply_getatr,
replaced the paranoid code in smbd/filename.c that replaces a "" with a ".".
I am starting to think this code may well be needed.
Jeremy.
(This used to be commit bdc3d9f52fbded4b1483af8be0059decfd4bad34)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 63bbcbcdba..12a39589d6 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -812,19 +812,20 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size BOOL bad_path = False; pstrcpy(fname,smb_buf(inbuf) + 1); - unix_convert(fname,conn,0,&bad_path,&sbuf); /* dos smetimes asks for a stat of "" - it returns a "hidden directory" under WfWg - weird! */ if (! (*fname)) - { - mode = aHIDDEN | aDIR; - if (!CAN_WRITE(conn)) mode |= aRONLY; - size = 0; - mtime = 0; - ok = True; - } + { + mode = aHIDDEN | aDIR; + if (!CAN_WRITE(conn)) mode |= aRONLY; + size = 0; + mtime = 0; + ok = True; + } else + { + unix_convert(fname,conn,0,&bad_path,&sbuf); if (check_name(fname,conn)) { if (VALID_STAT(sbuf) || dos_stat(fname,&sbuf) == 0) @@ -839,6 +840,7 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size else DEBUG(3,("stat of %s failed (%s)\n",fname,strerror(errno))); } + } if (!ok) { |