ira/wip.git
10 years agotalloc: Added doxygen config file.
Andreas Schneider [Sun, 17 Jan 2010 10:25:34 +0000 (11:25 +0100)]
talloc: Added doxygen config file.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
10 years agotalloc: Documented talloc with doxygen.
Andreas Schneider [Sun, 17 Jan 2010 10:25:02 +0000 (11:25 +0100)]
talloc: Documented talloc with doxygen.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
10 years agos3: fix build issue on Tru64
Björn Jacke [Sun, 7 Feb 2010 19:10:57 +0000 (20:10 +0100)]
s3: fix build issue on Tru64

Thanks, Volker for the hint - acl_type is a macro on Tru64. Renamed it
to acltype. This fixes #7103.

10 years agos3: Fix some DEBUG statements
Volker Lendecke [Sun, 7 Feb 2010 19:55:13 +0000 (20:55 +0100)]
s3: Fix some DEBUG statements

10 years agos3: Make cli_get_fs_volume_info() use cli_trans()
Volker Lendecke [Sun, 7 Feb 2010 11:08:39 +0000 (12:08 +0100)]
s3: Make cli_get_fs_volume_info() use cli_trans()

10 years agos3: Remove some unused code
Volker Lendecke [Sun, 7 Feb 2010 11:01:36 +0000 (12:01 +0100)]
s3: Remove some unused code

10 years agos3: Fix some comments
Volker Lendecke [Sun, 7 Feb 2010 10:14:22 +0000 (11:14 +0100)]
s3: Fix some comments

10 years agos3: Fix some nonempty blank lines
Volker Lendecke [Sun, 7 Feb 2010 10:05:07 +0000 (11:05 +0100)]
s3: Fix some nonempty blank lines

10 years agolibwbclient: wbc_create_logon_info is always called with mem_ctx==NULL
Volker Lendecke [Sat, 6 Feb 2010 15:56:29 +0000 (16:56 +0100)]
libwbclient: wbc_create_logon_info is always called with mem_ctx==NULL

10 years agolibwbclient: wbc_create_password_policy_info is always called with mem_ctx==NULL
Volker Lendecke [Sat, 6 Feb 2010 15:54:05 +0000 (16:54 +0100)]
libwbclient: wbc_create_password_policy_info is always called with mem_ctx==NULL

10 years agolibwbclient: wbc_create_error_info is always called with mem_ctx==NULL
Volker Lendecke [Sat, 6 Feb 2010 15:53:07 +0000 (16:53 +0100)]
libwbclient: wbc_create_error_info is always called with mem_ctx==NULL

10 years agos4-registry: fixed byte order assumptions
Andrew Tridgell [Sun, 7 Feb 2010 07:11:42 +0000 (18:11 +1100)]
s4-registry: fixed byte order assumptions

the registry tests were broken on big-endian systems

10 years agotdb: raise version to 1.2.1 tdb-1.2.1
Simo Sorce [Sat, 6 Feb 2010 15:48:39 +0000 (10:48 -0500)]
tdb: raise version to 1.2.1

after recent fixes we need to raise the version to 1.2.1 so that
we can require also the right patched version.

10 years agopam_winbind: Remove a nested if-statement. Bo, please check!
Volker Lendecke [Sat, 6 Feb 2010 11:56:19 +0000 (12:56 +0100)]
pam_winbind: Remove a nested if-statement. Bo, please check!

10 years agopam_winbind: Use strchr instead of strstr for a single character
Volker Lendecke [Sat, 6 Feb 2010 11:55:00 +0000 (12:55 +0100)]
pam_winbind: Use strchr instead of strstr for a single character

10 years agoFix trailing whitespace errors I added (sorry).
Jeremy Allison [Sat, 6 Feb 2010 06:51:11 +0000 (22:51 -0800)]
Fix trailing whitespace errors I added (sorry).

Jeremy.

10 years agos3: Fix malformed require_membership_of_sid.
Bo Yang [Sun, 7 Feb 2010 06:45:42 +0000 (14:45 +0800)]
s3: Fix malformed require_membership_of_sid.

