From 3c028ff88b7f8b4a19a058ee44aeb42c10f4b398 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Oct 2009 18:26:19 +1100 Subject: s4-smb: declare root_fid as a file handle In order to implement root_fid in the s4 SMB server we need to declare it as a handle type, just as for other fnum values in SMB. This required some extensive (but simple) changes in many bits of code. --- source4/libcli/raw/interfaces.h | 4 ++-- source4/libcli/raw/rawfile.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/libcli/raw') diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index f7d64d04cc..af2158cc16 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -1418,7 +1418,7 @@ union smb_open { enum smb_open_level level; struct { uint32_t flags; - uint32_t root_fid; + union smb_handle root_fid; uint32_t access_mask; uint64_t alloc_size; uint32_t file_attr; @@ -1628,7 +1628,7 @@ union smb_open { enum smb_open_level level; struct { uint32_t flags; - uint32_t root_fid; + union smb_handle root_fid; uint32_t access_mask; uint64_t alloc_size; uint32_t file_attr; diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c index ea254a5bf2..d8925b019d 100644 --- a/source4/libcli/raw/rawfile.c +++ b/source4/libcli/raw/rawfile.c @@ -379,7 +379,7 @@ static struct smbcli_request *smb_raw_nttrans_create_send(struct smbcli_tree *tr params = nt.in.params.data; SIVAL(params, 0, parms->ntcreatex.in.flags); - SIVAL(params, 4, parms->ntcreatex.in.root_fid); + SIVAL(params, 4, parms->ntcreatex.in.root_fid.fnum); SIVAL(params, 8, parms->ntcreatex.in.access_mask); SBVAL(params, 12, parms->ntcreatex.in.alloc_size); SIVAL(params, 20, parms->ntcreatex.in.file_attr); @@ -564,7 +564,7 @@ _PUBLIC_ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, unio SSVAL(req->out.vwv, VWV(1),0); SCVAL(req->out.vwv, VWV(2),0); /* padding */ SIVAL(req->out.vwv, 7, parms->ntcreatex.in.flags); - SIVAL(req->out.vwv, 11, parms->ntcreatex.in.root_fid); + SIVAL(req->out.vwv, 11, parms->ntcreatex.in.root_fid.fnum); SIVAL(req->out.vwv, 15, parms->ntcreatex.in.access_mask); SBVAL(req->out.vwv, 19, parms->ntcreatex.in.alloc_size); SIVAL(req->out.vwv, 27, parms->ntcreatex.in.file_attr); @@ -623,7 +623,7 @@ _PUBLIC_ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, unio SSVAL(req->out.vwv, VWV(1),0); SCVAL(req->out.vwv, VWV(2),0); /* padding */ SIVAL(req->out.vwv, 7, parms->ntcreatexreadx.in.flags); - SIVAL(req->out.vwv, 11, parms->ntcreatexreadx.in.root_fid); + SIVAL(req->out.vwv, 11, parms->ntcreatexreadx.in.root_fid.fnum); SIVAL(req->out.vwv, 15, parms->ntcreatexreadx.in.access_mask); SBVAL(req->out.vwv, 19, parms->ntcreatexreadx.in.alloc_size); SIVAL(req->out.vwv, 27, parms->ntcreatexreadx.in.file_attr); -- cgit