1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

59143 Commits

Author SHA1 Message Date
Stefan Metzmacher
431d75fc9c s4:NBT-WINS: test large scopes
metze
2010-02-01 15:32:38 +01:00
Stefan Metzmacher
70779a46a7 s4:NBT-WINS: pass the expected rcode of the name registration to the test code
metze
2010-02-01 15:32:36 +01:00
Stefan Metzmacher
c1d8dc01fc s4:NBT-WINSREPLICATION: test replication with names including scopes
metze
2010-02-01 15:23:35 +01:00
Stefan Metzmacher
331505f09d s4:NBT-WINSREPLICATION: fix compiler warnings
metze
2010-02-01 15:23:34 +01:00
Stefan Metzmacher
07b06e51bb s4:NBT-WINSREPLICATION: use an array of nbt_names to loop over different names
metze
2010-02-01 15:23:33 +01:00
Stefan Metzmacher
ea7ec4fb30 s4:winsserver: reject name registrations with a scope length > 237
This matches Windows 2008 behavior. Name releases are just ignored.

metze
2010-02-01 15:23:33 +01:00
Stefan Metzmacher
7a02a2ba80 s4:wrepl_server: truncate the scope of a netbios name to 237 bytes as Windows 2008 does
metze
2010-02-01 15:23:32 +01:00
Stefan Metzmacher
e37dc56e97 libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are allowed
metze
2010-02-01 15:23:32 +01:00
Kamen Mazdrashki
93142e4a3a s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:31 +01:00
Kamen Mazdrashki
83068b42ae s4/ldif: Better control on ldif_write_NDR() errors processing
Current implementation mask NDR_ errors implicitly.
Thus the caller has no opportunity handle such an error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:31 +01:00
Kamen Mazdrashki
a342e3a419 s4/idl: drsblobs IDL regeneration
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:30 +01:00
Kamen Mazdrashki
20db3211ae s4/drsblobs: Custom ndr_print_ implementation for drsuapi_MSPrefixMap_Entry
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:30 +01:00
Kamen Mazdrashki
cd3d165778 s4/idl: PrefixMap description for W2K3 and W2K8 Schema:prefixMap attribute
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:29 +01:00
Volker Lendecke
531059696e tdb: fix an early release of the global lock that can cause data corruption
There was a bug in tdb where the

                tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);

(ending the transaction-"mutex") was done before the

                        /* remove the recovery marker */

This means that when a transaction is committed there is a window where another
opener of the file sees the transaction marker while the transaction committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() gave
no error to the caller.

This patch moves the F_UNLCK to after the recovery marker was removed, closing
this window.
2010-02-01 15:06:29 +01:00
Günther Deschner
42f5125521 s4-smbtorture: check for RouterReplyPrinterEx packets inside backchannel in RPC-SPOOLSS-NOTIFY.
Guenther
2010-01-31 21:00:00 +01:00
Günther Deschner
0c6aae4d53 s4-smbtorture: also test RouterRefreshPrinterChangeNotify call in RPC-SPOOLSS-NOTIFY.
Guenther
2010-01-31 20:59:56 +01:00
Günther Deschner
377abba0e9 s4-smbtorture: rework spoolss_NotifyOption handling in RPC-SPOOLSS-NOTIFY.
Guenther
2010-01-31 20:49:53 +01:00
Günther Deschner
55ae3d1729 testprogs: also print printer info during GetPrinter spoolss test.
Guenther
2010-01-31 20:41:17 +01:00
Simo Sorce
f77714c887 s4:kdc streamline context initialization
Allow other plugins to init the context without having it try to grab sockets
or set samba specific logging.
2010-01-31 13:30:31 -05:00
Simo Sorce
b116d4e5b9 s4:kdc Streamline client access verification call
Move the core to pac-glue so that other plugins can use it.
2010-01-31 13:25:17 -05:00
Simo Sorce
0520bd7782 s4:kdc Fix netbios name retrieval
The code was looping but always checking only the first address.
2010-01-31 13:25:17 -05:00
Simo Sorce
08a20006c8 s4:ldb quiet down rootdse control registration 2010-01-31 13:25:17 -05:00
Volker Lendecke
0beac794b6 s3: Fix some DEBUG messages 2010-01-31 15:40:59 +01:00
Jeremy Allison
687e4eba3c Fix bug #7079 - cliconnect gets realm wrong with trusted domains.
Passing NULL as dest_realm for cli_session_setup_spnego() was
always using our own realm (as for a NetBIOS name). Change this
to look for the mapped realm using krb5_get_host_realm() if
the destination machine name is a DNS name (contains a '.').
Could get fancier with DNS name detection (length, etc.) but
this will do for now.

Jeremy.
2010-01-30 19:24:28 -08:00
Steven Danneman
f42971c520 s3/smbd: Fix string buffer overflow causing heap corruption
The destname malloc size was not taking into account the 1 extra byte
needed if a string without a leading '/' was passed in and that slash
was added.

This would cause the '\0' byte to be written past the end of the
malloced destname string and corrupt whatever heap memory was there.