Signed-off-by: Bo Yang <boyang@samba.org>
10 years agos3-events: make the old timed events compatible with tevent
Andrew Tridgell [Sat, 6 Feb 2010 03:14:45 +0000 (19:14 -0800)]
s3-events: make the old timed events compatible with tevent

tevent ensures that a timed event is only called once. The old events
code relied on the called handler removing the event itself. If the
handler removed the event after calling a function which invoked the
event loop then the timed event could loop forever.

This change makes the two timed event systems more compatible, by
allowing the handler to free the te if it wants to, but ensuring it is
off the linked list of events before the handler is called, and
ensuring it is freed even if the handler doesn't free it.

10 years agos3-smbd: add a rate limited cleanup of brl, connections and locking db
Andrew Tridgell [Sat, 6 Feb 2010 05:08:56 +0000 (21:08 -0800)]
s3-smbd: add a rate limited cleanup of brl, connections and locking db

On unclean shutdown we can end up with stale entries in the brlock,
connections and locking db. Previously we would do the cleanup on
every unclean exit, but that can cause smbd to be completely
unavailable for several minutes when a large number of child smbd
processes exit.

This adds a rate limited cleanup of the databases, with the default
that cleanup happens at most every 20s

10 years agos3-brlock: we don't need these MSG_SMB_UNLOCK calls now
Andrew Tridgell [Sat, 6 Feb 2010 05:02:24 +0000 (21:02 -0800)]
s3-brlock: we don't need these MSG_SMB_UNLOCK calls now

These have been replaced with the min timeout in blocking.c

10 years agos3-brlock: add a minimim retry time for pending blocking locks
Andrew Tridgell [Sat, 6 Feb 2010 04:59:43 +0000 (20:59 -0800)]
s3-brlock: add a minimim retry time for pending blocking locks

When we are waiting on a pending byte range lock, another smbd might
exit uncleanly, and therefore not notify us of the removal of the
lock, and thus not trigger the lock to be retried.

We coped with this up to now by adding a message_send_all() in the
SIGCHLD and cluster reconfigure handlers to send a MSG_SMB_UNLOCK to
all smbd processes. That would generate O(N^2) work when a large
number of clients disconnected at once (such as on a network outage),
which could leave the whole system unusable for a very long time (many
minutes, or even longer).

By adding a minimum re-check time for pending byte range locks we
avoid this problem by ensuring that pending locks are retried at a
more regular interval.

10 years agos4-ldb: fixed api.py selftest
Andrew Tridgell [Sat, 6 Feb 2010 03:26:22 +0000 (14:26 +1100)]
s4-ldb: fixed api.py selftest

subunitrun seemed to be calling a test from its own source, instead of
the samba test. Fix this by calling the test directly.

10 years agoRemove now unused variable.
Jeremy Allison [Sat, 6 Feb 2010 00:20:34 +0000 (16:20 -0800)]
Remove now unused variable.
Jeremy.

10 years agoFix bug 7104 - "wide links" and "unix extensions" are incompatible.
Jeremy Allison [Fri, 5 Feb 2010 23:20:18 +0000 (15:20 -0800)]
Fix bug 7104 - "wide links" and "unix extensions" are incompatible.

Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.

Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow that link anyway.

Correct DEBUG message in check_reduced_name() to add missing "\n"
so it's really clear when a path is being denied as it's outside
the enclosing share path.

Jeremy.

10 years agos3: Make use of ZERO_STRUCTP
Volker Lendecke [Fri, 5 Feb 2010 14:55:14 +0000 (15:55 +0100)]
s3: Make use of ZERO_STRUCTP

10 years agos3: Remove a pointless if-statement
Volker Lendecke [Fri, 5 Feb 2010 14:53:19 +0000 (15:53 +0100)]
s3: Remove a pointless if-statement

10 years agos3: Make guest_user_info() static
Volker Lendecke [Fri, 5 Feb 2010 14:50:11 +0000 (15:50 +0100)]
s3: Make guest_user_info() static

