From 8bc7d6bebd4fcf8c95cb6d58da14404a5e46de91 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 9 Jan 1997 18:02:17 +0000 Subject: Makefile: Changes to split Solaris into Solaris2.3 and previous, and 2.4 and after from Paul Eggert. Makefile: Added AMIGA changes from Rask Ingemann Lambertsen . charset.c: Patch for Western European Languages from Josef Hinteregger charset.h: Patch for Western European Languages from Josef Hinteregger clitar.c: Patch to re-sync after read fail from (lost contributor name, sorry). includes.h: Patch for AMIGA from Rask Ingemann Lambertsen includes.h: Patch for SunOS atexit by Jeremy (jra@cygnus.com) interface.c: Patch for AMIGA from Rask Ingemann Lambertsen kanji.h: Patch for Western European Languages from Josef Hinteregger locking.c: Patch to fix file locking from Jeremy (jra@cygnus.com) locking.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) pipes.c: Patch to fix file locking from Jeremy (jra@cygnus.com) proto.h: Patch to fix file locking from Jeremy (jra@cygnus.com) reply.c: Patch to fix file locking from Jeremy (jra@cygnus.com) server.c: Patch to fix file locking from Jeremy (jra@cygnus.com) server.c: Patch for FAST_SHARE_MODE fix from (lost contributor name, sorry). smb.h: Patch to fix file locking from Jeremy (jra@cygnus.com) smb.h: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) status.c: Patch to fix file locking from Jeremy (jra@cygnus.com) statuc.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) system.c: Patch for Western European Languages from Josef Hinteregger trans2.c: Patch to fix file locking from Jeremy (jra@cygnus.com) trans2.c: Patch to fix volume name reported to Win95 from Jeremy (jra@cygnus.com) util.c: Patch for Western European Languages from Josef Hinteregger util.c: Patch to fix client_name from continuously returning UNKNOWN (from various contributors). version.h: Update to 1.9.16p10. (This used to be commit 03d28fa32eb094affa33133ebe2602fdb70f6361) --- source3/smbd/trans2.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 3b4cdeb1c6..b2bee17eea 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -210,7 +210,7 @@ static int call_trans2open(char *inbuf, char *outbuf, int bufsize, int cnum, if (!Files[fnum].open) return(UNIXERROR(ERRDOS,ERRnoaccess)); - if (fstat(Files[fnum].fd,&sbuf) != 0) { + if (fstat(Files[fnum].fd_ptr->fd,&sbuf) != 0) { close_file(fnum); return(ERROR(ERRDOS,ERRnoaccess)); } @@ -351,9 +351,6 @@ static int get_lanman2_dir_entry(int cnum,char *path_mask,int dirtype,int info_l } -#ifndef KANJI - unix2dos_format(fname, True); -#endif p = pdata; nameptr = p; @@ -447,11 +444,7 @@ static int get_lanman2_dir_entry(int cnum,char *path_mask,int dirtype,int info_l SIVAL(p,0,strlen(fname)); p += 4; SIVAL(p,0,0); p += 4; if (!was_8_3) { -#ifndef KANJI - strcpy(p+2,unix2dos_format(fname,False)); -#else strcpy(p+2,fname); -#endif if (!name_map_mangle(p+2,True,SNUM(cnum))) (p+2)[12] = 0; } else @@ -937,9 +930,12 @@ static int call_trans2qfsinfo(char *inbuf, char *outbuf, int length, int bufsize strcpy(pdata+4,vname); break; case SMB_QUERY_FS_VOLUME_INFO: - data_len = 17 + strlen(vname); - SIVAL(pdata,12,strlen(vname)); - strcpy(pdata+17,vname); + data_len = 18 + 2*strlen(vname); + SIVAL(pdata,12,2*strlen(vname)); + PutUniCode(pdata+18,vname); + DEBUG(5,("call_trans2qfsinfo : SMB_QUERY_FS_VOLUME_INFO namelen = %d, vol = %s\n", strlen(vname), + vname)); + break; break; case SMB_QUERY_FS_SIZE_INFO: { @@ -1018,11 +1014,11 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, CHECK_ERROR(fnum); fname = Files[fnum].name; - if (fstat(Files[fnum].fd,&sbuf) != 0) { + if (fstat(Files[fnum].fd_ptr->fd,&sbuf) != 0) { DEBUG(3,("fstat of fnum %d failed (%s)\n",fnum, strerror(errno))); return(UNIXERROR(ERRDOS,ERRbadfid)); } - pos = lseek(Files[fnum].fd,0,SEEK_CUR); + pos = lseek(Files[fnum].fd_ptr->fd,0,SEEK_CUR); } else { /* qpathinfo */ info_level = SVAL(params,0); @@ -1212,7 +1208,7 @@ static int call_trans2setfilepathinfo(char *inbuf, char *outbuf, int length, CHECK_ERROR(fnum); fname = Files[fnum].name; - fd = Files[fnum].fd; + fd = Files[fnum].fd_ptr->fd; if(fstat(fd,&st)!=0) { DEBUG(3,("fstat of %s failed (%s)\n", fname, strerror(errno))); -- cgit