diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-17 23:06:57 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-17 23:06:57 +0000 |
commit | c512b1b91fb7f2a7a93b9033a33e06d966daadb4 (patch) | |
tree | d6f348196a4d417004be39cd65c98f0165fb7fe0 /source/smbd/trans2.c | |
parent | c381d32e3dc23fe887408016cae821aceb30da2c (diff) | |
download | samba-c512b1b91fb7f2a7a93b9033a33e06d966daadb4.tar.gz samba-c512b1b91fb7f2a7a93b9033a33e06d966daadb4.tar.xz samba-c512b1b91fb7f2a7a93b9033a33e06d966daadb4.zip |
configure configure.in: Added checks for statvfs64. Last bit of 64 bit widening (I hope :-).
include/config.h.in: Added #undef STAT_STATVFS64.
include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to
SMB_BIG_UINT and SMB_BIG_INT types.
include/smb.h: Added flag defines from CIFS spec.
lib/debug.c: Fixed one more mode_t issue.
lib/system.c: Added sys_statvfs wrapper.
lib/util.c: Changed trim_string to use size_t.
param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised
locking options. Question - shuld we do this for all options ?
passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned
types.
smbd/dosmode.c: Fixed one more mode_t issue.
smbd/negprot.c: Changed literals to be FLAG_ #defines.
smbd/nttrans.c: Removed dead code.
smbd/open.c: Changed disk_free call.
smbd/process.c: Changed literals to be FLAG_ #defines.
smbd/reply.c: Changed disk_free call.
smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using
UNICODE - should use ascii.
tests/summary.c: Added STAT_STATVFS64 check.
Jeremy.
Diffstat (limited to 'source/smbd/trans2.c')
-rw-r--r-- | source/smbd/trans2.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index fb93fd9e109..49687d4cca0 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1094,7 +1094,7 @@ static int call_trans2qfsinfo(connection_struct *conn, { case 1: { - int dfree,dsize,bsize; + SMB_BIG_UINT dfree,dsize,bsize; data_len = 18; sys_disk_free(".",&bsize,&dfree,&dsize); SIVAL(pdata,l1_idFileSystem,st.st_dev); @@ -1102,8 +1102,9 @@ static int call_trans2qfsinfo(connection_struct *conn, SIVAL(pdata,l1_cUnit,dsize); SIVAL(pdata,l1_cUnitAvail,dfree); SSVAL(pdata,l1_cbSector,512); - DEBUG(5,("call_trans2qfsinfo : bsize=%d, id=%x, cSectorUnit=%d, cUnit=%d, cUnitAvail=%d, cbSector=%d\n", - bsize, (unsigned)st.st_dev, bsize/512, dsize, dfree, 512)); + DEBUG(5,("call_trans2qfsinfo : bsize=%u, id=%x, cSectorUnit=%u, cUnit=%u, cUnitAvail=%u, cbSector=%d\n", + (unsigned int)bsize, (unsigned int)st.st_dev, ((unsigned int)bsize)/512, (unsigned int)dsize, + (unsigned int)dfree, 512)); break; } case 2: @@ -1132,6 +1133,7 @@ static int call_trans2qfsinfo(connection_struct *conn, SIVAL(pdata,4,128); /* Max filename component length */ SIVAL(pdata,8,2*strlen(FSTYPE_STRING)); PutUniCode(pdata+12,FSTYPE_STRING); + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); break; case SMB_QUERY_FS_LABEL_INFO: data_len = 4 + strlen(vname); @@ -1139,20 +1141,27 @@ static int call_trans2qfsinfo(connection_struct *conn, pstrcpy(pdata+4,vname); break; case SMB_QUERY_FS_VOLUME_INFO: - data_len = 18 + 2*strlen(vname); + + /* + * NB: The earlier CIFS spec that says this always + * uses UNICODE is incorrect ! JRA. + */ + + data_len = 18 + strlen(vname); + /* * Add volume serial number - hash of a combination of * the called hostname and the service name. */ SIVAL(pdata,8,str_checksum(lp_servicename(snum)) ^ (str_checksum(local_machine)<<16) ); - SIVAL(pdata,12,2*strlen(vname)); - PutUniCode(pdata+18,vname); + SIVAL(pdata,12,strlen(vname)); + pstrcpy(pdata+18,vname); DEBUG(5,("call_trans2qfsinfo : SMB_QUERY_FS_VOLUME_INFO namelen = %d, vol = %s\n", strlen(vname), vname)); break; case SMB_QUERY_FS_SIZE_INFO: { - int dfree,dsize,bsize; + SMB_BIG_UINT dfree,dsize,bsize; data_len = 24; sys_disk_free(".",&bsize,&dfree,&dsize); SIVAL(pdata,0,dsize); |