10 years agos3: Hide some uses of pdb_get_init_flags (which I would love to remove...)
Volker Lendecke [Fri, 5 Feb 2010 14:40:12 +0000 (15:40 +0100)]
s3: Hide some uses of pdb_get_init_flags (which I would love to remove...)

10 years agos3: Fix some nonempty blank lines
Volker Lendecke [Fri, 5 Feb 2010 14:43:26 +0000 (15:43 +0100)]
s3: Fix some nonempty blank lines

10 years agos4:UID wrapper - Make it work on older distributions
Matthias Dieter Wallnöfer [Sat, 30 Jan 2010 13:25:51 +0000 (14:25 +0100)]
s4:UID wrapper - Make it work on older distributions

On my older CentOS 4 installation I had the problem with the missing
substitution prototypes ("uwrap_*"). So I added them to "uid_wrapper.h".

Also, I made the head of the "uid_wrapper.c" file more like the one of
"nss_wrapper.c" - it shouldn't change that much, I did it only to be consistent.

This patch should fix the build on older distributions while keep it running on
newer ones.

10 years agos4:UID wrapper - Fix includes
Matthias Dieter Wallnöfer [Sat, 30 Jan 2010 13:25:51 +0000 (14:25 +0100)]
s4:UID wrapper - Fix includes

The includes of the UID wrapper headers werent't really efficient according
to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html).
To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c",
 "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".

10 years agoNSS wrapper - add dependency to "nsstest"
Matthias Dieter Wallnöfer [Sat, 30 Jan 2010 13:18:57 +0000 (14:18 +0100)]
NSS wrapper - add dependency to "nsstest"

The code part makes use of the "NSS wrapper" if it is enabled. Surprisingly
the build process doesn't break with the missing dependency on more recent
systems. But with an older CentOS 4 installation it has been broken.
This patch should fix the problem on older distributions while keep the build
running on newer ones.

10 years agos4:Heimdal build - never require the NSS wrapper for Heimdal Kerberos
Matthias Dieter Wallnöfer [Fri, 5 Feb 2010 15:58:32 +0000 (16:58 +0100)]
s4:Heimdal build - never require the NSS wrapper for Heimdal Kerberos

Disable the use of it in the heimdal code.

Notice: This doesn't need to be ported upstream since it only affects the
build in conjunction with s4.

10 years agos3: normalize "Changing password for" msg IDs and STRs
Lars Müller [Fri, 5 Feb 2010 16:38:04 +0000 (17:38 +0100)]
s3: normalize "Changing password for" msg IDs and STRs

An additional space at the end of the "Changing password for" msgid lead
to untranslated pam_winnind messages.

10 years agos4/drs: propagate DRS_ extension flags in code base
Kamen Mazdrashki [Tue, 2 Feb 2010 12:28:57 +0000 (14:28 +0200)]
s4/drs: propagate DRS_ extension flags in code base

10 years agos4/idl: Regenerate IDL for DRSUAPI interface
Kamen Mazdrashki [Tue, 2 Feb 2010 12:27:46 +0000 (14:27 +0200)]
s4/idl: Regenerate IDL for DRSUAPI interface

10 years agos4/idl: add DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN ext. flag for DRSUAPI
Kamen Mazdrashki [Tue, 2 Feb 2010 11:48:01 +0000 (13:48 +0200)]
s4/idl: add DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN ext. flag for DRSUAPI

This flag corresponds to DRS_EXT_RECYCLE_BIN extended
flag in [MS-DRSR] documentation.

Reference:
  [MS-DRSR] - 5.37
Description:
  If present, signifies that the DC has enabled
  the Recycle Binoptional feature.

10 years agos4/idl: add DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10 flag for DRSUAPI
Kamen Mazdrashki [Tue, 2 Feb 2010 11:46:20 +0000 (13:46 +0200)]
s4/idl: add DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10 flag for DRSUAPI

