[SCM] Samba Shared Repository - branch v4-19-stable updated
Jule Anger
janger at samba.org
Fri Aug 18 11:21:10 UTC 2023
The branch, v4-19-stable has been updated
via 6be33d37524 VERSION: Disable GIT_SNAPSHOT for the 4.19.0rc3 release.
via 8db3885de19 WHATSNEW: Add release notes for Samba 4.19.0rc3.
via fd2fdecdec0 s4-rpc_server/drsupai: Avoid looping with Azure AD Connect by not incrementing temp_highest_usn for the NC root
via 7310afa34df s4-rpc_server/drsuapi: Ensure logs show DN for replicated objects, not (null)
via e5dc7e82a5a s4-rpc_server/drsuapi: Update getnc_state to be != NULL
via de10a323c6f s4-rpc_server/drsuapi: Rename ncRoot -> untrusted_ncRoot to avoid misuse
via a33689ad82c s4-rpc_server/drsuapi: Avoid modification to ncRoot input variable in GetNCChanges
via a596e4cdb9f s4-rpc_server/drsuapi: Fix indentation in GetNCChanges()
via 91c7c77af14 s4-rpc_server/drsuapi: Only keep and invalidate replication cycle state for normal replication
via bd4ce525648 s4-torture/drs: Add test showing that if present in the set the NC root leads and tmp_highest_usn moves
via 5243f55ee1c s4-torture/drs: Add test demonstrating that a GetNCChanges REPL_OBJ will not reset the replication cookie
via 75197f528ff s4-torture/drs: Add a test matching Azure AD Connect REPL_OBJ behaviour
via c2b69e42780 s4-torture/drs: Use addCleanup() in getchanges.py for OU handling
via eeda4c3b5cd s4-torture/drs: Create temp OU with a unique name per test
via d1cdcf27571 s4-torture/drs: Save the server dnsname on the DcConnection object
via f8defe00366 s4-rpc_server/drsuapi: Remove rudundant check for valid and non-NULL ncRoot_dn
via f23c0d54a9b s4-dsdb: Improve logging for drs_ObjectIdentifier_to_dn_and_nc_root()
via 2ecb53d5079 s4-rpc_server/drsuapi: Improve debug message for drs_ObjectIdentifier_to_dn_and_nc_root() failure
via 85abc2852c4 s4-rpc_server/drsuapi: Improve debugging of invalid DNs
via 0bd2f592217 s4-rpc_server/drsuapi: Add tmp_highest_usn tracking to replication log
via 6a4622c4e8d s3: smbd: Ensure init_smb1_request() zeros out what the incoming pointer points to.
via 34291111df2 s3: torture: Add SMB1-NEGOTIATE-TCON that shows the SMB1 server crashes on the uninitialized req->session.
via c7b1876ac53 s3: smbd: init_smb1_request() isn't being passed zero'ed memory from any codepath.
via 68c74742ed9 tests/krb5: Remove incorrect comments
via 313c9a75980 claims.idl: Use ‘int64’ instead of ‘dlong’ for INT64 claims
via d5e0f9af62f librpc:ndr: Add ‘int64’ type
via 0bd2b8b1148 tests/krb5: Add a test decoding INT64 PAC claims issued by Windows
via dbf3e95eb56 tests/krb5: Shorten long lines
via 3ed80b3f138 tests/krb5: Remove unused import
via 19dc2bf8e97 s3: smbd: Add missing 'return;'s in exit paths in reply_exit_done().
via 2c617961168 s3: torture: Add a test doing an SMB1 negotiate+exit.
via 18bd1f75d4f s3: smbd: Ensure all callers to srvstr_pull_req_talloc() pass a zeroed-out dest pointer.
via a36f30498db s3: smbd: Uncorrupt the pointer we were using to prove a crash.
via 116c740cb9c s3: smbd: Ensure srvstr_pull_req_talloc() always NULLs out *dest.
via 60cbe064ba1 s3: torture: Add SMB1-TRUNCATED-SESSSETUP test.
via 7b84b08693b s3: smbd: Deliberately currupt an uninitialized pointer.
via 81980676535 mdssvc: Do an early talloc_free() in _mdssvc_open()
via b604e7b0b95 ctdb-doc: Fix documentation for ctdb event status
via 5b68f98cb7f ctdb-tools: Fix CID 1539212 - signed/unsigned issue
via 7d786ccb6f7 s3:smbd: fix multichannel connection passing race
via 6caab1022b6 s3:smbd: always clear filter_subreq in smb2srv_client_mc_negprot_next()
via c52d4274277 s4:torture/smb2: add smb2.multichannel.bugs.bug_15346
via fba14400696 s4:torture/smb2: make it possible to pass existing_conn to smb2_connect_ext()
via a2bc1a93608 s4:torture/smb2: let us have a common torture_smb2_con_share()
via cf84e662db5 s4:torture/smb2: let torture_smb2_con_sopt() use smb2_connect()
via f3acbab97f0 dcerpc.idl: fix definitions for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED payload
via b9e48047ad1 librpc/rpc: let dcerpc_read_ncacn_packet_next_vector() handle fragments without any payload
via a436b0d1630 s4:torture/ndr: add tests for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED
via 4f52e4468d1 VERSION: Bump version up to Samba 4.19.0rc3...
from e7330e360e1 VERSION: Disable GIT_SNAPSHOT for the 4.19.0rc2 release.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-19-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 33 +-
ctdb/doc/ctdb.1.xml | 58 +--
ctdb/event/event_tool.c | 9 +-
.../etc-ctdb/events/random/02.enabled.script | 8 +
ctdb/tests/UNIT/eventd/eventd_008.sh | 10 +
librpc/ABI/{ndr-3.0.0.sigs => ndr-3.0.1.sigs} | 3 +
librpc/idl/claims.idl | 2 +-
librpc/idl/dcerpc.idl | 2 -
librpc/ndr/libndr.h | 1 +
librpc/ndr/ndr_basic.c | 43 +++
librpc/rpc/dcerpc_util.c | 9 +-
librpc/wscript_build | 2 +-
pidl/lib/Parse/Pidl/NDR.pm | 1 +
pidl/lib/Parse/Pidl/Typelist.pm | 1 +
pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 1 +
pidl/tests/ndr.pl | 3 +-
pidl/tests/typelist.pl | 3 +-
python/samba/tests/krb5/claims_in_pac.py | 169 ++++++++-
python/samba/tests/krb5/claims_tests.py | 4 -
selftest/knownfail.d/getncchanges | 2 +
source3/rpc_server/mdssvc/srv_mdssvc_nt.c | 1 +
source3/selftest/tests.py | 33 ++
source3/smbd/smb1_ipc.c | 2 +-
source3/smbd/smb1_message.c | 2 +-
source3/smbd/smb1_reply.c | 2 +
source3/smbd/smb1_sesssetup.c | 4 +-
source3/smbd/smb2_process.c | 7 +-
source3/smbd/smb2_reply.c | 1 +
source3/smbd/smbXsrv_client.c | 33 +-
source3/torture/torture.c | 402 +++++++++++++++++++++
source4/dsdb/common/dsdb_dn.c | 12 +
source4/libcli/smb2/connect.c | 4 +-
source4/rpc_server/drsuapi/dcesrv_drsuapi.h | 2 +-
source4/rpc_server/drsuapi/getncchanges.c | 293 +++++++++++----
source4/torture/drs/python/getnc_exop.py | 25 +-
source4/torture/drs/python/getncchanges.py | 218 ++++++++++-
source4/torture/ndr/dcerpc.c | 148 ++++++++
source4/torture/ndr/ndr.c | 1 +
source4/torture/smb2/acls.c | 34 --
source4/torture/smb2/multichannel.c | 315 ++++++++++++++++
source4/torture/smb2/util.c | 55 +--
source4/torture/vfs/acl_xattr.c | 34 --
source4/torture/wscript_build | 1 +
44 files changed, 1752 insertions(+), 243 deletions(-)
copy librpc/ABI/{ndr-3.0.0.sigs => ndr-3.0.1.sigs} (99%)
create mode 100644 source4/torture/ndr/dcerpc.c
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index 3aded533ec5..9744016e64d 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
# e.g. SAMBA_VERSION_RC_RELEASE=1 #
# -> "3.0.0rc1" #
########################################################
-SAMBA_VERSION_RC_RELEASE=2
+SAMBA_VERSION_RC_RELEASE=3
########################################################
# To mark SVN snapshots this should be set to 'yes' #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 59a6dcc41a9..d4315046af4 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
Release Announcements
=====================
-This is the second release candidate of Samba 4.19. This is *not*
+This is the third release candidate of Samba 4.19. This is *not*
intended for production environments and is designed for testing
purposes only. Please report any defects via the Samba bug reporting
system at https://bugzilla.samba.org/.
@@ -235,6 +235,37 @@ smb.conf changes
directory name cache size Removed
+CHANGES SINCE 4.19.0rc2
+=======================
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 15420: reply_sesssetup_and_X() can dereference uninitialized tmp
+ pointer.
+ * BUG 15430: missing return in reply_exit_done().
+ * BUG 15432: TREE_CONNECT without SETUP causes smbd to use uninitialized
+ pointer.
+
+o Andrew Bartlett <abartlet at samba.org>
+ * BUG 15401: Avoid infinite loop in initial user sync with Azure AD Connect
+ when synchronising a large Samba AD domain.
+ * BUG 15407: Samba replication logs show (null) DN.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 15346: 2-3min delays at reconnect with smb2_validate_sequence_number:
+ bad message_id 2.
+ * BUG 15446: DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED can't be parsed.
+
+o Martin Schwenke <mschwenke at ddn.com>
+ * BUG 15438: CID 1539212 causes real issue when output contains only
+ newlines.
+
+o Joseph Sutton <josephsutton at catalyst.net.nz>
+ * BUG 15452: KDC encodes INT64 claims incorrectly.
+
+o Jones Syue <jonessyue at qnap.com>
+ * BUG 15449: mdssvc: Do an early talloc_free() in _mdssvc_open().
+
+
CHANGES SINCE 4.19.0rc1
=======================
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 65c254762eb..2973fbf2832 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -646,10 +646,10 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
<para>
The output is the list of event scripts executed.
Each line shows the name, status, duration and start time
- for each script.
+ for each script. Output from each script is shown.
</para>
<para>
- Example
+ Example #1
</para>
<screen>
# ctdb event status legacy monitor
@@ -671,6 +671,28 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
70.iscsi OK 0.009 Sat Dec 17 19:39:12 2016
91.lvs OK 0.007 Sat Dec 17 19:39:12 2016
</screen>
+
+ <para>
+ Example #2
+ </para>
+ <screen>
+# ctdb event status legacy monitor
+00.ctdb OK 0.011 Sat Dec 17 19:40:46 2016
+01.reclock OK 0.010 Sat Dec 17 19:40:46 2016
+05.system OK 0.030 Sat Dec 17 19:40:46 2016
+06.nfs OK 0.014 Sat Dec 17 19:40:46 2016
+10.interface OK 0.041 Sat Dec 17 19:40:46 2016
+11.natgw OK 0.008 Sat Dec 17 19:40:46 2016
+11.routing OK 0.007 Sat Dec 17 19:40:46 2016
+13.per_ip_routing OK 0.007 Sat Dec 17 19:40:46 2016
+20.multipathd OK 0.007 Sat Dec 17 19:40:46 2016
+31.clamd OK 0.007 Sat Dec 17 19:40:46 2016
+40.vsftpd OK 0.013 Sat Dec 17 19:40:46 2016
+41.httpd OK 0.015 Sat Dec 17 19:40:46 2016
+49.winbind OK 0.022 Sat Dec 17 19:40:46 2016
+50.samba ERROR 0.077 Sat Dec 17 19:40:46 2016
+ OUTPUT: ERROR: samba tcp port 445 is not responding
+ </screen>
</listitem>
</varlistentry>
@@ -741,37 +763,15 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
<refsect2>
<title>scriptstatus</title>
<para>
- This command displays which event scripts where run in the previous
- monitoring cycle and the result of each script. If a script
- failed with an error, causing the node to become unhealthy,
- the output from that script is also shown.
+ This is an alias for <command>ctdb event status legacy
+ <optional>EVENT</optional></command>, where EVENT defaults to
+ <command>monitor</command>.
</para>
<para>
This command is deprecated. It's provided for backward
- compatibility. In place of <command>ctdb scriptstatus</command>,
- use <command>ctdb event status</command>.
+ compatibility. Use <command>ctdb event status</command>
+ instead.
</para>
- <refsect3>
- <title>Example</title>
- <screen>
-# ctdb scriptstatus
-00.ctdb OK 0.011 Sat Dec 17 19:40:46 2016
-01.reclock OK 0.010 Sat Dec 17 19:40:46 2016
-05.system OK 0.030 Sat Dec 17 19:40:46 2016
-06.nfs OK 0.014 Sat Dec 17 19:40:46 2016
-10.interface OK 0.041 Sat Dec 17 19:40:46 2016
-11.natgw OK 0.008 Sat Dec 17 19:40:46 2016
-11.routing OK 0.007 Sat Dec 17 19:40:46 2016
-13.per_ip_routing OK 0.007 Sat Dec 17 19:40:46 2016
-20.multipathd OK 0.007 Sat Dec 17 19:40:46 2016
-31.clamd OK 0.007 Sat Dec 17 19:40:46 2016
-40.vsftpd OK 0.013 Sat Dec 17 19:40:46 2016
-41.httpd OK 0.015 Sat Dec 17 19:40:46 2016
-49.winbind OK 0.022 Sat Dec 17 19:40:46 2016
-50.samba ERROR 0.077 Sat Dec 17 19:40:46 2016
- OUTPUT: ERROR: samba tcp port 445 is not responding
- </screen>
- </refsect3>
</refsect2>
<refsect2>
diff --git a/ctdb/event/event_tool.c b/ctdb/event/event_tool.c
index e6d5261c217..d6b7156c69b 100644
--- a/ctdb/event/event_tool.c
+++ b/ctdb/event/event_tool.c
@@ -203,7 +203,6 @@ static void print_status_one(struct ctdb_event_script *script)
const char *t = script->output == NULL ? "" : script->output;
size_t len = strlen(t);
char output[len+1];
- size_t p;
char *t1, *t2;
strlcpy(output, t, sizeof(output));
@@ -212,10 +211,10 @@ static void print_status_one(struct ctdb_event_script *script)
* Strip trailing newlines, they are clutter and
* interfere with multi-line detection
*/
- p = len - 1;
- while (p >= 0 && output[p] == '\n') {
- output[p] = '\0';
- p--;
+ t1 = output + len - 1;
+ while (t1 >= output && *t1 == '\n') {
+ *t1 = '\0';
+ t1--;
}
/* If the output is a single line then print it inline */
diff --git a/ctdb/tests/UNIT/eventd/etc-ctdb/events/random/02.enabled.script b/ctdb/tests/UNIT/eventd/etc-ctdb/events/random/02.enabled.script
index 90df5218a9d..ace80fd8e56 100755
--- a/ctdb/tests/UNIT/eventd/etc-ctdb/events/random/02.enabled.script
+++ b/ctdb/tests/UNIT/eventd/etc-ctdb/events/random/02.enabled.script
@@ -24,6 +24,14 @@ EOF
printf 'No trailing newline'
exit 0
;;
+"verbosenewlinesonly")
+ cat <<EOF
+
+
+
+EOF
+ exit 0
+ ;;
"verbosefailure") echo "args: $*"; exit 1 ;;
"verbosemultilinefailure")
cat <<EOF
diff --git a/ctdb/tests/UNIT/eventd/eventd_008.sh b/ctdb/tests/UNIT/eventd/eventd_008.sh
index c52caa0e25e..bd0fc50009c 100755
--- a/ctdb/tests/UNIT/eventd/eventd_008.sh
+++ b/ctdb/tests/UNIT/eventd/eventd_008.sh
@@ -56,6 +56,16 @@ ok <<EOF
EOF
simple_test status random verbosemultilinenonl
+ok_null
+simple_test run 10 random verbosenewlinesonly
+
+ok <<EOF
+01.disabled DISABLED
+02.enabled OK DURATION DATETIME
+ OUTPUT:
+EOF
+simple_test status random verbosenewlinesonly
+
required_result 8 <<EOF
Event verbosemultilinefailure in random failed
EOF
diff --git a/librpc/ABI/ndr-3.0.0.sigs b/librpc/ABI/ndr-3.0.1.sigs
similarity index 99%
copy from librpc/ABI/ndr-3.0.0.sigs
copy to librpc/ABI/ndr-3.0.1.sigs
index d3f3eca26ae..54aab1d56d4 100644
--- a/librpc/ABI/ndr-3.0.0.sigs
+++ b/librpc/ABI/ndr-3.0.1.sigs
@@ -56,6 +56,7 @@ ndr_print_hyper: void (struct ndr_print *, const char *, uint64_t)
ndr_print_int16: void (struct ndr_print *, const char *, int16_t)
ndr_print_int32: void (struct ndr_print *, const char *, int32_t)
ndr_print_int3264: void (struct ndr_print *, const char *, int32_t)
+ndr_print_int64: void (struct ndr_print *, const char *, int64_t)
ndr_print_int8: void (struct ndr_print *, const char *, int8_t)
ndr_print_ipv4address: void (struct ndr_print *, const char *, const char *)
ndr_print_ipv6address: void (struct ndr_print *, const char *, const char *)
@@ -123,6 +124,7 @@ ndr_pull_hyper: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
ndr_pull_init_blob: struct ndr_pull *(const DATA_BLOB *, TALLOC_CTX *)
ndr_pull_int16: enum ndr_err_code (struct ndr_pull *, int, int16_t *)
ndr_pull_int32: enum ndr_err_code (struct ndr_pull *, int, int32_t *)
+ndr_pull_int64: enum ndr_err_code (struct ndr_pull *, int, int64_t *)
ndr_pull_int8: enum ndr_err_code (struct ndr_pull *, int, int8_t *)
ndr_pull_ipv4address: enum ndr_err_code (struct ndr_pull *, int, const char **)
ndr_pull_ipv6address: enum ndr_err_code (struct ndr_pull *, int, const char **)
@@ -196,6 +198,7 @@ ndr_push_hyper: enum ndr_err_code (struct ndr_push *, int, uint64_t)
ndr_push_init_ctx: struct ndr_push *(TALLOC_CTX *)
ndr_push_int16: enum ndr_err_code (struct ndr_push *, int, int16_t)
ndr_push_int32: enum ndr_err_code (struct ndr_push *, int, int32_t)
+ndr_push_int64: enum ndr_err_code (struct ndr_push *, int, int64_t)
ndr_push_int8: enum ndr_err_code (struct ndr_push *, int, int8_t)
ndr_push_ipv4address: enum ndr_err_code (struct ndr_push *, int, const char *)
ndr_push_ipv6address: enum ndr_err_code (struct ndr_push *, int, const char *)
diff --git a/librpc/idl/claims.idl b/librpc/idl/claims.idl
index 90ea15585c1..196db5785a0 100644
--- a/librpc/idl/claims.idl
+++ b/librpc/idl/claims.idl
@@ -50,7 +50,7 @@ interface claims
typedef struct {
[range(1, 10*1024*1024)] uint32 value_count;
- [size_is(value_count)] dlong *values;
+ [size_is(value_count)] int64 *values;
} CLAIM_INT64;
typedef struct {
diff --git a/librpc/idl/dcerpc.idl b/librpc/idl/dcerpc.idl
index bbb17f0b8c4..1850526042c 100644
--- a/librpc/idl/dcerpc.idl
+++ b/librpc/idl/dcerpc.idl
@@ -276,12 +276,10 @@ interface dcerpc
} dcerpc_auth3;
typedef [public] struct {
- [value(0)] uint32 _pad;
[flag(NDR_REMAINING)] DATA_BLOB auth_info;
} dcerpc_orphaned;
typedef [public] struct {
- [value(0)] uint32 _pad;
[flag(NDR_REMAINING)] DATA_BLOB auth_info;
} dcerpc_co_cancel;
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 556d17f68c7..32a34a08a2b 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -750,6 +750,7 @@ NDR_SCALAR_PROTO(udlong, uint64_t)
NDR_SCALAR_PROTO(udlongr, uint64_t)
NDR_SCALAR_PROTO(dlong, int64_t)
NDR_SCALAR_PROTO(hyper, uint64_t)
+NDR_SCALAR_PROTO(int64, int64_t)
NDR_SCALAR_PROTO(pointer, void *)
NDR_SCALAR_PROTO(time_t, time_t)
NDR_SCALAR_PROTO(uid_t, uid_t)
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index 39aa3690cbe..ecd66a8fa39 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -36,6 +36,9 @@
#define NDR_PULL_I32(ndr, ofs) \
(int32_t)(NDR_BE(ndr) ? PULL_BE_U32(ndr->data,ofs) : PULL_LE_U32(ndr->data,ofs))
+#define NDR_PULL_I64(ndr, ofs) \
+ (NDR_BE(ndr) ? PULL_BE_I64((ndr)->data, (ofs)) : PULL_LE_I64((ndr)->data, (ofs)))
+
#define NDR_PUSH_U16(ndr, ofs, v) \
do { \
if (NDR_BE(ndr)) { \
@@ -63,6 +66,15 @@
} \
} while (0)
+#define NDR_PUSH_I64(ndr, ofs, v) \
+ do { \
+ if (NDR_BE(ndr)) { \
+ PUSH_BE_I64((ndr)->data, (ofs), (v)); \
+ } else { \
+ PUSH_LE_I64((ndr)->data, (ofs), (v)); \
+ } \
+ } while (0)
+
static void ndr_dump_data(struct ndr_print *ndr, const uint8_t *buf, int len);
/*
@@ -306,6 +318,19 @@ _PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, u
return ndr_pull_udlong(ndr, ndr_flags, v);
}
+/*
+ parse an int64
+*/
+_PUBLIC_ enum ndr_err_code ndr_pull_int64(struct ndr_pull *ndr, int ndr_flags, int64_t *v)
+{
+ NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
+ NDR_PULL_ALIGN(ndr, 8);
+ NDR_PULL_NEED_BYTES(ndr, 8);
+ *v = NDR_PULL_I64(ndr, ndr->offset);
+ ndr->offset += 8;
+ return NDR_ERR_SUCCESS;
+}
+
/*
parse a pointer
*/
@@ -643,6 +668,19 @@ _PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, u
return ndr_push_udlong(ndr, NDR_SCALARS, v);
}
+/*
+ push an int64
+*/
+_PUBLIC_ enum ndr_err_code ndr_push_int64(struct ndr_push *ndr, int ndr_flags, int64_t v)
+{
+ NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
+ NDR_PUSH_ALIGN(ndr, 8);
+ NDR_PUSH_NEED_BYTES(ndr, 8);
+ NDR_PUSH_I64(ndr, ndr->offset, v);
+ ndr->offset += 8;
+ return NDR_ERR_SUCCESS;
+}
+
/*
push a double
*/
@@ -1210,6 +1248,11 @@ _PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t
ndr_print_dlong(ndr, name, v);
}
+_PUBLIC_ void ndr_print_int64(struct ndr_print *ndr, const char *name, int64_t v)
+{
+ ndr_print_dlong(ndr, name, v);
+}
+
_PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v)
{
ndr->print(ndr, "%-25s: %p", name, v);
diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c
index 0ecb2bff1fa..a3a734b0c09 100644
--- a/librpc/rpc/dcerpc_util.c
+++ b/librpc/rpc/dcerpc_util.c
@@ -565,9 +565,14 @@ static int dcerpc_read_ncacn_packet_next_vector(struct tstream_context *stream,
ofs = state->buffer.length;
- if (frag_len < ofs) {
+ if (frag_len <= ofs) {
/*
- * something is wrong, let the caller deal with it
+ * With frag_len == ofs, we are done, this is likely
+ * a DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED
+ * without any payload.
+ *
+ * Otherwise it's a broken packet and we
+ * let the caller deal with it.
*/
*_vector = NULL;
*_count = 0;
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 713df25229e..3cbb5ff78e6 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -628,7 +628,7 @@ bld.SAMBA_LIBRARY('ndr',
public_deps='samba-errors talloc samba-util util_str_hex',
public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h',
header_path= [('*gen_ndr*', 'gen_ndr')],
- vnum='3.0.0',
+ vnum='3.0.1',
abi_directory='ABI',
abi_match='!ndr_table_* ndr_* GUID_* _ndr_pull_error* _ndr_push_error*',
)
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index d17d0b404ed..7a91dc0d84e 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -58,6 +58,7 @@ my $scalar_alignment = {
'int3264' => 5,
'uint3264' => 5,
'hyper' => 8,
+ 'int64' => 8,
'double' => 8,
'pointer' => 8,
'dlong' => 4,
diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm
index 2b850ffee4b..c0e07b97986 100644
--- a/pidl/lib/Parse/Pidl/Typelist.pm
+++ b/pidl/lib/Parse/Pidl/Typelist.pm
@@ -46,6 +46,7 @@ my %scalars = (
"int3264" => "int32_t",
"uint3264" => "uint32_t",
"hyper" => "uint64_t",
+ "int64" => "int64_t",
"dlong" => "int64_t",
"udlong" => "uint64_t",
"udlongr" => "uint64_t",
diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 59cbba8251a..83fe6cf2c27 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -1080,6 +1080,7 @@ sub Initialize($$)
$self->register_type("uint3264", "offset = dissect_ndr_uint3264(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_UINT32", "BASE_DEC", 0, "NULL", 8);
$self->register_type("hyper", "offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_UINT64", "BASE_DEC", 0, "NULL", 8);
+ $self->register_type("int64", "offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_INT64", "BASE_DEC", 0, "NULL", 8);
$self->register_type("udlong", "offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_UINT64", "BASE_DEC", 0, "NULL", 4);
$self->register_type("bool8", "offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, \@HF\@, \@PARAM\@);","FT_INT8", "BASE_DEC", 0, "NULL", 1);
$self->register_type("char", "offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, \@HF\@, \@PARAM\@);","FT_INT8", "BASE_DEC", 0, "NULL", 1);
diff --git a/pidl/tests/ndr.pl b/pidl/tests/ndr.pl
index b6fd4899b01..8f84545290c 100755
--- a/pidl/tests/ndr.pl
+++ b/pidl/tests/ndr.pl
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 47;
+use Test::More tests => 48;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -480,6 +480,7 @@ $ne = ParseElement($e, undef, 0);
is($ne->{REPRESENTATION_TYPE}, "uint8");
is(align_type("hyper"), 8);
+is(align_type("int64"), 8);
is(align_type("double"), 8);
is(align_type("uint32"), 4);
is(align_type("uint16"), 2);
diff --git a/pidl/tests/typelist.pl b/pidl/tests/typelist.pl
index 681c0eacfda..5fc3ca25e06 100755
--- a/pidl/tests/typelist.pl
+++ b/pidl/tests/typelist.pl
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 56;
+use Test::More tests => 57;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -21,6 +21,7 @@ is("int32", expandAlias("int32"));
is("uint32_t", mapScalarType("uint32"));
is("void", mapScalarType("void"));
is("uint64_t", mapScalarType("hyper"));
+is("int64_t", mapScalarType("int64"));
is("double", mapScalarType("double"));
my $x = { TYPE => "ENUM", NAME => "foo", EXTRADATA => 1 };
diff --git a/python/samba/tests/krb5/claims_in_pac.py b/python/samba/tests/krb5/claims_in_pac.py
index 82cd7b7e694..a5db7bac84e 100755
--- a/python/samba/tests/krb5/claims_in_pac.py
+++ b/python/samba/tests/krb5/claims_in_pac.py
@@ -24,13 +24,136 @@ sys.path.insert(0, 'bin/python')
os.environ['PYTHONUNBUFFERED'] = '1'
from samba.dcerpc import krb5pac, claims
-from samba.ndr import ndr_pack, ndr_unpack, ndr_print
+from samba.ndr import ndr_pack, ndr_unpack
from samba.tests import TestCase
class PacClaimsTests(TestCase):
--
Samba Shared Repository
More information about the samba-cvs
mailing list