metze/samba/wip.git
14 years agomore fixes master4-talloc-sam
Stefan Metzmacher [Thu, 23 Jul 2009 11:43:46 +0000 (13:43 +0200)]
more fixes

14 years agotalloc: add talloc_set_strict_owner_mode()
Stefan Metzmacher [Thu, 23 Jul 2009 08:05:41 +0000 (10:05 +0200)]
talloc: add talloc_set_strict_owner_mode()

metze

14 years agos4:libnet: use talloc_strdup() instead of talloc_reference()
Stefan Metzmacher [Wed, 15 Jul 2009 10:06:12 +0000 (12:06 +0200)]
s4:libnet: use talloc_strdup() instead of talloc_reference()

metze

14 years agoTODO: more talloc no_owner fixes fixes
Stefan Metzmacher [Wed, 15 Jul 2009 10:08:03 +0000 (12:08 +0200)]
TODO: more talloc no_owner fixes fixes

14 years agofix ref_free_steal
Stefan Metzmacher [Tue, 14 Jul 2009 10:29:15 +0000 (12:29 +0200)]
fix ref_free_steal

14 years agofix test_implicit_explicit_free
Stefan Metzmacher [Tue, 14 Jul 2009 10:28:58 +0000 (12:28 +0200)]
fix test_implicit_explicit_free

14 years agofix tests
Stefan Metzmacher [Tue, 14 Jul 2009 10:28:35 +0000 (12:28 +0200)]
fix tests

14 years agotalloc add more tests more new talloc model
Sam Liddicott [Fri, 10 Jul 2009 10:45:09 +0000 (11:45 +0100)]
talloc add more tests more new talloc model

test_dangling_loop
test_ref_free_owner
test_ref_free_self
test_ref_free

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agofix ref_free_steal test
Stefan Metzmacher [Tue, 14 Jul 2009 10:00:22 +0000 (12:00 +0200)]
fix ref_free_steal test

14 years agotalloc: testsuite add infrastructure to test aborts
Stefan Metzmacher [Tue, 14 Jul 2009 09:58:16 +0000 (11:58 +0200)]
talloc: testsuite add infrastructure to test aborts

metze

14 years agotalloc: call return after abort, because an overloaded abort function might not exit
Stefan Metzmacher [Tue, 14 Jul 2009 09:56:33 +0000 (11:56 +0200)]
talloc: call return after abort, because an overloaded abort function might not exit

This will be useful in the testsuite,
where we could check if an abort would happen.

metze

14 years agotalloc testsuite: test (ref, free, steal) destroys reference
Sam Liddicott [Fri, 10 Jul 2009 10:45:09 +0000 (11:45 +0100)]
talloc testsuite: test (ref, free, steal) destroys reference

references should only be removed by permission of the reference
owner and not calls to talloc_free

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agotalloc: Make explicit free behave the same as implicit free
Sam Liddicott [Fri, 10 Jul 2009 10:45:02 +0000 (11:45 +0100)]
talloc: Make explicit free behave the same as implicit free