This flag corresponds to DRS_EXT_GETCHGREQ_V10 flag
in [MS-DRSR] documentation.

Reference:
  [MS-DRSR] - 5.37
Description:
  If present, signifies that the DC supports DRS_MSG_GETCHGREQ_V10.

10 years agos4/idl: add DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5 flag for DRSUAPI
Kamen Mazdrashki [Tue, 2 Feb 2010 11:44:49 +0000 (13:44 +0200)]
s4/idl: add DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5 flag for DRSUAPI

This flag corresponds to DRS_EXT_GETCHGREQ_V5 flag
in [MS-DRSR] documentation.

Reference:
  [MS-DRSR] - 5.37
Description:
  If present, signifies that the DC supports DRS_MSG_GETCHGREQ_V5.

10 years agos4/idl: add DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY flag for DRSUAPI
Kamen Mazdrashki [Tue, 2 Feb 2010 11:34:55 +0000 (13:34 +0200)]
s4/idl: add DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY flag for DRSUAPI

This flag corresponds to DRS_EXT_ADDENTRY flag
in [MS-DRSR] documentation.

Reference:
  [MS-DRSR] - 5.37
Description:
  If present, signifies that the DC supports IDL_DRSAddEntry.

10 years agoFix bug 7075 - bug in vfs_scannedonly rmdir implementation.
Jeremy Allison [Fri, 5 Feb 2010 00:23:32 +0000 (16:23 -0800)]
Fix bug 7075 - bug in vfs_scannedonly rmdir implementation.

Check for NULL on opendir, correctly call next rmdir.

Jeremy.

10 years agos3:passdb: fix a type Domain Users has RID -513
Stefan Metzmacher [Thu, 4 Feb 2010 14:19:50 +0000 (15:19 +0100)]
s3:passdb: fix a type Domain Users has RID -513

metze

10 years agos3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
Stefan Metzmacher [Thu, 4 Feb 2010 13:03:20 +0000 (14:03 +0100)]
s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()

When we need to do more than one network operation to get the
browse list we need to use the same 'stype' value each time.

metze

10 years agos4-torture: handle NT_STATUS_CONNECTION_RESET
Andrew Tridgell [Thu, 4 Feb 2010 09:19:05 +0000 (20:19 +1100)]
s4-torture: handle NT_STATUS_CONNECTION_RESET

a CONNECTION_RESET is now the normal "client disconnect" status code

10 years agos4:mark the SYSTEM control always as non-critical
Matthias Dieter Wallnöfer [Thu, 4 Feb 2010 08:22:39 +0000 (09:22 +0100)]
s4:mark the SYSTEM control always as non-critical

It is needed to not break the various LDAP backends. For reference look at
bug #7040.

10 years agos3:nsswitch: also use pthread CFLAGS for the nsswitch modules that might require it
Björn Jacke [Thu, 4 Feb 2010 10:03:55 +0000 (11:03 +0100)]
s3:nsswitch: also use pthread CFLAGS for the nsswitch modules that might require it

10 years agos3: fix build on Tru64 after it broke with deactivating pthread pool support
Björn Jacke [Thu, 4 Feb 2010 09:35:45 +0000 (10:35 +0100)]
s3: fix build on Tru64 after it broke with deactivating pthread pool support

10 years agos3:vfs_scannedonly: fix build on HP-UX
Björn Jacke [Wed, 3 Feb 2010 22:28:38 +0000 (23:28 +0100)]
s3:vfs_scannedonly: fix build on HP-UX

10 years agonet: Fix python 2.4 compatibility.
Jelmer Vernooij [Wed, 3 Feb 2010 22:55:58 +0000 (23:55 +0100)]
net: Fix python 2.4 compatibility.

10 years agos3: Simplify the code a bit: Catch (len==0) early
Volker Lendecke [Wed, 3 Feb 2010 06:37:29 +0000 (07:37 +0100)]
s3: Simplify the code a bit: Catch (len==0) early

