summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-25 13:57:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:14 -0500
commit579c13da43d5b40ac6d6c1436399fbc1d8dfd054 (patch)
tree42299570746f2d7f80356b689cb15e3db6c53d3c /source4/libcli/raw
parent81e8de9ca85fe9a6658beb1dab0d231c13cda063 (diff)
downloadsamba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.gz
samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.bz2
samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.zip
r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clispnego.c12
-rw-r--r--source4/libcli/raw/rawnegotiate.c2
-rw-r--r--source4/libcli/raw/rawrequest.c10
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c14
4 files changed, 17 insertions, 21 deletions
diff --git a/source4/libcli/raw/clispnego.c b/source4/libcli/raw/clispnego.c
index e6cadc466c..7ad6be1006 100644
--- a/source4/libcli/raw/clispnego.c
+++ b/source4/libcli/raw/clispnego.c
@@ -141,9 +141,9 @@ BOOL spnego_parse_negTokenInit(DATA_BLOB blob,
asn1_start_tag(&data,ASN1_CONTEXT(0));
asn1_start_tag(&data,ASN1_SEQUENCE(0));
for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) {
- char *oid = NULL;
- asn1_read_OID(&data,&oid);
- OIDs[i] = oid;
+ char *aoid = NULL;
+ asn1_read_OID(&data,&aoid);
+ OIDs[i] = aoid;
}
OIDs[i] = NULL;
asn1_end_tag(&data);
@@ -230,9 +230,9 @@ BOOL parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *se
asn1_start_tag(&data, ASN1_CONTEXT(0));
asn1_start_tag(&data, ASN1_SEQUENCE(0));
for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) {
- char *oid = NULL;
- asn1_read_OID(&data,&oid);
- OIDs[i] = oid;
+ char *aoid = NULL;
+ asn1_read_OID(&data,&aoid);
+ OIDs[i] = aoid;
}
OIDs[i] = NULL;
asn1_end_tag(&data);
diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c
index 587050bef8..5b94ef63d8 100644
--- a/source4/libcli/raw/rawnegotiate.c
+++ b/source4/libcli/raw/rawnegotiate.c
@@ -106,7 +106,7 @@ NTSTATUS smb_raw_negotiate(struct cli_transport *transport)
/* this time arrives in real GMT */
ntt = cli_pull_nttime(req->in.vwv, VWV(11)+1);
- transport->negotiate.server_time = nt_time_to_unix(&ntt);
+ transport->negotiate.server_time = nt_time_to_unix(ntt);
transport->negotiate.capabilities = IVAL(req->in.vwv,VWV(9)+1);
transport->negotiate.secblob = cli_req_pull_blob(req, transport->mem_ctx, req->in.data, req->in.data_size);
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 35a2d363df..085b445fba 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -831,11 +831,9 @@ BOOL cli_raw_pull_data(struct cli_request *req, const char *src, int len, char *
/*
put a NTTIME into a packet
*/
-
-void cli_push_nttime(void *base, uint16 offset, NTTIME *t)
+void cli_push_nttime(void *base, uint16 offset, NTTIME t)
{
- SIVAL(base, offset, t->low);
- SIVAL(base, offset+4, t->high);
+ SBVAL(base, offset, t);
}
/*
@@ -843,9 +841,7 @@ void cli_push_nttime(void *base, uint16 offset, NTTIME *t)
*/
NTTIME cli_pull_nttime(void *base, uint16 offset)
{
- NTTIME ret;
- ret.low = IVAL(base, offset);
- ret.high = IVAL(base, offset+4);
+ NTTIME ret = BVAL(base, offset);
return ret;
}
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index 9da94f161c..d8fc78972d 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -61,10 +61,10 @@ static BOOL smb_raw_setinfo_backend(struct cli_tree *tree,
case RAW_SFILEINFO_BASIC_INFO:
case RAW_SFILEINFO_BASIC_INFORMATION:
NEED_BLOB(40);
- cli_push_nttime(blob->data, 0, &parms->basic_info.in.create_time);
- cli_push_nttime(blob->data, 8, &parms->basic_info.in.access_time);
- cli_push_nttime(blob->data, 16, &parms->basic_info.in.write_time);
- cli_push_nttime(blob->data, 24, &parms->basic_info.in.change_time);
+ cli_push_nttime(blob->data, 0, parms->basic_info.in.create_time);
+ cli_push_nttime(blob->data, 8, parms->basic_info.in.access_time);
+ cli_push_nttime(blob->data, 16, parms->basic_info.in.write_time);
+ cli_push_nttime(blob->data, 24, parms->basic_info.in.change_time);
SIVAL(blob->data, 32, parms->basic_info.in.attrib);
SIVAL(blob->data, 36, 0); /* padding */
return True;
@@ -73,9 +73,9 @@ static BOOL smb_raw_setinfo_backend(struct cli_tree *tree,
NEED_BLOB(92);
SBVAL(blob->data, 0, parms->unix_basic.in.end_of_file);
SBVAL(blob->data, 8, parms->unix_basic.in.num_bytes);
- cli_push_nttime(blob->data, 16, &parms->unix_basic.in.status_change_time);
- cli_push_nttime(blob->data, 24, &parms->unix_basic.in.access_time);
- cli_push_nttime(blob->data, 32, &parms->unix_basic.in.change_time);
+ cli_push_nttime(blob->data, 16, parms->unix_basic.in.status_change_time);
+ cli_push_nttime(blob->data, 24, parms->unix_basic.in.access_time);
+ cli_push_nttime(blob->data, 32, parms->unix_basic.in.change_time);
SBVAL(blob->data, 40, parms->unix_basic.in.uid);
SBVAL(blob->data, 48, parms->unix_basic.in.gid);
SIVAL(blob->data, 56, parms->unix_basic.in.file_type);