summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-02 04:17:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:16 -0500
commit8692564e350db4dfa4a9ef4c4cb014d76b284d3b (patch)
tree891fbe0b3b55c4b7706bdb6ad8cd85c59cd070e2
parent5011f901aa0140ed60a0b58e80ab0f14810ba432 (diff)
downloadsamba-8692564e350db4dfa4a9ef4c4cb014d76b284d3b.tar.gz
samba-8692564e350db4dfa4a9ef4c4cb014d76b284d3b.tar.bz2
samba-8692564e350db4dfa4a9ef4c4cb014d76b284d3b.zip
r3458: more solaris portability fixes, the main one being that we can't use a
structure element called "open" as its a macro on solaris. (This used to be commit 4e92e15c4e396b1d8cd211192888fea68c2cf0f9)
-rw-r--r--source4/include/includes.h10
-rw-r--r--source4/include/smb_interfaces.h2
-rw-r--r--source4/include/system/passwd.h4
-rw-r--r--source4/lib/fault.c1
-rw-r--r--source4/lib/system.c116
-rw-r--r--source4/libcli/raw/rawfile.c20
-rw-r--r--source4/ntvfs/ntvfs_generic.c36
-rw-r--r--source4/smb_server/reply.c22
-rw-r--r--source4/torture/gentest.c20
-rw-r--r--source4/torture/raw/open.c62
10 files changed, 86 insertions, 207 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index dca1824b22..cda7f976c3 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -189,16 +189,6 @@ extern char *sys_errlist[];
extern int errno;
#endif
-#ifdef HAVE_BROKEN_GETGROUPS
-#define GID_T int
-#else
-#define GID_T gid_t
-#endif
-
-#ifndef NGROUPS_MAX
-#define NGROUPS_MAX 32 /* Guess... */
-#endif
-
/* Our own pstrings and fstrings */
#include "pstring.h"
diff --git a/source4/include/smb_interfaces.h b/source4/include/smb_interfaces.h
index bdf8282356..c7698bd941 100644
--- a/source4/include/smb_interfaces.h
+++ b/source4/include/smb_interfaces.h
@@ -1128,7 +1128,7 @@ union smb_open {
uint32_t size;
uint16_t rmode;
} out;
- } open;
+ } openold;
/* SMBopenX interface */
struct {
diff --git a/source4/include/system/passwd.h b/source4/include/system/passwd.h
index 215f53d138..901b1b92f2 100644
--- a/source4/include/system/passwd.h
+++ b/source4/include/system/passwd.h
@@ -64,3 +64,7 @@ int initgroups(char *name,gid_t id);
#define crypt ufc_crypt
#endif
+
+#ifndef NGROUPS_MAX
+#define NGROUPS_MAX 32 /* Guess... */
+#endif
diff --git a/source4/lib/fault.c b/source4/lib/fault.c
index ed1e7c4366..ac2d4109fd 100644
--- a/source4/lib/fault.c
+++ b/source4/lib/fault.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/wait.h"
static void (*cont_fn)(void *);
diff --git a/source4/lib/system.c b/source4/lib/system.c
index d50005e8c8..46490bb17e 100644
--- a/source4/lib/system.c
+++ b/source4/lib/system.c
@@ -335,122 +335,6 @@ void sys_srandom(uint_t seed)
#endif
}
-/**************************************************************************
- Returns equivalent to NGROUPS_MAX - using sysconf if needed.
-****************************************************************************/
-
-int groups_max(void)
-{
-#if defined(SYSCONF_SC_NGROUPS_MAX)
- int ret = sysconf(_SC_NGROUPS_MAX);
- return (ret == -1) ? NGROUPS_MAX : ret;
-#else
- return NGROUPS_MAX;
-#endif
-}
-
-/**************************************************************************
- Wrapper for getgroups. Deals with broken (int) case.
-****************************************************************************/
-
-int sys_getgroups(int setlen, gid_t *gidset)
-{
-#if !defined(HAVE_BROKEN_GETGROUPS)
- return getgroups(setlen, gidset);
-#else
-
- GID_T gid;
- GID_T *group_list;
- int i, ngroups;
-
- if(setlen == 0) {
- return getgroups(setlen, &gid);
- }
-
- /*
- * Broken case. We need to allocate a
- * GID_T array of size setlen.
- */
-
- if(setlen < 0) {
- errno = EINVAL;
- return -1;
- }
-
- if (setlen == 0)
- setlen = groups_max();
-
- if((group_list = (GID_T *)malloc(setlen * sizeof(GID_T))) == NULL) {
- DEBUG(0,("sys_getgroups: Malloc fail.\n"));
- return -1;
- }
-
- if((ngroups = getgroups(setlen, group_list)) < 0) {
- int saved_errno = errno;
- SAFE_FREE(group_list);
- errno = saved_errno;
- return -1;
- }
-
- for(i = 0; i < ngroups; i++)
- gidset[i] = (gid_t)group_list[i];
-
- SAFE_FREE(group_list);
- return ngroups;
-#endif /* HAVE_BROKEN_GETGROUPS */
-}
-
-#ifdef HAVE_SETGROUPS
-
-/**************************************************************************
- Wrapper for setgroups. Deals with broken (int) case. Automatically used
- if we have broken getgroups.
-****************************************************************************/
-
-int sys_setgroups(int setlen, gid_t *gidset)
-{
-#if !defined(HAVE_BROKEN_GETGROUPS)
- return setgroups(setlen, gidset);
-#else
-
- GID_T *group_list;
- int i ;
-
- if (setlen == 0)
- return 0 ;
-
- if (setlen < 0 || setlen > groups_max()) {
- errno = EINVAL;
- return -1;
- }
-
- /*
- * Broken case. We need to allocate a
- * GID_T array of size setlen.
- */
-
- if((group_list = (GID_T *)malloc(setlen * sizeof(GID_T))) == NULL) {
- DEBUG(0,("sys_setgroups: Malloc fail.\n"));
- return -1;
- }
-
- for(i = 0; i < setlen; i++)
- group_list[i] = (GID_T) gidset[i];
-
- if(setgroups(setlen, group_list) != 0) {
- int saved_errno = errno;
- SAFE_FREE(group_list);
- errno = saved_errno;
- return -1;
- }
-
- SAFE_FREE(group_list);
- return 0 ;
-#endif /* HAVE_BROKEN_GETGROUPS */
-}
-
-#endif /* HAVE_SETGROUPS */
-
struct passwd *sys_getpwent(void)
{
return getpwent();
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 92b995dd4a..4da7ff3a9e 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -300,15 +300,15 @@ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, union smb_ope
int len;
struct smbcli_request *req = NULL;
- switch (parms->open.level) {
+ switch (parms->generic.level) {
case RAW_OPEN_T2OPEN:
return smb_raw_t2open_send(tree, parms);
case RAW_OPEN_OPEN:
SETUP_REQUEST(SMBopen, 2, 0);
- SSVAL(req->out.vwv, VWV(0), parms->open.in.flags);
- SSVAL(req->out.vwv, VWV(1), parms->open.in.search_attrs);
- smbcli_req_append_ascii4(req, parms->open.in.fname, STR_TERMINATE);
+ SSVAL(req->out.vwv, VWV(0), parms->openold.in.flags);
+ SSVAL(req->out.vwv, VWV(1), parms->openold.in.search_attrs);
+ smbcli_req_append_ascii4(req, parms->openold.in.fname, STR_TERMINATE);
break;
case RAW_OPEN_OPENX:
@@ -397,18 +397,18 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
goto failed;
}
- switch (parms->open.level) {
+ switch (parms->openold.level) {
case RAW_OPEN_T2OPEN:
return smb_raw_t2open_recv(req, mem_ctx, parms);
case RAW_OPEN_OPEN:
SMBCLI_CHECK_WCT(req, 7);
- parms->open.out.fnum = SVAL(req->in.vwv, VWV(0));
- parms->open.out.attrib = SVAL(req->in.vwv, VWV(1));
- parms->open.out.write_time = raw_pull_dos_date3(req->transport,
+ parms->openold.out.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->openold.out.attrib = SVAL(req->in.vwv, VWV(1));
+ parms->openold.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(2));
- parms->open.out.size = IVAL(req->in.vwv, VWV(4));
- parms->open.out.rmode = SVAL(req->in.vwv, VWV(6));
+ parms->openold.out.size = IVAL(req->in.vwv, VWV(4));
+ parms->openold.out.rmode = SVAL(req->in.vwv, VWV(6));
break;
case RAW_OPEN_OPENX:
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index da60615a44..835011437f 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -221,39 +221,39 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
case RAW_OPEN_OPEN:
ZERO_STRUCT(io2->generic.in);
io2->generic.level = RAW_OPEN_GENERIC;
- io2->generic.in.file_attr = io->open.in.search_attrs;
- io2->generic.in.fname = io->open.in.fname;
+ io2->generic.in.file_attr = io->openold.in.search_attrs;
+ io2->generic.in.fname = io->openold.in.fname;
io2->generic.in.open_disposition = NTCREATEX_DISP_OPEN;
DEBUG(9,("ntvfs_map_open(OPEN): mapping flags=0x%x\n",
- io->open.in.flags));
- switch (io->open.in.flags & OPEN_FLAGS_MODE_MASK) {
+ io->openold.in.flags));
+ switch (io->openold.in.flags & OPEN_FLAGS_MODE_MASK) {
case OPEN_FLAGS_OPEN_READ:
io2->generic.in.access_mask = GENERIC_RIGHTS_FILE_READ;
- io->open.out.rmode = DOS_OPEN_RDONLY;
+ io->openold.out.rmode = DOS_OPEN_RDONLY;
break;
case OPEN_FLAGS_OPEN_WRITE:
io2->generic.in.access_mask = GENERIC_RIGHTS_FILE_WRITE;
- io->open.out.rmode = DOS_OPEN_WRONLY;
+ io->openold.out.rmode = DOS_OPEN_WRONLY;
break;
case OPEN_FLAGS_OPEN_RDWR:
case 0xf: /* FCB mode */
io2->generic.in.access_mask = GENERIC_RIGHTS_FILE_READ |
GENERIC_RIGHTS_FILE_WRITE;
- io->open.out.rmode = DOS_OPEN_RDWR; /* assume we got r/w */
+ io->openold.out.rmode = DOS_OPEN_RDWR; /* assume we got r/w */
break;
default:
DEBUG(2,("ntvfs_map_open(OPEN): invalid mode 0x%x\n",
- io->open.in.flags & OPEN_FLAGS_MODE_MASK));
+ io->openold.in.flags & OPEN_FLAGS_MODE_MASK));
return NT_STATUS_INVALID_PARAMETER;
}
- switch(io->open.in.flags & OPEN_FLAGS_DENY_MASK) {
+ switch(io->openold.in.flags & OPEN_FLAGS_DENY_MASK) {
case OPEN_FLAGS_DENY_DOS:
/* DENY_DOS is quite strange - it depends on the filename! */
- if (is_exe_file(io->open.in.fname)) {
+ if (is_exe_file(io->openold.in.fname)) {
io2->generic.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE;
} else {
- if ((io->open.in.flags & OPEN_FLAGS_MODE_MASK) ==
+ if ((io->openold.in.flags & OPEN_FLAGS_MODE_MASK) ==
OPEN_FLAGS_OPEN_READ) {
io2->generic.in.share_access = NTCREATEX_SHARE_ACCESS_READ;
} else {
@@ -279,11 +279,11 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
break;
default:
DEBUG(2,("ntvfs_map_open(OPEN): invalid DENY 0x%x\n",
- io->open.in.flags & OPEN_FLAGS_DENY_MASK));
+ io->openold.in.flags & OPEN_FLAGS_DENY_MASK));
return NT_STATUS_INVALID_PARAMETER;
}
DEBUG(9,("ntvfs_map_open(OPEN): mapped flags=0x%x to access_mask=0x%x and share_access=0x%x\n",
- io->open.in.flags, io2->generic.in.access_mask, io2->generic.in.share_access));
+ io->openold.in.flags, io2->generic.in.access_mask, io2->generic.in.share_access));
status = ntvfs->ops->open(ntvfs, req, io2);
if (!NT_STATUS_IS_OK(status)) {
@@ -291,11 +291,11 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
}
ZERO_STRUCT(io->openx.out);
- io->open.out.fnum = io2->generic.out.fnum;
- io->open.out.attrib = io2->generic.out.attrib;
- io->open.out.write_time = nt_time_to_unix(io2->generic.out.write_time);
- io->open.out.size = io2->generic.out.size;
- io->open.out.rmode = DOS_OPEN_RDWR;
+ io->openold.out.fnum = io2->generic.out.fnum;
+ io->openold.out.attrib = io2->generic.out.attrib;
+ io->openold.out.write_time = nt_time_to_unix(io2->generic.out.write_time);
+ io->openold.out.size = io2->generic.out.size;
+ io->openold.out.rmode = DOS_OPEN_RDWR;
return NT_STATUS_OK;
}
diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c
index 1b697c4ba7..1ffd55bf3f 100644
--- a/source4/smb_server/reply.c
+++ b/source4/smb_server/reply.c
@@ -407,11 +407,11 @@ static void reply_open_send(struct smbsrv_request *req)
/* construct reply */
req_setup_reply(req, 7, 0);
- SSVAL(req->out.vwv, VWV(0), oi->open.out.fnum);
- SSVAL(req->out.vwv, VWV(1), oi->open.out.attrib);
- srv_push_dos_date3(req->smb_conn, req->out.vwv, VWV(2), oi->open.out.write_time);
- SIVAL(req->out.vwv, VWV(4), oi->open.out.size);
- SSVAL(req->out.vwv, VWV(6), oi->open.out.rmode);
+ SSVAL(req->out.vwv, VWV(0), oi->openold.out.fnum);
+ SSVAL(req->out.vwv, VWV(1), oi->openold.out.attrib);
+ srv_push_dos_date3(req->smb_conn, req->out.vwv, VWV(2), oi->openold.out.write_time);
+ SIVAL(req->out.vwv, VWV(4), oi->openold.out.size);
+ SSVAL(req->out.vwv, VWV(6), oi->openold.out.rmode);
req_send_reply(req);
}
@@ -427,13 +427,13 @@ void reply_open(struct smbsrv_request *req)
REQ_CHECK_WCT(req, 2);
REQ_TALLOC(oi, sizeof(*oi));
- oi->open.level = RAW_OPEN_OPEN;
- oi->open.in.flags = SVAL(req->in.vwv, VWV(0));
- oi->open.in.search_attrs = SVAL(req->in.vwv, VWV(1));
+ oi->openold.level = RAW_OPEN_OPEN;
+ oi->openold.in.flags = SVAL(req->in.vwv, VWV(0));
+ oi->openold.in.search_attrs = SVAL(req->in.vwv, VWV(1));
- req_pull_ascii4(req, &oi->open.in.fname, req->in.data, STR_TERMINATE);
+ req_pull_ascii4(req, &oi->openold.in.fname, req->in.data, STR_TERMINATE);
- if (!oi->open.in.fname) {
+ if (!oi->openold.in.fname) {
req_reply_error(req, NT_STATUS_OBJECT_NAME_NOT_FOUND);
return;
}
@@ -1396,7 +1396,7 @@ static void reply_printopen_send(struct smbsrv_request *req)
/* construct reply */
req_setup_reply(req, 1, 0);
- SSVAL(req->out.vwv, VWV(0), oi->open.out.fnum);
+ SSVAL(req->out.vwv, VWV(0), oi->openold.out.fnum);
req_send_reply(req);
}
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 583cec5b45..cce831e6c6 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -1085,27 +1085,27 @@ static BOOL handler_open(int instance)
union smb_open parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].open.level = RAW_OPEN_OPEN;
- parm[0].open.in.flags = gen_bits_mask2(0xF, 0xFFFF);
- parm[0].open.in.search_attrs = gen_attrib();
- parm[0].open.in.fname = gen_fname_open(instance);
+ parm[0].openold.level = RAW_OPEN_OPEN;
+ parm[0].openold.in.flags = gen_bits_mask2(0xF, 0xFFFF);
+ parm[0].openold.in.search_attrs = gen_attrib();
+ parm[0].openold.in.fname = gen_fname_open(instance);
if (!options.use_oplocks) {
/* mask out oplocks */
- parm[0].open.in.flags &= ~(OPENX_FLAGS_REQUEST_OPLOCK|
+ parm[0].openold.in.flags &= ~(OPENX_FLAGS_REQUEST_OPLOCK|
OPENX_FLAGS_REQUEST_BATCH_OPLOCK);
}
GEN_COPY_PARM;
GEN_CALL(smb_raw_open(tree, current_op.mem_ctx, &parm[i]));
- CHECK_EQUAL(open.out.attrib);
- CHECK_TIMES_EQUAL(open.out.write_time);
- CHECK_EQUAL(open.out.size);
- CHECK_EQUAL(open.out.rmode);
+ CHECK_EQUAL(openold.out.attrib);
+ CHECK_TIMES_EQUAL(openold.out.write_time);
+ CHECK_EQUAL(openold.out.size);
+ CHECK_EQUAL(openold.out.rmode);
/* open creates a new file handle */
- ADD_HANDLE(parm[0].open.in.fname, open.out.fnum);
+ ADD_HANDLE(parm[0].openold.in.fname, openold.out.fnum);
return True;
}
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 03621dca45..81681bbd74 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -157,13 +157,13 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Checking RAW_OPEN_OPEN\n");
- io.open.level = RAW_OPEN_OPEN;
- io.open.in.fname = fname;
- io.open.in.flags = OPEN_FLAGS_FCB;
- io.open.in.search_attrs = 0;
+ io.openold.level = RAW_OPEN_OPEN;
+ io.openold.in.fname = fname;
+ io.openold.in.flags = OPEN_FLAGS_FCB;
+ io.openold.in.search_attrs = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
smbcli_unlink(cli->tree, fname);
CREATE_FILE;
@@ -171,80 +171,80 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.open.out.fnum;
+ fnum2 = io.openold.out.fnum;
CHECK_RDWR(fnum2, RDWR_RDWR);
smbcli_close(cli->tree, fnum2);
smbcli_close(cli->tree, fnum);
/* check the read/write modes */
- io.open.level = RAW_OPEN_OPEN;
- io.open.in.fname = fname;
- io.open.in.search_attrs = 0;
+ io.openold.level = RAW_OPEN_OPEN;
+ io.openold.in.fname = fname;
+ io.openold.in.search_attrs = 0;
- io.open.in.flags = OPEN_FLAGS_OPEN_READ;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDONLY);
smbcli_close(cli->tree, fnum);
- io.open.in.flags = OPEN_FLAGS_OPEN_WRITE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_WRONLY);
smbcli_close(cli->tree, fnum);
- io.open.in.flags = OPEN_FLAGS_OPEN_RDWR;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_RDWR;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
smbcli_close(cli->tree, fnum);
/* check the share modes roughly - not a complete matrix */
- io.open.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_WRITE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
- if (io.open.in.flags != io.open.out.rmode) {
+ if (io.openold.in.flags != io.openold.out.rmode) {
printf("(%s) rmode should equal flags - 0x%x 0x%x\n",
- __location__, io.open.out.rmode, io.open.in.flags);
+ __location__, io.openold.out.rmode, io.openold.in.flags);
}
- io.open.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_NONE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
- io.open.in.flags = OPEN_FLAGS_OPEN_READ | OPEN_FLAGS_DENY_NONE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_READ | OPEN_FLAGS_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.open.out.fnum;
+ fnum2 = io.openold.out.fnum;
CHECK_RDWR(fnum2, RDWR_RDONLY);
smbcli_close(cli->tree, fnum);
smbcli_close(cli->tree, fnum2);
/* check the returned write time */
- io.open.level = RAW_OPEN_OPEN;
- io.open.in.fname = fname;
- io.open.in.search_attrs = 0;
- io.open.in.flags = OPEN_FLAGS_OPEN_READ;
+ io.openold.level = RAW_OPEN_OPEN;
+ io.openold.in.fname = fname;
+ io.openold.in.search_attrs = 0;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
/* check other reply fields */
- CHECK_TIME(io.open.out.write_time, write_time);
- CHECK_ALL_INFO(io.open.out.size, size);
- CHECK_ALL_INFO(io.open.out.attrib, attrib & ~FILE_ATTRIBUTE_NONINDEXED);
+ CHECK_TIME(io.openold.out.write_time, write_time);
+ CHECK_ALL_INFO(io.openold.out.size, size);
+ CHECK_ALL_INFO(io.openold.out.attrib, attrib & ~FILE_ATTRIBUTE_NONINDEXED);
done:
smbcli_close(cli->tree, fnum);