10 years agoupdate samba schema for IBM Directory Server
Christian Ambach [Wed, 3 Feb 2010 13:20:16 +0000 (14:20 +0100)]
update samba schema for IBM Directory Server

this increases the sambapasswordhistory field length to 64 and
fixes a warning about a wrong booleanmatch setting

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
10 years agoFix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)
Jeremy Allison [Wed, 3 Feb 2010 00:43:41 +0000 (16:43 -0800)]
Fix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)

Fix inspired by idea from Eric Horst <erich@cac.washington.edu>.

Jeremy.

10 years agoFix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Jeremy Allison [Wed, 3 Feb 2010 00:32:51 +0000 (16:32 -0800)]
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.

10 years agos3:configure: check complete set of EA functions only when we found at least one
Björn Jacke [Tue, 2 Feb 2010 17:27:49 +0000 (18:27 +0100)]
s3:configure: check complete set of EA functions only when we found at least one

this saves us some time in configure

10 years agoChange uint_t to unsigned int in source4
Matt Kraai [Tue, 5 Jan 2010 17:42:54 +0000 (09:42 -0800)]
Change uint_t to unsigned int in source4

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in source3
Matt Kraai [Tue, 5 Jan 2010 17:42:23 +0000 (09:42 -0800)]
Change uint_t to unsigned int in source3

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in pidl
Matt Kraai [Tue, 5 Jan 2010 17:41:53 +0000 (09:41 -0800)]
Change uint_t to unsigned int in pidl

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in libcli
Matt Kraai [Tue, 5 Jan 2010 17:41:24 +0000 (09:41 -0800)]
Change uint_t to unsigned int in libcli

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in lib/util
Matt Kraai [Tue, 5 Jan 2010 17:40:54 +0000 (09:40 -0800)]
Change uint_t to unsigned int in lib/util

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in lib/talloc
Matt Kraai [Tue, 5 Jan 2010 17:40:26 +0000 (09:40 -0800)]
Change uint_t to unsigned int in lib/talloc

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in lib/crypto
Matt Kraai [Tue, 5 Jan 2010 17:39:56 +0000 (09:39 -0800)]
Change uint_t to unsigned int in lib/crypto

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoChange uint_t to unsigned int in lib/replace
Matt Kraai [Tue, 5 Jan 2010 17:43:24 +0000 (09:43 -0800)]
Change uint_t to unsigned int in lib/replace

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agos4:NBT-WINSREPLICATION: don't mark a local variable as static
Stefan Metzmacher [Mon, 1 Feb 2010 16:30:30 +0000 (17:30 +0100)]
s4:NBT-WINSREPLICATION: don't mark a local variable as static

This was somehow introduced in commit 8773e743c518578584d07d35ffdafdd598af88b0.

metze

10 years agoAdd debug to make it clear when EA dosmode set is invoked.
Jeremy Allison [Tue, 2 Feb 2010 03:21:35 +0000 (19:21 -0800)]
Add debug to make it clear when EA dosmode set is invoked.

Jeremy.

10 years agoFix bug #7084 - Create time on directories not stored properly in an EA in new create...
Jeremy Allison [Tue, 2 Feb 2010 02:50:43 +0000 (18:50 -0800)]
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.

10 years agoTorture test for bug 7084 - Create time on directories not stored properly in an...
Jeremy Allison [Tue, 2 Feb 2010 02:49:50 +0000 (18:49 -0800)]
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.

10 years agoArg. Got the sense of the test reversed to fix bug #7080 - Quota only shown when...
Jeremy Allison [Mon, 1 Feb 2010 23:57:16 +0000 (15:57 -0800)]
Arg. Got the sense of the test reversed to fix bug #7080 - Quota only shown when logged as root.. Doh !

Jeremy.

10 years agoFix bug #7080 - Quota only shown when logged as root.
Jeremy Allison [Mon, 1 Feb 2010 23:55:55 +0000 (15:55 -0800)]
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.

10 years agos4:NBT-WINS: test large scopes
Stefan Metzmacher [Mon, 1 Feb 2010 14:32:37 +0000 (15:32 +0100)]
s4:NBT-WINS: test large scopes

