1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

59159 Commits

Author SHA1 Message Date
Jeremy Allison
110a6f29f0 Fix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Reported and found by Martin Hochreiter <linuxbox@wavenet.at>.
Ensure we copy the right amount of registry data into the outgoing
buffer.

Jeremy.
2010-02-02 16:32:51 -08:00
Björn Jacke
27920f4f90 s3:configure: check complete set of EA functions only when we found at least one
this saves us some time in configure
2010-02-02 18:35:59 +01:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Matt Kraai
a47b6ebb30 Change uint_t to unsigned int in source3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Matt Kraai
3ee9d1a3d1 Change uint_t to unsigned int in pidl
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:17 +01:00
Matt Kraai
aa6a507e76 Change uint_t to unsigned int in libcli
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:17 +01:00
Matt Kraai
a7250eb142 Change uint_t to unsigned int in lib/util
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:17 +01:00
Matt Kraai
2cb2d5317f Change uint_t to unsigned int in lib/talloc
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Matt Kraai
d4fc2e8201 Change uint_t to unsigned int in lib/crypto
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Matt Kraai
a2c95a5d96 Change uint_t to unsigned int in lib/replace
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Stefan Metzmacher
e3aeea29a4 s4:NBT-WINSREPLICATION: don't mark a local variable as static
This was somehow introduced in commit 8773e743c5.

metze
2010-02-02 07:18:15 +01:00
Jeremy Allison
86bf5eac67 Add debug to make it clear when EA dosmode set is invoked.
Jeremy.
2010-02-01 19:21:35 -08:00
Jeremy Allison
f3ee1516e6 Fix bug #7084 - Create time on directories not stored properly in an EA in new create time code.
Remove erroneous optimisation that caused no EA to be set
if calculated btime matched st_ex btime, and calculated DOS
attribute matched existing file attribute.

Jeremy.
2010-02-01 18:50:43 -08:00
Jeremy Allison
a35be8c0c2 Torture test for bug 7084 - Create time on directories not stored properly in an EA in new create time code.
Ensure new files in a directory don't reset the create time.

Jeremy.
2010-02-01 18:49:50 -08:00
Jeremy Allison
4e08d0d0d6 Arg. Got the sense of the test reversed to fix bug #7080 - Quota only shown when logged as root.. Doh !
Jeremy.
2010-02-01 15:57:16 -08:00
Jeremy Allison
b3009819c5 Fix bug #7080 - Quota only shown when logged as root.
conn->server_info->utok.uid == 0

isn't the correct check to see if we're root anymore. As rpc_samr_nt.c does,
the correct check is :

geteuid() == sec_initial_uid()

Jeremy.
2010-02-01 15:55:55 -08:00
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