If a referenced allocation is explicitly freed the new owner
should be the same as if the same allocation is implicitly freed
(e.g. because it's owner was freed).

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agotalloc: fix testsuite after no_owner changes
Stefan Metzmacher [Mon, 13 Jul 2009 18:49:05 +0000 (20:49 +0200)]
talloc: fix testsuite after no_owner changes

metze

14 years agotalloc: make the no_owner feature simpler and working
Stefan Metzmacher [Mon, 13 Jul 2009 16:49:54 +0000 (18:49 +0200)]
talloc: make the no_owner feature simpler and working

metze

14 years agoprevent reference promotion to owner
Sam Liddicott [Fri, 10 Jul 2009 10:35:16 +0000 (11:35 +0100)]
prevent reference promotion to owner

The new rules are:

1. if you talloc() you must make preparation to free.
Usually the allocating reference being freed is enough, otherwise
explicitly talloc_free.

2. if you talloc_steal you must make preparation to free.
Usually the stealing reference being freed is enough, otherwise
explicitly talloc_free.

3. if you talloc_reference something you must make preparation to
remove the reference. Usually the reference itself being freed
is enough

4. you only call talloc_free once, on behalf of the allocator
or the stealer. If you want to remove a reference, then use
talloc_unreference

5. A function that calls talloc_free on an object has by definition
a passing-of-ownership in it's operation, and callers of the
function ought to be aware of this.

6. the destructor is called when the object is freed, not when
you call talloc_free. References might keep it alive for quite a while.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agoTODO: talloc: talloc_free() should remove the reference to the current owner
Stefan Metzmacher [Mon, 2 Feb 2009 12:12:07 +0000 (12:12 +0000)]
TODO: talloc: talloc_free() should remove the reference to the current owner

TODO: talloc: talloc_free() should remove the reference to the current owner

The parent of the first reference becomes the owner...

metze

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agotalloc: report __location__ of testsuite failures
Stefan Metzmacher [Mon, 13 Jul 2009 18:34:10 +0000 (20:34 +0200)]
talloc: report __location__ of testsuite failures

metze

14 years agotalloc: reset the globals after each subtest
Stefan Metzmacher [Mon, 13 Jul 2009 16:52:44 +0000 (18:52 +0200)]
talloc: reset the globals after each subtest

metze

14 years agotalloc: report the size of reference handles as 0
Stefan Metzmacher [Mon, 13 Jul 2009 18:32:50 +0000 (20:32 +0200)]
talloc: report the size of reference handles as 0

metze

14 years agotalloc: let talloc_total_blocks() and talloc_get_size() operate on the null_context
Stefan Metzmacher [Mon, 13 Jul 2009 16:51:24 +0000 (18:51 +0200)]
talloc: let talloc_total_blocks() and talloc_get_size() operate on the null_context

metze

14 years agoRevert "Make explicit free behave the same as implicit free"
Stefan Metzmacher [Thu, 9 Jul 2009 08:55:15 +0000 (10:55 +0200)]
Revert "Make explicit free behave the same as implicit free"

This reverts commit fc095dbedddf28ce32c711873317cf0b22579bfb.

14 years agoRevert "TODO: talloc: talloc_free() should remove the reference to the current owner"
Stefan Metzmacher [Thu, 9 Jul 2009 08:54:23 +0000 (10:54 +0200)]
Revert "TODO: talloc: talloc_free() should remove the reference to the current owner"

This reverts commit 1901ff9942837e9cad22269b16b33a6af3df92a9.

14 years agoRevert "prevent git ref/unref mismatches. prevent reference promotion to owner"
Stefan Metzmacher [Thu, 9 Jul 2009 08:53:15 +0000 (10:53 +0200)]
Revert "prevent git ref/unref mismatches. prevent reference promotion to owner"

This reverts commit 04183e2b4462102aedf3231e5cc236a374c38e87.

14 years agoRevert "talloc testsuite: test (ref, free, steal) destroys reference"
Stefan Metzmacher [Thu, 9 Jul 2009 08:53:06 +0000 (10:53 +0200)]
Revert "talloc testsuite: test (ref, free, steal) destroys reference"

This reverts commit 1672a0cc1e2751d6665854fd59baeb6661138534.

14 years agotalloc testsuite: test (ref, free, steal) destroys reference
Sam Liddicott [Mon, 2 Feb 2009 12:12:08 +0000 (12:12 +0000)]
talloc testsuite: test (ref, free, steal) destroys reference

ref, free, steal destroys the reference (as it became the new owner
on free) and stops the reference from keeping the object alive.

references should only be removed by permission of the reference owner.

Current behaviour may be according to design, but it's very awkward.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agoprevent git ref/unref mismatches. prevent reference promotion to owner
Sam Liddicott [Mon, 2 Feb 2009 12:12:07 +0000 (12:12 +0000)]
prevent git ref/unref mismatches. prevent reference promotion to owner

If talloc_steal occurs on an allocation that had references but whose
owner died before the steal, then one less unref must be done.

This is very weird.

These fixes seperate ownership and referencing internally to talloc

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agoTODO: talloc: talloc_free() should remove the reference to the current owner
Stefan Metzmacher [Mon, 2 Feb 2009 12:12:07 +0000 (12:12 +0000)]
TODO: talloc: talloc_free() should remove the reference to the current owner

TODO: talloc: talloc_free() should remove the reference to the current owner

The parent of the first reference becomes the owner...

metze

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agoMake explicit free behave the same as implicit free
Sam Liddicott [Mon, 2 Feb 2009 12:12:07 +0000 (12:12 +0000)]
Make explicit free behave the same as implicit free

If a referenced allocation is explicitly freed the new owner
should be the same as if the same allocation is implicitly freed
(e.g. because it's owner was freed).

Previously in talloc an explicit free will remove the top non-child reference
but an implicit free will move the top (any) reference to be the new owner

Signed-off-by: Sam Liddicott <sam@liddicott.com>
14 years agofixed use of reference in pytalloc master4-talloc-old
Andrew Tridgell [Wed, 1 Jul 2009 04:05:17 +0000 (14:05 +1000)]
fixed use of reference in pytalloc

The previous code caused memory leaks, and also caused situations
where talloc_free could be called on pointers with multiple parents

The new approach is to have two functions:

  py_talloc_import : steals the pointer, so it becomes wholly owned by
                     the python object
  py_talloc_reference: uses a reference, so it is owned by both python
                     and C

14 years agouse a talloc_unlink() as ops may have a reference
Andrew Tridgell [Wed, 1 Jul 2009 04:02:37 +0000 (14:02 +1000)]
use a talloc_unlink() as ops may have a reference

14 years agofixed the reference to the global_schema
Andrew Tridgell [Wed, 1 Jul 2009 04:02:12 +0000 (14:02 +1000)]
fixed the reference to the global_schema

14 years agoremoved a redundent talloc_steal
Andrew Tridgell [Wed, 1 Jul 2009 04:01:44 +0000 (14:01 +1000)]
removed a redundent talloc_steal

14 years agofixed the use of talloc_steal in ntlmssp_server
Andrew Tridgell [Wed, 1 Jul 2009 04:01:24 +0000 (14:01 +1000)]
fixed the use of talloc_steal in ntlmssp_server

The previous use of talloc_steal could cause a steal of a pointer that
had references. This ensures that doesn't happen

14 years agofixed rpc smb code to not reply on talloc_free being a function pointer
Andrew Tridgell [Wed, 1 Jul 2009 03:59:52 +0000 (13:59 +1000)]
fixed rpc smb code to not reply on talloc_free being a function pointer

The upcoming talloc_free/talloc_reference changes change talloc_free
to be a macro. These two bits of code relied on it being a function
pointer

14 years ago[SAMBA 4 directory] Corrects the "systemFlags" attributes
Matthias Dieter Wallnöfer [Tue, 30 Jun 2009 11:54:45 +0000 (13:54 +0200)]
[SAMBA 4 directory] Corrects the "systemFlags" attributes

Set the values like Windows Server 2003 R2.

14 years ago[SAMBA 4 directory] Adds the complete "objectclass path" to our self-created DC object
Matthias Dieter Wallnöfer [Tue, 30 Jun 2009 11:52:39 +0000 (13:52 +0200)]
[SAMBA 4 directory] Adds the complete "objectclass path" to our self-created DC object

Found after some comparisons against Windows Server 2003 R2.

14 years ago[SAMBA 4 directory] Adds the object version and "systemFlags" attribute to the displa...
Matthias Dieter Wallnöfer [Tue, 30 Jun 2009 11:34:09 +0000 (13:34 +0200)]
[SAMBA 4 directory] Adds the object version and "systemFlags" attribute to the display specifiers

The object version showed up in the Windows 2003 Server R2 AD.
The "systemFlags" attribute has been set to the right value.

14 years agos3 docs: Add documentation for 'kerberos method' and 'dedicated keytab file' parameters
Tim Prouty [Tue, 30 Jun 2009 23:59:57 +0000 (16:59 -0700)]
s3 docs: Add documentation for 'kerberos method' and 'dedicated keytab file' parameters

14 years agoFix bug #6496 - MS-DFS: cannot follow multibyte char link name.
SATOH Fumiyasu [Tue, 30 Jun 2009 22:29:08 +0000 (15:29 -0700)]
Fix bug #6496 - MS-DFS: cannot follow multibyte char link name.
consumed_ucs is the number of bytes
of the UCS2 path consumed not counting any
terminating null. We need to convert
back to unix charset and count again
to get the number of bytes consumed from
the incoming path.

14 years agos3-netlogon: remove unneeded fstrings from netlogon server.
Günther Deschner [Tue, 30 Jun 2009 15:18:47 +0000 (17:18 +0200)]
s3-netlogon: remove unneeded fstrings from netlogon server.

Guenther

14 years agoumount.cifs: don't build it by default
Jeff Layton [Tue, 30 Jun 2009 19:03:13 +0000 (15:03 -0400)]
umount.cifs: don't build it by default

Now that the sanity checks for mount.cifs default to matching the
behavior of /bin/mount, then there is virtually no need for umount.cifs.
The only exception is when someone enables the loose setuid behavior in
mount.cifs.

If an unprivileged user mounts a share that isn't in /etc/fstab, then
/bin/mount won't allow that user to unmount it. In that situation,
umount.cifs will be necessary to allow unmounting the share.

Signed-off-by: Jeff Layton <jlayton@samba.org>
Acked-by: Steve French <smfrench@us.ibm.com>
14 years agoFix bug #6431 - local groups from 3.0 setups no longer found.
Volker Lendecke [Tue, 30 Jun 2009 18:42:15 +0000 (11:42 -0700)]
Fix bug #6431 - local groups from 3.0 setups no longer found.
Search for groups without group suffix, group suffix is only used for new entries.

14 years agos3-spoolss: Bug #6512. Fix support for enumerating user forms.
Günther Deschner [Tue, 30 Jun 2009 11:12:01 +0000 (13:12 +0200)]
s3-spoolss: Bug #6512. Fix support for enumerating user forms.

Found while testing Xerox WorkCentre 133 PCL driver, now also tested with
torture test.

Guenther

14 years agos4-smbtorture: Test for newly added form with enum call in RPC-SPOOLSS.
Günther Deschner [Tue, 30 Jun 2009 11:11:16 +0000 (13:11 +0200)]
s4-smbtorture: Test for newly added form with enum call in RPC-SPOOLSS.

Guenther

14 years agos4-smbtorture: remove trailing whitespace from RPC-SPOOLSS.
Günther Deschner [Tue, 30 Jun 2009 09:38:41 +0000 (11:38 +0200)]
s4-smbtorture: remove trailing whitespace from RPC-SPOOLSS.

Guenther

14 years agoRework the kerberos-notes.txt in order and format
Don Davis [Tue, 30 Jun 2009 08:12:02 +0000 (18:12 +1000)]
Rework the kerberos-notes.txt in order and format

This reworks the notes file to be less stream-of-consciousness and more
task for porting, with a very particular focus on a potential port of
Samba4 to use MIT Kerberos.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agos4:ldb Allow rootdse module to build without ldb_private.h
Andrew Bartlett [Tue, 30 Jun 2009 05:30:13 +0000 (15:30 +1000)]
s4:ldb Allow rootdse module to build without ldb_private.h

It seems quite reasonable to allow modules to re-initialise the set of
cached DNs on the ldb context.

Andrew Bartlett

14 years agos4: dsdb Avoid using the internal ldb_private.h header
Andrew Bartlett [Tue, 30 Jun 2009 05:12:29 +0000 (15:12 +1000)]
s4: dsdb Avoid using the internal ldb_private.h header

This job is not complete (the partition module remains a unfinished
task), but now we do use the private ldb headers much less.

Andrew Bartlett

14 years agos4:heimdal Allow KRB5_NT_ENTERPRISE names in all DB lookups
Andrew Bartlett [Tue, 30 Jun 2009 02:11:14 +0000 (12:11 +1000)]
s4:heimdal Allow KRB5_NT_ENTERPRISE names in all DB lookups

The previous code only allowed an KRB5_NT_ENTERPRISE name (an e-mail
list user principal name) in an AS-REQ.  Evidence from the wild
(Win2k8 reportadely) indicates that this is instead valid for all
types of requests.

While this is now handled in heimdal/kdc/misc.c, a flag is now defined
in Heimdal's hdb so that we can take over this handling in future (once we start
using a system Heimdal, and if we find out there is more to be done
here).

Andrew Bartlett

14 years agos4:kdc Only get the lp_ctx once for a LDB_fetch()
Andrew Bartlett [Tue, 30 Jun 2009 02:06:38 +0000 (12:06 +1000)]
s4:kdc Only get the lp_ctx once for a LDB_fetch()

14 years agoRework hdb-samba4 to remove useless abstractions.
Andrew Bartlett [Tue, 30 Jun 2009 00:29:30 +0000 (10:29 +1000)]
Rework hdb-samba4 to remove useless abstractions.

The function LDB_lookup_principal() has been eliminated, and it's
contents spread back to it's callers.  Removing the abstraction makes
the code clearer.

Also ensure we never pass unescaped user input to a LDB search
function.

Andrew Bartlett

14 years agos4:dsdb Explain the parsing steps for userPrincipalName cracknames calls
Andrew Bartlett [Tue, 30 Jun 2009 00:19:19 +0000 (10:19 +1000)]
s4:dsdb Explain the parsing steps for userPrincipalName cracknames calls

14 years agos4-smbtorture: use torture_comment & torture_warning in RPC samr tests.
Günther Deschner [Mon, 29 Jun 2009 21:42:58 +0000 (23:42 +0200)]
s4-smbtorture: use torture_comment & torture_warning in RPC samr tests.

Guenther

14 years agos3:build: check for external liblua, link lua statically if using internal lib
Michael Adam [Mon, 29 Jun 2009 21:23:07 +0000 (23:23 +0200)]
s3:build: check for external liblua, link lua statically if using internal lib

So liblua is treated the same way as libtalloc and libtdb.

Michael

14 years agos4-smbtorture: correctly test comment behaviour in RPC-SAMR-USERS against s3.
Günther Deschner [Tue, 23 Jun 2009 22:24:03 +0000 (00:24 +0200)]
s4-smbtorture: correctly test comment behaviour in RPC-SAMR-USERS against s3.

Guenther

14 years agos3-pdb_tdb: give 'unknown_str' the proper name 'comment' and set comment in passdb.
Günther Deschner [Tue, 23 Jun 2009 22:23:09 +0000 (00:23 +0200)]
s3-pdb_tdb: give 'unknown_str' the proper name 'comment' and set comment in passdb.

pdb_{get,set}_comment were already existing in the API but were never used.

Guenther

14 years agos3:pdb_ads: we need to make the fd for tldap/tsocket non-blocking
Stefan Metzmacher [Mon, 29 Jun 2009 14:31:31 +0000 (16:31 +0200)]
s3:pdb_ads: we need to make the fd for tldap/tsocket non-blocking

metze

14 years agos3:fix build of old linux quota system and other unixes' quota implementation
Michael Adam [Mon, 29 Jun 2009 14:26:42 +0000 (16:26 +0200)]
s3:fix build of old linux quota system and other unixes' quota implementation

By fixing the use of struct stat_ex.

Michael

14 years agos3:lib/sysquotas: fix usage of SMB_STRUCT_STAT (struct stat_ex).
Michael Adam [Mon, 29 Jun 2009 14:11:13 +0000 (16:11 +0200)]
s3:lib/sysquotas: fix usage of SMB_STRUCT_STAT (struct stat_ex).

This fixes the build with quotas / configure time detection
of sys_quota interface.

Michael

14 years agolib/util: fix building tevent_ntstatus without config.h
Michael Adam [Mon, 29 Jun 2009 13:39:46 +0000 (15:39 +0200)]
lib/util: fix building tevent_ntstatus without config.h

(when called from places with "#define NO_CONFIG_H" set, such as configure)

 Michael

14 years agotsocket/bsd: also ask for TEVENT_FD_READ when we want to write into a stream socket
Stefan Metzmacher [Mon, 29 Jun 2009 11:13:05 +0000 (13:13 +0200)]
tsocket/bsd: also ask for TEVENT_FD_READ when we want to write into a stream socket

Otherwise we would not notice a broken connection.

metze

14 years agotsocket/bsd: more correctly check if the cached tevent_fd is still valid
Stefan Metzmacher [Mon, 29 Jun 2009 11:05:27 +0000 (13:05 +0200)]
tsocket/bsd: more correctly check if the cached tevent_fd is still valid

I some cases the pointer value of tevent_context is the same again,
if we do something like:

ev1 = tevent_context_init();
...
fde = tevent_add_fd(ev1, fd, TEVENT_FD_READ...);
...
talloc_free(ev1);
...
ev2 = tevent_context_init();

if (ev1 == ev2) {
/* this can happen! */
}

if (tevent_fd_get_flags(fde) == 0) {
/* this is always true */
}

But the "talloc_free(ev1)" will set fde->event_ctx to NULL
and tevent_fd_get_flags() will always return 0.

metze

14 years agos3-selftest: add RPC-SAMR-MACHINE-AUTH to list of test to run against s3.
Günther Deschner [Mon, 29 Jun 2009 12:34:49 +0000 (14:34 +0200)]
s3-selftest: add RPC-SAMR-MACHINE-AUTH to list of test to run against s3.

Guenther

14 years agos4-smbtorture: add RPC-SAMR-MACHINE-AUTH test.
Günther Deschner [Fri, 26 Jun 2009 14:53:51 +0000 (16:53 +0200)]
s4-smbtorture: add RPC-SAMR-MACHINE-AUTH test.

This test talks to a DC as a joined workstation member - in the same way
winbindd does, in particular the calls used in this test's query pattern
will all request for SEC_FLAG_MAXIMUM_ALLOWED access_mask
(which pretty much all of samba's client code does as well).

In fact this test verifies that winbind can correctly talk to a samba dc using
samr dcerpc calls.

Guenther

14 years agos4-smbtorture: add torture_suite_add_machine_workstation_rpc_iface_tcase.
Günther Deschner [Fri, 26 Jun 2009 14:51:53 +0000 (16:51 +0200)]
s4-smbtorture: add torture_suite_add_machine_workstation_rpc_iface_tcase.

Unlike torture_suite_add_machine_bdc_rpc_iface_tcase() which joins as a BDC
(ACB_SRVTRUST) this joins as a member workstation (ACB_WSTRUST).

Guenther

14 years agomount.cifs: don't pass text ro/rw options to kernel
Jeff Layton [Mon, 29 Jun 2009 10:16:38 +0000 (06:16 -0400)]
mount.cifs: don't pass text ro/rw options to kernel

/bin/mount strips off the ro/rw options after setting the MS_RDONLY
flag appropriately. Make mount.cifs do the same thing.

Signed-off-by: Jeff Layton <jlayton@samba.org>
14 years agoFix ndrdump to use a common setup_logging() API
Andrew Bartlett [Mon, 29 Jun 2009 10:12:23 +0000 (20:12 +1000)]
Fix ndrdump to use a common setup_logging() API

By adding a new common setup_logging_stdout() API, we no longer need to abuse the ABI compatability between the different setup_logging() calls in Samba3 and Samba4's DEBUG() subsystems.

The revert of 49a6d757b4d944cd22c91b2838beb83f04fbe1e9 works with this
to fix bug 6211.

Andrew Bartlett

14 years agoRevert "s4:debug: make setup_logging() a bit more compatible with samba3"
Andrew Bartlett [Mon, 29 Jun 2009 09:57:57 +0000 (19:57 +1000)]
Revert "s4:debug: make setup_logging() a bit more compatible with samba3"

The problem is that the enum was previously a 'rachet', that is, it
would only reset to a level higher than it was previouly set to.
Changing the order broke file-based logging for our production sites.

This reverts commit 49a6d757b4d944cd22c91b2838beb83f04fbe1e9.

14 years agoAdds the impersonation level in ntcreatex requests to SAMBA 3 misc torture test
Matthias Dieter Wallnöfer [Sat, 20 Jun 2009 20:47:19 +0000 (22:47 +0200)]
Adds the impersonation level in ntcreatex requests to SAMBA 3 misc torture test

Specifies the impersonation level according to the reporter commit in bug #6283

14 years agoFix bug 6514: net gives unhelpful "lp_load failed" when it's missing smb.conf
David Markey [Mon, 29 Jun 2009 06:12:03 +0000 (08:12 +0200)]
Fix bug 6514: net gives unhelpful "lp_load failed" when it's missing smb.conf

14 years agoCorrect some typos in the LDB partition module
Matthias Dieter Wallnöfer [Sat, 27 Jun 2009 12:16:19 +0000 (14:16 +0200)]
Correct some typos in the LDB partition module

14 years agoSAMDB: Don't check for "sAMAccountName" twice
Matthias Dieter Wallnöfer [Sat, 27 Jun 2009 11:38:38 +0000 (13:38 +0200)]
SAMDB: Don't check for "sAMAccountName" twice

14 years agoEnhancement of "simple ldap map" with "systemFlags" attribute
Matthias Dieter Wallnöfer [Tue, 23 Jun 2009 16:27:26 +0000 (18:27 +0200)]
Enhancement of "simple ldap map" with "systemFlags" attribute

Enhance the simple ldap map to support also the "systemFlags" attribute in the
correct way.

14 years agoldb: Properly handle NULL when copying attr lists.
Andrew Kroeger [Tue, 23 Jun 2009 12:26:17 +0000 (07:26 -0500)]
ldb: Properly handle NULL when copying attr lists.

When copying an attribute list, ensure the list itself is not NULL before
attempting to access elements of the list.

14 years agoCorrect the headers of some SAMBA 4 setup python scripts
Matthias Dieter Wallnöfer [Mon, 22 Jun 2009 18:51:43 +0000 (20:51 +0200)]
Correct the headers of some SAMBA 4 setup python scripts

14 years agoTwo patches which fix issues on cross compiling/building
Nathaniel McCallum [Mon, 22 Jun 2009 13:26:33 +0000 (15:26 +0200)]
Two patches which fix issues on cross compiling/building

14 years agoFixes for SAMBA3RPC torture test
Matthias Dieter Wallnöfer [Sun, 21 Jun 2009 17:07:02 +0000 (19:07 +0200)]
Fixes for SAMBA3RPC torture test

On calls where both NT_STATUS and WERROR results are returned and consulted
we have to make sure to form function results considering both.
This errors have been found through a run against SAMBA 4.

14 years agoSmall patch for SPOOLSS pipe
Matthias Dieter Wallnöfer [Sat, 20 Jun 2009 21:36:10 +0000 (23:36 +0200)]
Small patch for SPOOLSS pipe

Prevents a crash of the SAMBA 4 daemon on the torture SPOOLSS test due to not
initialised structures.

14 years ago_lsa_QueryInfoPolicy: Use symbolic info level names
Volker Lendecke [Sun, 28 Jun 2009 15:48:07 +0000 (17:48 +0200)]
_lsa_QueryInfoPolicy: Use symbolic info level names

14 years agoTurn the pdb_rid_algorithm into a capabilities call that returns flags
Volker Lendecke [Sun, 28 Jun 2009 15:36:12 +0000 (17:36 +0200)]
Turn the pdb_rid_algorithm into a capabilities call that returns flags

14 years agoMake pdb_ads survive a restart of Samba4
Volker Lendecke [Sun, 28 Jun 2009 13:30:08 +0000 (15:30 +0200)]
Make pdb_ads survive a restart of Samba4

The search function retries once, the modifying call that hits a dead smbd
returns an error. The next try will reconnect. This was simple to implement and
provides a good compromise against Samba4 idling our connection. Most of the
modifying calls are quickly after a search (like OpenUser) anyway.

14 years agoIf the connection is down, don't try another write.
Volker Lendecke [Sun, 28 Jun 2009 13:29:38 +0000 (15:29 +0200)]
If the connection is down, don't try another write.

14 years agoAdd tldap_search_va
Volker Lendecke [Sun, 28 Jun 2009 12:41:11 +0000 (14:41 +0200)]
Add tldap_search_va

14 years agotldap_msg_received: Properly free the asn1_struct in case of an error
Volker Lendecke [Sun, 28 Jun 2009 11:03:14 +0000 (13:03 +0200)]
tldap_msg_received: Properly free the asn1_struct in case of an error

14 years agoMove read_ldap_done after read_ldap_send
Volker Lendecke [Sat, 27 Jun 2009 18:03:55 +0000 (20:03 +0200)]
Move read_ldap_done after read_ldap_send

14 years agoConvert tldap to tstream
Volker Lendecke [Sat, 27 Jun 2009 16:14:25 +0000 (18:14 +0200)]
Convert tldap to tstream

14 years agoAdd tstream_read_packet
Volker Lendecke [Sat, 27 Jun 2009 15:21:19 +0000 (17:21 +0200)]
Add tstream_read_packet

14 years agoProperly free a downlevel readv request. Metze, please check
Volker Lendecke [Sat, 27 Jun 2009 18:04:37 +0000 (20:04 +0200)]
Properly free a downlevel readv request. Metze, please check

14 years agotldap: Don't fire off more than one read_ldap request during searches
Volker Lendecke [Sat, 27 Jun 2009 20:28:47 +0000 (22:28 +0200)]
tldap: Don't fire off more than one read_ldap request during searches

14 years agoStop listening for inotify data when there's none
Volker Lendecke [Sat, 27 Jun 2009 10:20:18 +0000 (12:20 +0200)]
Stop listening for inotify data when there's none

There have been some reports that we're flooding syslog with "No data on
inotify fd?!". I haven't been able to reproduce this yet. Until then, it is
better to just list this message once.

14 years agoFix some nonempty blank lines
Volker Lendecke [Sat, 27 Jun 2009 09:31:53 +0000 (11:31 +0200)]
Fix some nonempty blank lines

14 years agos3/lanman: Workaround for KB932762.
Volker Lendecke [Tue, 16 Jun 2009 09:51:11 +0000 (11:51 +0200)]
s3/lanman: Workaround for KB932762.

This addresses bug #6498.

14 years agoThe solaris linker seems to require an extra mention of dependent libs
Volker Lendecke [Fri, 26 Jun 2009 19:52:34 +0000 (21:52 +0200)]
The solaris linker seems to require an extra mention of dependent libs

14 years agoDon't use ads realm name for non-ads case. #6481
Jim McDonough [Fri, 26 Jun 2009 19:24:57 +0000 (15:24 -0400)]
Don't use ads realm name for non-ads case.  #6481

Also check that the connection to ads worked.

14 years agoFix some dead code warnings from SUN Studio
Volker Lendecke [Fri, 26 Jun 2009 15:38:58 +0000 (17:38 +0200)]
Fix some dead code warnings from SUN Studio

14 years agoFix a typo in a comment
Volker Lendecke [Fri, 26 Jun 2009 14:45:25 +0000 (16:45 +0200)]
Fix a typo in a comment

14 years agoUpgrade ntvfs_map_*info to ntvfs_map_async_setup/ntvfs_map_async_finish
Sam Liddicott [Fri, 26 Jun 2009 11:31:19 +0000 (12:31 +0100)]
Upgrade ntvfs_map_*info to ntvfs_map_async_setup/ntvfs_map_async_finish

ntvfs_map_fsinfo, ntvfs_map_qpathinfo, ntvfs_map_qfileinfo used an
old synchronous mapping technique, acceptable on the grounds that
they were only used by the simple vfs which was synchronous.

Other vfs may/do use these functions, and by upgrading them to use the
ntvfs_map_async_setup/ntvfs_map_async_finish framework, they can now be
used asynchronously.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
14 years agos3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().
Michael Adam [Fri, 26 Jun 2009 12:09:10 +0000 (14:09 +0200)]
s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().

With the previous code, the cache can never have been hit at all.

Michael

14 years agos3-vlp: drastically shrink size and dependencies of the virtual line printer.
Günther Deschner [Thu, 25 Jun 2009 15:43:28 +0000 (17:43 +0200)]
s3-vlp: drastically shrink size and dependencies of the virtual line printer.

This gets vlp from 13M down to 214K on my box.

Guenther