metze

10 years agos4:NBT-WINS: pass the expected rcode of the name registration to the test code
Stefan Metzmacher [Mon, 1 Feb 2010 13:55:14 +0000 (14:55 +0100)]
s4:NBT-WINS: pass the expected rcode of the name registration to the test code

metze

10 years agos4:NBT-WINSREPLICATION: test replication with names including scopes
Stefan Metzmacher [Sat, 30 Jan 2010 09:50:33 +0000 (10:50 +0100)]
s4:NBT-WINSREPLICATION: test replication with names including scopes

metze

10 years agos4:NBT-WINSREPLICATION: fix compiler warnings
Stefan Metzmacher [Fri, 29 Jan 2010 15:42:24 +0000 (16:42 +0100)]
s4:NBT-WINSREPLICATION: fix compiler warnings

metze

10 years agos4:NBT-WINSREPLICATION: use an array of nbt_names to loop over different names
Stefan Metzmacher [Fri, 29 Jan 2010 15:33:58 +0000 (16:33 +0100)]
s4:NBT-WINSREPLICATION: use an array of nbt_names to loop over different names

metze

10 years agos4:winsserver: reject name registrations with a scope length > 237
Stefan Metzmacher [Mon, 1 Feb 2010 13:39:13 +0000 (14:39 +0100)]
s4:winsserver: reject name registrations with a scope length > 237

This matches Windows 2008 behavior. Name releases are just ignored.

metze

10 years agos4:wrepl_server: truncate the scope of a netbios name to 237 bytes as Windows 2008...
Stefan Metzmacher [Sun, 31 Jan 2010 17:59:41 +0000 (18:59 +0100)]
s4:wrepl_server: truncate the scope of a netbios name to 237 bytes as Windows 2008 does

metze

10 years agolibcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are...
Stefan Metzmacher [Mon, 1 Feb 2010 14:18:15 +0000 (15:18 +0100)]
libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are allowed

metze

10 years agos4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8
Kamen Mazdrashki [Wed, 20 Jan 2010 16:10:05 +0000 (18:10 +0200)]
s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agos4/ldif: Better control on ldif_write_NDR() errors processing
Kamen Mazdrashki [Wed, 20 Jan 2010 15:58:39 +0000 (17:58 +0200)]
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>
10 years agos4/idl: drsblobs IDL regeneration
Kamen Mazdrashki [Tue, 19 Jan 2010 14:54:09 +0000 (16:54 +0200)]
s4/idl: drsblobs IDL regeneration

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agos4/drsblobs: Custom ndr_print_ implementation for drsuapi_MSPrefixMap_Entry
Kamen Mazdrashki [Tue, 19 Jan 2010 14:53:32 +0000 (16:53 +0200)]
s4/drsblobs: Custom ndr_print_ implementation for drsuapi_MSPrefixMap_Entry

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agos4/idl: PrefixMap description for W2K3 and W2K8 Schema:prefixMap attribute
Kamen Mazdrashki [Tue, 19 Jan 2010 14:52:10 +0000 (16:52 +0200)]
s4/idl: PrefixMap description for W2K3 and W2K8 Schema:prefixMap attribute

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agotdb: fix an early release of the global lock that can cause data corruption
Volker Lendecke [Fri, 29 Jan 2010 17:21:09 +0000 (18:21 +0100)]
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.

10 years agos4-smbtorture: check for RouterReplyPrinterEx packets inside backchannel in RPC-SPOOL...
Günther Deschner [Sun, 31 Jan 2010 19:39:36 +0000 (20:39 +0100)]
s4-smbtorture: check for RouterReplyPrinterEx packets inside backchannel in RPC-SPOOLSS-NOTIFY.

Guenther

10 years agos4-smbtorture: also test RouterRefreshPrinterChangeNotify call in RPC-SPOOLSS-NOTIFY.
Günther Deschner [Sun, 31 Jan 2010 19:31:00 +0000 (20:31 +0100)]
s4-smbtorture: also test RouterRefreshPrinterChangeNotify call in RPC-SPOOLSS-NOTIFY.