This problem would be hit if a share name was given in smb.conf without
a leading '/' and if it was the exact size of the allocated STRDUP memory
which in some implementations of malloc is a power of 2.
2010-01-30 13:38:31 -08:00
Simo Sorce
772d808ac8 s4:ldb Fix check made conditional by mistake 2010-01-30 02:57:33 -05:00
Simo Sorce
df7be036d7 s4:ldb add support for permissive modify control 2010-01-30 01:04:12 -05:00
Jeremy Allison
1876b5a7e3 Fix a really interesting problem found by Volker's conversion of sessionsetup SPNEGO to asynchronous code.
Normally clistr_push_fn() can depend upon cli->outbuf being
initialized by negprot and sessionsetup packets, and cli->outbuf[smb_flgs2] being
correctly set with FLAGS2_UNICODE_STRINGS when cli_setup_packet() is called. When
all the sessionsetups are async, then cli_setup_packet() is never called, the async
code uses cli_setup_packet_buf() - which initializes the allocated async buffer,
not the cli->outbuf one. So the first time clistr_push_fn() is called is from
libsmb/clidfs.c:cli_dfs_get_referral(), just after the connection and tconX.
In this case cli->outbuf has never been initialized, and cli->outbuf[smb_flgs2] = 0
so the DFS query pushes ASCII on the wire, which is not what we want :-).

Remove the dependency on cli->outbuf[smb_flgs2] in clistr_push_fn(), and
fake up a SVAL(cli->outbuf, smb_flg2) value using cli_ucs2(cli) function
instead, which has been initialized. We only care about the FLAGS2_UNICODE_STRINGS
bit anyway.

I don't think this is an issue for 3.5.0 as the sessionsetup is still
synchronous there, but Volker PLEASE CHECK !

Jeremy.
2010-01-29 16:41:53 -08:00
Jeremy Allison
ce73f91ee2 Fix const warning.
Jeremy
2010-01-29 14:36:36 -08:00
Matthias Dieter Wallnöfer
d89427ad27 Revert "s4:include/includes.h - Need to include "system/network.h""
This reverts commit 97fd03a15a.

This obviously broke the build. Revert it for now.
2010-01-29 21:36:23 +01:00
Matthias Dieter Wallnöfer
97fd03a15a s4:include/includes.h - Need to include "system/network.h"
Otherwise I don't get the definition of "struct in_addr" for "lib/util/util.h" on CentOS 4.
2010-01-29 20:13:38 +01:00
Matthias Dieter Wallnöfer
dfd93fc7e3 s4:libcli/util/tstream.c - Need to include "system/network.h"
Otherwise I don't get "struct iovec" through "<sys/uio.h>" on CentOS 4.
2010-01-29 20:01:34 +01:00
Stefan Metzmacher
6442b0fcc1 libcli/nbt: fix off-by-one bug in ndr_pull_wrepl_nbt_name()
The scope starts at byte 17 with index 16.

metze
2010-01-29 15:55:11 +01:00
Stefan Metzmacher
c50a17cc8d libcli/nbt: fix ndr_pull/push_wrepl_nbt_name()
[MS-WINSRA] — v20091104 was wrong
regarding section "2.2.10.1 Name Record"

If the name buffer is already 4 byte aligned
Windows (at least 2003 SP1 and 2008) add 4 extra
bytes. This can happen when the name has a scope.

metze
2010-01-29 15:55:10 +01:00
Björn Jacke
a20b43f23f s3: link thread objects in libsmbclient only and adjust linker flags 2010-01-29 15:26:36 +01:00
olivier
e95e3270d1 AIX doesn't have MSG_DONTWAIT 2010-01-29 15:26:36 +01:00
Nadezhda Ivanova
adc38b00a9 Fixed a bug caused by a typo. Infrastructure role didn't work. 2010-01-29 15:42:46 +02:00
Kamen Mazdrashki
2dc56d68fa s4/ldap: Test to expoit ldb_ildap bug in case of nested search requests
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-29 14:09:53 +01:00
Kamen Mazdrashki
a4d0ed5a10 s4/ldap: Fix nested searches SEGFAULT bug
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-29 14:09:53 +01:00
Kamen Mazdrashki
e3d50e89ab s4: Ignore few more auto-generated files 2010-01-29 14:09:53 +01:00
Stefan Metzmacher
f450d1f43a librpc: rerun 'make idl'
metze
2010-01-29 14:09:52 +01:00
Stefan Metzmacher
34a5d56d55 security.idl: add wellknown TrustedInstaller SID
metze
2010-01-29 14:09:50 +01:00
Björn Jacke
118725c892 s3: by default don't use pthread pool support 2010-01-29 12:43:13 +01:00
Stefan Metzmacher
ad6ea7b189 lib/util: remove data_blob_talloc_reference()
We want to avoid the usage of talloc_reference() in Samba.

metze
2010-01-29 11:16:44 +01:00
Stefan Metzmacher
1c76df6219 s4:auth_sam: avoid usage of data_blob_talloc_reference() and copy the session keys
metze
2010-01-29 11:16:35 +01:00
Stefan Metzmacher
ddd595e687 s4:libcli: remove unneeded talloc_reference() usage
metze
2010-01-29 11:16:13 +01:00
Simo Sorce
14e006747e s4:kdc remove dead code and comments 2010-01-28 19:33:34 -05:00
Simo Sorce
7b355d41b5 s4:kdc Fill in more data fields 2010-01-28 19:33:34 -05:00
Simo Sorce
3ce54a4a97 s4:kdc move db functions in their own file
Keep all heimdal related plugin code within hdb_samba4.c
Move interfaces needed by multiple plugins in db-glue.c

Move sequence context in main db context so that we do
not depend on db->hdb_dbc in the common code.

Remove unnecessary paremeters from function prototypes
2010-01-28 19:33:34 -05:00
Simo Sorce
a097527ab7 s4:kdc Use a clearer name for the samba kdc entry
Renames hdb_samba4_private to samba_kdc_entry
Streamlines members of the entry and the kdc db contextto avoid
unnecessary duplication.
2010-01-28 19:33:34 -05:00