summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-15 18:26:19 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-15 20:03:00 +1100
commit3c028ff88b7f8b4a19a058ee44aeb42c10f4b398 (patch)
treeddac33c24d3f8c62c98e512fcbd240d1a094f5ca /source4/libcli
parentc73ba89112dda50e1828e11c87f8006bc4968546 (diff)
downloadsamba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.tar.gz
samba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.tar.bz2
samba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.zip
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.
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/clifile.c2
-rw-r--r--source4/libcli/raw/interfaces.h4
-rw-r--r--source4/libcli/raw/rawfile.c6
-rw-r--r--source4/libcli/smb_composite/appendacl.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index 2cf174060b..b76bdc015f 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -241,7 +241,7 @@ int smbcli_nt_create_full(struct smbcli_tree *tree, const char *fname,
open_parms.ntcreatex.level = RAW_OPEN_NTCREATEX;
open_parms.ntcreatex.in.flags = CreatFlags;
- open_parms.ntcreatex.in.root_fid = 0;
+ open_parms.ntcreatex.in.root_fid.fnum = 0;
open_parms.ntcreatex.in.access_mask = DesiredAccess;
open_parms.ntcreatex.in.file_attr = FileAttributes;
open_parms.ntcreatex.in.alloc_size = 0;
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);
diff --git a/source4/libcli/smb_composite/appendacl.c b/source4/libcli/smb_composite/appendacl.c
index 69ed62a106..c1a964f151 100644
--- a/source4/libcli/smb_composite/appendacl.c
+++ b/source4/libcli/smb_composite/appendacl.c
@@ -254,7 +254,7 @@ struct composite_context *smb_composite_appendacl_send(struct smbcli_tree *tree,
if (state->io_open == NULL) goto failed;
state->io_open->ntcreatex.level = RAW_OPEN_NTCREATEX;
- state->io_open->ntcreatex.in.root_fid = 0;
+ state->io_open->ntcreatex.in.root_fid.fnum = 0;
state->io_open->ntcreatex.in.flags = 0;
state->io_open->ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
state->io_open->ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;