Guenther

10 years agos4-smbtorture: rework spoolss_NotifyOption handling in RPC-SPOOLSS-NOTIFY.
Günther Deschner [Sun, 31 Jan 2010 19:30:09 +0000 (20:30 +0100)]
s4-smbtorture: rework spoolss_NotifyOption handling in RPC-SPOOLSS-NOTIFY.

Guenther

10 years agotestprogs: also print printer info during GetPrinter spoolss test.
Günther Deschner [Sun, 31 Jan 2010 19:23:35 +0000 (20:23 +0100)]
testprogs: also print printer info during GetPrinter spoolss test.

Guenther

10 years agos4:kdc streamline context initialization
Simo Sorce [Sun, 31 Jan 2010 18:28:04 +0000 (13:28 -0500)]
s4:kdc streamline context initialization

Allow other plugins to init the context without having it try to grab sockets
or set samba specific logging.

10 years agos4:kdc Streamline client access verification call
Simo Sorce [Sun, 31 Jan 2010 17:49:07 +0000 (12:49 -0500)]
s4:kdc Streamline client access verification call

Move the core to pac-glue so that other plugins can use it.

10 years agos4:kdc Fix netbios name retrieval
Simo Sorce [Sun, 31 Jan 2010 17:53:50 +0000 (12:53 -0500)]
s4:kdc Fix netbios name retrieval

The code was looping but always checking only the first address.

10 years agos4:ldb quiet down rootdse control registration
Simo Sorce [Sun, 31 Jan 2010 18:24:18 +0000 (13:24 -0500)]
s4:ldb quiet down rootdse control registration

10 years agos3: Fix some DEBUG messages
Volker Lendecke [Sun, 31 Jan 2010 14:38:16 +0000 (15:38 +0100)]
s3: Fix some DEBUG messages

10 years agoFix bug #7079 - cliconnect gets realm wrong with trusted domains.
Jeremy Allison [Sun, 31 Jan 2010 03:24:28 +0000 (19:24 -0800)]
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.

10 years agos3/smbd: Fix string buffer overflow causing heap corruption
Steven Danneman [Sat, 30 Jan 2010 21:29:23 +0000 (13:29 -0800)]
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.

10 years agos4:ldb Fix check made conditional by mistake
Simo Sorce [Sat, 30 Jan 2010 07:57:33 +0000 (02:57 -0500)]
s4:ldb Fix check made conditional by mistake

10 years agos4:ldb add support for permissive modify control
Simo Sorce [Sat, 30 Jan 2010 05:33:22 +0000 (00:33 -0500)]
s4:ldb add support for permissive modify control

10 years agoFix a really interesting problem found by Volker's conversion of sessionsetup SPNEGO...
Jeremy Allison [Sat, 30 Jan 2010 00:41:53 +0000 (16:41 -0800)]
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.

10 years agoFix const warning.
Jeremy Allison [Fri, 29 Jan 2010 22:36:36 +0000 (14:36 -0800)]
Fix const warning.

Jeremy

10 years agoRevert "s4:include/includes.h - Need to include "system/network.h""
Matthias Dieter Wallnöfer [Fri, 29 Jan 2010 20:36:23 +0000 (21:36 +0100)]
Revert "s4:include/includes.h - Need to include "system/network.h""

This reverts commit 97fd03a15a694450e80310fc776a58c6fde58a52.

This obviously broke the build. Revert it for now.

10 years agos4:include/includes.h - Need to include "system/network.h"
Matthias Dieter Wallnöfer [Fri, 29 Jan 2010 19:13:38 +0000 (20:13 +0100)]
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.

10 years agos4:libcli/util/tstream.c - Need to include "system/network.h"
Matthias Dieter Wallnöfer [Fri, 29 Jan 2010 19:01:34 +0000 (20:01 +0100)]
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.