kai/samba.git
6 years agos3: Factor out parse_newest_in_marshall_buffer from pull_newest_from_marshall_buffer
Volker Lendecke [Mon, 12 Nov 2012 11:13:39 +0000 (12:13 +0100)]
s3: Factor out parse_newest_in_marshall_buffer from pull_newest_from_marshall_buffer

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: reduce db_ctdb_marshall_loop_next to specialized db_ctdb_marshall_buf_parse
Volker Lendecke [Sat, 10 Nov 2012 14:03:35 +0000 (15:03 +0100)]
s3: reduce db_ctdb_marshall_loop_next to specialized db_ctdb_marshall_buf_parse

now that the db_ctdb_marshall_loop_next_key has been factored out.

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Factor out db_ctdb_marshall_loop_next_key from db_ctdb_marshall_loop_next
Volker Lendecke [Sat, 10 Nov 2012 13:46:10 +0000 (14:46 +0100)]
s3: Factor out db_ctdb_marshall_loop_next_key from db_ctdb_marshall_loop_next

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Slightly simplify db_ctdb_marshall_loop_next
Volker Lendecke [Sat, 10 Nov 2012 13:42:21 +0000 (14:42 +0100)]
s3: Slightly simplify db_ctdb_marshall_loop_next

Both callers give a key argument

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Use db_ctdb_ltdb_parse in db_ctdb_fetch_db_seqnum_from_db
Volker Lendecke [Thu, 8 Nov 2012 11:00:11 +0000 (12:00 +0100)]
s3: Use db_ctdb_ltdb_parse in db_ctdb_fetch_db_seqnum_from_db

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Use db_ctdb_ltdb_parse in db_ctdb_ltdb_fetch
Volker Lendecke [Thu, 8 Nov 2012 10:52:43 +0000 (11:52 +0100)]
s3: Use db_ctdb_ltdb_parse in db_ctdb_ltdb_fetch

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Add db_ctdb_ltdb_parse
Volker Lendecke [Thu, 8 Nov 2012 10:37:30 +0000 (11:37 +0100)]
s3: Add db_ctdb_ltdb_parse

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Slightly simplify db_ctdb_transaction_commit
Volker Lendecke [Wed, 7 Nov 2012 15:39:16 +0000 (16:39 +0100)]
s3: Slightly simplify db_ctdb_transaction_commit

Avoid an unnecessary "else".

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Remove header==NULL code from db_ctdb_marshall_record
Volker Lendecke [Wed, 7 Nov 2012 15:25:31 +0000 (16:25 +0100)]
s3: Remove header==NULL code from db_ctdb_marshall_record

The only call chain (via db_ctdb_marshall_add) has header != NULL

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: test dbwrap_ctdb
Volker Lendecke [Wed, 7 Nov 2012 20:24:27 +0000 (21:24 +0100)]
s3: test dbwrap_ctdb

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agodbwrap: Use dbwrap_parse_record in dbwrap_fetch_uint32_bystring
Volker Lendecke [Thu, 8 Nov 2012 13:15:25 +0000 (14:15 +0100)]
dbwrap: Use dbwrap_parse_record in dbwrap_fetch_uint32_bystring

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agodocs: man oLschema2ldif: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:15:49 +0000 (10:15 +0100)]
docs: man oLschema2ldif: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 29 15:27:45 CET 2012 on sn-devel-104

6 years agodocs: man ntlm_auth4: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:15:07 +0000 (10:15 +0100)]
docs: man ntlm_auth4: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man smbtorture: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:14:15 +0000 (10:14 +0100)]
docs: man smbtorture: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man masktest: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:09:07 +0000 (10:09 +0100)]
docs: man masktest: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man locktest: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:04:43 +0000 (10:04 +0100)]
docs: man locktest: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man gentest: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:04:26 +0000 (10:04 +0100)]
docs: man gentest: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man 8 samba: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:03:52 +0000 (10:03 +0100)]
docs: man 8 samba: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man regtree: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:03:19 +0000 (10:03 +0100)]
docs: man regtree: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man regshell: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:02:51 +0000 (10:02 +0100)]
docs: man regshell: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man regpatch: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:02:30 +0000 (10:02 +0100)]
docs: man regpatch: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man regdiff: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:02:12 +0000 (10:02 +0100)]
docs: man regdiff: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ndrdump: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:01:39 +0000 (10:01 +0100)]
docs: man ndrdump: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man tdbtool: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:01:06 +0000 (10:01 +0100)]
docs: man tdbtool: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man talloc: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:00:45 +0000 (10:00 +0100)]
docs: man talloc: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldbsearch: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 09:00:10 +0000 (10:00 +0100)]
docs: man ldbsearch: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldbrename: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 08:59:52 +0000 (09:59 +0100)]
docs: man ldbrename: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldbmodify: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 08:59:32 +0000 (09:59 +0100)]
docs: man ldbmodify: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldbedit: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 08:59:15 +0000 (09:59 +0100)]
docs: man ldbedit: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldbdel: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 08:58:52 +0000 (09:58 +0100)]
docs: man ldbdel: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldbadd: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 08:58:23 +0000 (09:58 +0100)]
docs: man ldbadd: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: man ldb.3: Add missing meta data.
Karolin Seeger [Thu, 29 Nov 2012 08:56:25 +0000 (09:56 +0100)]
docs: man ldb.3: Add missing meta data.

This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-printing: add missing carriage return to debug str
David Disseldorp [Tue, 27 Nov 2012 13:39:41 +0000 (14:39 +0100)]
s3-printing: add missing carriage return to debug str

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agorpcclient: fix usage docs for rpcclient adddriver
David Disseldorp [Thu, 29 Nov 2012 11:22:48 +0000 (12:22 +0100)]
rpcclient: fix usage docs for rpcclient adddriver

The printer driver name is incorrectly referred to as the printer name.

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoselftest: configure printer with default devmode = no
David Disseldorp [Thu, 29 Nov 2012 11:10:45 +0000 (12:10 +0100)]
selftest: configure printer with default devmode = no

This allows us to reproduce the segfault described in bug 9433.

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agospoolss: fix segfault when "default devmode" is disabled
David Disseldorp [Tue, 27 Nov 2012 15:10:28 +0000 (16:10 +0100)]
spoolss: fix segfault when "default devmode" is disabled

Currently when "default devmode" is explicitly disabled, and a printer
is added with a null device mode, spoolssd crashes in copy_devicemode().

Both construct_printer_info2() and construct_printer_info8() code paths
currently unconditionally attempt to copy a printers device mode,
without checking whether one is present.

This change fixes this regression such that construct_printer_info*()
functions check for a null device mode before copying.

https://bugzilla.samba.org/show_bug.cgi?id=9433

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 29 13:03:05 CET 2012 on sn-devel-104

6 years agodocs: Rename man ntlm_auth.
Karolin Seeger [Wed, 28 Nov 2012 11:46:31 +0000 (12:46 +0100)]
docs: Rename man ntlm_auth.

Rename man ntlm_auth to ntlm_auth4.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 28 20:41:48 CET 2012 on sn-devel-104

6 years agos3: Use dbwrap_parse_record in fetch_share_mode_unlocked
Volker Lendecke [Tue, 27 Nov 2012 14:40:06 +0000 (15:40 +0100)]
s3: Use dbwrap_parse_record in fetch_share_mode_unlocked

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoBUG 9436: Fix leaking sockets of SMB connections to a DC.
Andreas Schneider [Wed, 28 Nov 2012 11:53:39 +0000 (12:53 +0100)]
BUG 9436: Fix leaking sockets of SMB connections to a DC.

As this is a burst of 3 unbound sockets with each try to reach a DC
we're running out of file descriptors pretty fast. So winbind is then
mostly spinning in an accept loop failing with EMFILE.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Wed Nov 28 17:17:21 CET 2012 on sn-devel-104

6 years agos3:vfs_gpfs: add no memory check in gpfs2smb_acl()
Stefan Metzmacher [Wed, 28 Nov 2012 10:44:58 +0000 (11:44 +0100)]
s3:vfs_gpfs: add no memory check in gpfs2smb_acl()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov 28 14:06:27 CET 2012 on sn-devel-104

6 years agos3:vfs_gpfs: make sure we return the correct errno in gpfs2smb_acl()
Stefan Metzmacher [Wed, 28 Nov 2012 10:44:15 +0000 (11:44 +0100)]
s3:vfs_gpfs: make sure we return the correct errno in gpfs2smb_acl()

TALLOC_FREE() could overwrite errno.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos4:smbd/open: add missing TALLOC_FREE(frame) to inherit_new_acl()
Stefan Metzmacher [Wed, 28 Nov 2012 10:38:13 +0000 (11:38 +0100)]
s4:smbd/open: add missing TALLOC_FREE(frame) to inherit_new_acl()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3:vfs_aixacl2: make use of vfs_aixacl_util.h
Stefan Metzmacher [Wed, 28 Nov 2012 10:21:51 +0000 (11:21 +0100)]
s3:vfs_aixacl2: make use of vfs_aixacl_util.h

This should fix the build.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3: Open gencache_notrans with TDB_NOSYNC
Volker Lendecke [Tue, 20 Nov 2012 09:02:07 +0000 (10:02 +0100)]
s3: Open gencache_notrans with TDB_NOSYNC

We are doing CLEAR_IF_FIRST here, and we are doing the transactions only to
protect gencache_stabilize against concurrent writers. tdb's transaction.c
says:

  - if TDB_NOSYNC is passed to flags in tdb_open then transactions are
    still available, but no fsync/msync calls are made.  This means we
    are still proof against a process dying during transaction commit,
    but not against machine reboot.

For gencache_notrans.tdb this is exactly what we want and avoids some expensive
disk syncs.

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 28 03:13:56 CET 2012 on sn-devel-104

6 years agos3: Avoid some transaction_commit on gencache.tdb
Volker Lendecke [Tue, 20 Nov 2012 08:50:57 +0000 (09:50 +0100)]
s3: Avoid some transaction_commit on gencache.tdb

Commits are expensive, and in some scenarios we are overwriting existing values
again and again.

Reviewed by: Jeremy Allison <jra@samba.org>

6 years agodocs: Add some binaries to the "SEE ALSO" section
Karolin Seeger [Tue, 27 Nov 2012 10:46:38 +0000 (11:46 +0100)]
docs: Add some binaries to the "SEE ALSO" section

of man smb.conf.

Karolin

Reviewed by: Jeremy Allison <jra@samba.org>

6 years agodocs: Fix version in man smb.conf.
Karolin Seeger [Tue, 27 Nov 2012 10:29:26 +0000 (11:29 +0100)]
docs: Fix version in man smb.conf.

Karolin

Reviewed by: Jeremy Allison <jra@samba.org>

6 years agos3: Fix bug 9428 -- inotify detection broken
Volker Lendecke [Sat, 24 Nov 2012 10:39:02 +0000 (11:39 +0100)]
s3: Fix bug 9428 -- inotify detection broken

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 27 01:20:24 CET 2012 on sn-devel-104

6 years agos3: Do not free a string where we should not
Volker Lendecke [Sun, 25 Nov 2012 14:19:32 +0000 (14:19 +0000)]
s3: Do not free a string where we should not

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 26 22:03:05 CET 2012 on sn-devel-104

6 years agos3: Do not free a string where we should not
Volker Lendecke [Sun, 25 Nov 2012 14:19:32 +0000 (14:19 +0000)]
s3: Do not free a string where we should not

Reviewed by: Jeremy Allison <jra@samba.org>

6 years agos3: Fix Coverity ID 741407 -- resource leak
Volker Lendecke [Sun, 25 Nov 2012 09:19:23 +0000 (10:19 +0100)]
s3: Fix Coverity ID 741407 -- resource leak

Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Nov 26 19:20:05 CET 2012 on sn-devel-104

6 years agos3-rpc_client: try to use socket_addr if available in rpc_pipe_open_tcp() (bug #9426)
Günther Deschner [Fri, 23 Nov 2012 17:15:30 +0000 (18:15 +0100)]
s3-rpc_client: try to use socket_addr if available in rpc_pipe_open_tcp() (bug #9426)

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Nov 26 17:36:20 CET 2012 on sn-devel-104

6 years agos4:torture/rpc/handles: try to make all assoc_group tests less flakey
Stefan Metzmacher [Sat, 24 Nov 2012 10:28:57 +0000 (11:28 +0100)]
s4:torture/rpc/handles: try to make all assoc_group tests less flakey

Just incrementing the assoc_group_id makes it too likely to hit
a number that is already in use.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Nov 26 13:53:22 CET 2012 on sn-devel-104

6 years agoconfigure(waf): Fail "configure --with-ads" if ads support is not available
Michael Adam [Fri, 23 Nov 2012 11:21:49 +0000 (12:21 +0100)]
configure(waf):  Fail "configure --with-ads" if ads support is not available

Fix for bug #9350

This establishes the "auto" mode as default for ads-support, when
neither "--with-ads" nor "--without-ads" is specified for configure.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Nov 23 19:34:55 CET 2012 on sn-devel-104

6 years agos3-rpc_client: lookup nametype 0x20 in rpc_pipe_open_tcp_port(). (bug #9426)
Günther Deschner [Fri, 23 Nov 2012 12:19:53 +0000 (13:19 +0100)]
s3-rpc_client: lookup nametype 0x20 in rpc_pipe_open_tcp_port(). (bug #9426)

The server name type (0x20) is much more likely to be available in the name cache, as
this type gets stored by winbind itself - the primary user of the ncacn_ip_tcp
code currently.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Nov 23 16:30:57 CET 2012 on sn-devel-104

6 years agoFix MD5 detection in the autoconf build
Matthieu Patou [Wed, 21 Nov 2012 20:07:42 +0000 (12:07 -0800)]
Fix MD5 detection in the autoconf build

This is a front port of patches made in 3.6.x branch for bugs:
* 9037
* 9086
* 9094
* 9418

It checks if there is a library for md5 related functions (libmd or
libmd5) and if so it checks for the presence of md5.h headers it also
respect the need for osX build to not use samba's md5 implementation as
it's already present in the system libs.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Nov 23 10:05:34 CET 2012 on sn-devel-104

6 years agoweb_server: Load SWAT if it is available.
Jelmer Vernooij [Thu, 22 Nov 2012 00:47:00 +0000 (00:47 +0000)]
web_server: Load SWAT if it is available.

Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Fri Nov 23 01:39:38 CET 2012 on sn-devel-104

6 years agoweb_server: the web server is not multi-process, indicate so in WSGI.
Jelmer Vernooij [Thu, 22 Nov 2012 00:46:59 +0000 (00:46 +0000)]
web_server: the web server is not multi-process, indicate so in WSGI.

This is a requirement for some of the paster middleware used by SWAT2.

Reviewed-by: Matthieu Patou <mat@matws.net>
6 years agoweb_server: Properly decrement reference counters for python objects in wsgi.
Jelmer Vernooij [Thu, 22 Nov 2012 00:46:58 +0000 (00:46 +0000)]
web_server: Properly decrement reference counters for python objects in wsgi.

Reviewed-by: Matthieu Patou <mat@matws.net>
6 years agoweb_server: Properly set SCRIPT_NAME and PATH_INFO.
Jelmer Vernooij [Thu, 22 Nov 2012 00:46:57 +0000 (00:46 +0000)]
web_server: Properly set SCRIPT_NAME and PATH_INFO.

Reviewed-by: Matthieu Patou <mat@matws.net>
6 years agoweb_server: Create a string object for SERVER_PORT variable.
Jelmer Vernooij [Thu, 22 Nov 2012 00:46:56 +0000 (00:46 +0000)]
web_server: Create a string object for SERVER_PORT variable.

This matches the behaviour of other wsgi server implementations.

Reviewed-by: Matthieu Patou <mat@matws.net>
6 years agoweb_server/wsgi: Don't segfault when wsgi app doesn't return iterable.
Jelmer Vernooij [Thu, 22 Nov 2012 00:46:55 +0000 (00:46 +0000)]
web_server/wsgi: Don't segfault when wsgi app doesn't return iterable.

There is a bug in the application if this happens, but invalid Python
code shouldn't cause segfaults.

Reviewed-by: Matthieu Patou <mat@matws.net>
6 years agobuild: Do not install testing binaries
Andrew Bartlett [Wed, 21 Nov 2012 09:20:46 +0000 (20:20 +1100)]
build: Do not install testing binaries

These binaries are for developer or selftest use, and are not
supported for installation onto the system.  The autoconf build does
not install these binaries, and so neither should the waf build.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 22 12:00:36 CET 2012 on sn-devel-104

6 years agopackaging: Remove long-gone --disable-merged-build from RHEL-CTDB packaging
Andrew Bartlett [Wed, 21 Nov 2012 08:52:50 +0000 (19:52 +1100)]
packaging: Remove long-gone --disable-merged-build from RHEL-CTDB packaging

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agobuild: Remove --enable-smbtorture, require bin/smbtorture (from waf) for make test
Andrew Bartlett [Wed, 21 Nov 2012 06:52:35 +0000 (17:52 +1100)]
build: Remove --enable-smbtorture, require bin/smbtorture (from waf) for make test

This simply moves this to being a side-effect of --enable-selftest.

The flag was renamed from --enable-smbtorture4 in a recent patch.

Make test now relies on smbtorture4, and so this code to make the dependency
optional for the tests is not required any more.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agobuild: Be consistent with the name of smbtorture binaries
Andrew Bartlett [Wed, 21 Nov 2012 05:32:38 +0000 (16:32 +1100)]
build: Be consistent with the name of smbtorture binaries

This ensures that in both build systems, smbtorture3 is the source3 binary, and
smbtoture is our main smbtorture binary, built with waf.

Also included in this is the removal of bin/ndrdump4 as a special case.

This removes the last cases of binaries with different names in
each build system.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agotorture: remove source3 locktest and masktest
Andrew Bartlett [Wed, 21 Nov 2012 05:00:53 +0000 (16:00 +1100)]
torture: remove source3 locktest and masktest

We now just build these in waf, using the source4/torture code.

The source4 versions of these are tested in make test.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agobuild: Use ntlm_auth from source3 as the only ntlm_auth installed on the system
Andrew Bartlett [Wed, 21 Nov 2012 04:34:43 +0000 (15:34 +1100)]
build: Use ntlm_auth from source3 as the only ntlm_auth installed on the system

The ntlm_auth4 binary is untested, and is missing major features compared with
the source3 binary.  The two are being slowly merged, but I have not finished
that.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agolib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets this
Andrew Bartlett [Mon, 19 Nov 2012 12:25:45 +0000 (23:25 +1100)]
lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets this

Currently, we put strerror_r into libreplace even on systems with strerror_r.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos4/web_server: Fix typo in URL.
Jelmer Vernooij [Wed, 21 Nov 2012 22:56:57 +0000 (22:56 +0000)]
s4/web_server: Fix typo in URL.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Thu Nov 22 01:37:02 CET 2012 on sn-devel-104

6 years agos3:smbd/aio do not mark file modified during reads
Christian Ambach [Tue, 20 Nov 2012 13:24:13 +0000 (14:24 +0100)]
s3:smbd/aio do not mark file modified during reads

this causes each file that is potentially just opened for reading to be
marked as modified and lots of file change notifications will be send

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Tue Nov 20 21:02:34 CET 2012 on sn-devel-104

6 years agos3: Fix some blank line endings
Volker Lendecke [Wed, 7 Nov 2012 15:22:07 +0000 (16:22 +0100)]
s3: Fix some blank line endings

Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Nov 20 19:18:33 CET 2012 on sn-devel-104

6 years agolibrpc/idl: teach ndrdump about dumping security.idl structures
Stefan Metzmacher [Tue, 13 Nov 2012 08:34:43 +0000 (09:34 +0100)]
librpc/idl: teach ndrdump about dumping security.idl structures

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3:librpc: add support for PFC_FLAG_OBJECT_UUID when parsing packets (bug #9382)
Stefan Metzmacher [Mon, 12 Nov 2012 09:16:50 +0000 (10:16 +0100)]
s3:librpc: add support for PFC_FLAG_OBJECT_UUID when parsing packets (bug #9382)

Now the logic matches the one in dcerpc_read_ncacn_packet_done().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos4:torture/rpc/handles: try to make the assoc_group test less flakey
Stefan Metzmacher [Wed, 14 Nov 2012 07:45:10 +0000 (08:45 +0100)]
s4:torture/rpc/handles: try to make the assoc_group test less flakey

Just incrementing the assoc_group_id makes it too likely to hit
a number that is already in use.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos4:torture/rpc/handles: move a torture_comment()
Stefan Metzmacher [Tue, 20 Nov 2012 13:13:16 +0000 (14:13 +0100)]
s4:torture/rpc/handles: move a torture_comment()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3:param: set "map archive = no" in ROLE_ACTIVE_DIRECTORY_DC
Stefan Metzmacher [Tue, 20 Nov 2012 12:50:46 +0000 (13:50 +0100)]
s3:param: set "map archive = no" in ROLE_ACTIVE_DIRECTORY_DC

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoexamples: fix build on AIX6
Christian Ambach [Tue, 20 Nov 2012 08:50:15 +0000 (09:50 +0100)]
examples: fix build on AIX6

Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 20 16:06:59 CET 2012 on sn-devel-104

6 years agobuild(waf): fix a typo
Christian Ambach [Tue, 20 Nov 2012 08:49:46 +0000 (09:49 +0100)]
build(waf): fix a typo

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 20 11:54:51 CET 2012 on sn-devel-104

6 years agoMore for #9374 - Allow smb2.acls torture test to pass against smbd with a POSIX ACLs...
Jeremy Allison [Wed, 14 Nov 2012 22:40:51 +0000 (14:40 -0800)]
More for #9374 - Allow smb2.acls torture test to pass against smbd with a POSIX ACLs backend.

Change can_delete_directory() to can_delete_directory_fsp(), as
we only ever call this from an open directory file handle.

This allows us to use OpenDir_fsp() instead of OpenDir().
OpenDir() re-checks the ACL on the directory, which may
refuse DIR_LIST permissions. OpenDir_fsp() does not. As
this is a file-server internal check to see if the directory
actually contains any files before setting delete on close,
we can ignore the ACL here (Windows does).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Nov 20 01:46:28 CET 2012 on sn-devel-104

6 years agoAdd comments explaining exactly *why* we don't check FILE_READ_ATTRIBUTES when evalua...
Jeremy Allison [Wed, 14 Nov 2012 22:40:50 +0000 (14:40 -0800)]
Add comments explaining exactly *why* we don't check FILE_READ_ATTRIBUTES when evaluating file/directory ACE's.

If we can access the path to this file, by
default we have FILE_READ_ATTRIBUTES from the
containing directory. See the section.
"Algorithm to Check Access to an Existing File"
in MS-FSA.pdf.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3:modules:nfs4_acls remove unused mem_ctx parameter to smbacl4_fill_ace4
Christian Ambach [Mon, 5 Nov 2012 17:49:54 +0000 (18:49 +0100)]
s3:modules:nfs4_acls remove unused mem_ctx parameter to smbacl4_fill_ace4

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Nov 17 01:11:07 CET 2012 on sn-devel-104

6 years agos3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl
Christian Ambach [Mon, 5 Nov 2012 17:47:01 +0000 (18:47 +0100)]
s3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl

the ACEs should be talloc children of the ACL itself and not be placed on talloc_tos()

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:vfs_gpfs fix a memory leak in gpfsacl_get_posix_acl
Christian Ambach [Fri, 2 Nov 2012 07:41:40 +0000 (08:41 +0100)]
s3:vfs_gpfs fix a memory leak in gpfsacl_get_posix_acl

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:vfs_gpfs fix memory corruption in gpfs2smb_acl
Christian Ambach [Fri, 2 Nov 2012 07:41:10 +0000 (08:41 +0100)]
s3:vfs_gpfs fix memory corruption in gpfs2smb_acl

sys_acl_init returns a SMB_ACL_T with zero entries in the acl array
reallocate the array to proper size before filling it, otherwise we overwrite memory

This one is a result of a improper fixing in 7a6182962966e5edb42728c8

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:vfs_gpfs fix memory leak in gpfs_get_nfs4_acl
Christian Ambach [Fri, 2 Nov 2012 07:39:45 +0000 (08:39 +0100)]
s3:vfs_gpfs fix memory leak in gpfs_get_nfs4_acl

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:vfs_gpfs fix memory leaks in gpfs_getacl_alloc
Christian Ambach [Fri, 2 Nov 2012 07:39:17 +0000 (08:39 +0100)]
s3:vfs_gpfs fix memory leaks in gpfs_getacl_alloc

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool dns: Don't use "localhost" to connect to local host
Kai Blin [Wed, 14 Nov 2012 10:32:06 +0000 (11:32 +0100)]
samba-tool dns: Don't use "localhost" to connect to local host

Calling "samba-tool dns <cmd> localhost" provokes a stacktrace.

This just makes 'samba-tool dns <cmd> localhost' work and doesn't fix
the underlying issue, but I don't see it causing any harm (unless you
don't have an ipv4 localhost, I guess).

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Nov 16 13:18:14 CET 2012 on sn-devel-104

6 years agoutils: Remove unused samba-dig tool
Kai Blin [Fri, 16 Nov 2012 08:59:53 +0000 (09:59 +0100)]
utils: Remove unused samba-dig tool

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agodsdb: Make secrets_tdb_sync cope with -H secrets.ldb
Andrew Bartlett [Wed, 12 Sep 2012 13:34:29 +0000 (15:34 +0200)]
dsdb: Make secrets_tdb_sync cope with -H secrets.ldb

The issue was, without a / in the path, we did not cope.

Andrew Bartlett
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos3:param: make init_locals() static.
Michael Adam [Fri, 16 Nov 2012 00:00:21 +0000 (01:00 +0100)]
s3:param: make init_locals() static.

it is only used in loadparm.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Nov 16 03:33:34 CET 2012 on sn-devel-104

6 years agos3-param: Handle setting default AD DC per-share settings in init_locals()
Andrew Bartlett [Thu, 15 Nov 2012 23:30:44 +0000 (10:30 +1100)]
s3-param: Handle setting default AD DC per-share settings in init_locals()

This function is helpfully called between when we finish processing
the globals and when we start processing the individual shares.  This
means that the "vfs objects" and other per-share settings we specify
here become the defaults for (eg) [netlogon] and [sysvol] but the
admin can override these on a per-share basis or (as we must in make
test) for the whole server.

This broke setting and fetching of group policy objects from Windows
clients, since this setting was moved from fileserver.conf in
8518dd6406c0132dfd8c44e084c2b39792974f2c, and wasn't found in 'make
test' because we have to override the vfs objects to insert the
xattr_tdb and fake_acl modules.

Andrew Bartlett

Reviewed-by: Michael Adam <obnox@samba.org>
6 years agos4:samba-tool: Fix samba-tool fsmo --role=schema
Arvid Requate [Wed, 14 Nov 2012 14:51:19 +0000 (15:51 +0100)]
s4:samba-tool: Fix samba-tool fsmo --role=schema

Fix traceback:
samba-tool fsmo --role=schema --force
ERROR(<type 'exceptions.TypeError'>): uncaught exception - argument 2 must be string, not ldb.Dn
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/__init__.py", line 168, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/fsmo.py", line 160, in run
    self.seize_role(role, samdb, force)
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/fsmo.py", line 119, in seize_role
    m.dn = ldb.Dn(samdb, self.schema_dn)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Nov 16 00:40:24 CET 2012 on sn-devel-104

6 years agosamba-tool: Add new samba-tool gpo aclcheck and test
Andrew Bartlett [Mon, 5 Nov 2012 08:36:28 +0000 (19:36 +1100)]
samba-tool: Add new samba-tool gpo aclcheck and test

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
6 years agoAnother fix needed for bug #9236 - ACL masks incorrectly applied when setting ACLs.
Jeremy Allison [Tue, 13 Nov 2012 19:22:15 +0000 (11:22 -0800)]
Another fix needed for bug #9236 - ACL masks incorrectly applied when setting ACLs.

Not caught by make test as it's an extreme edge case for strange
incoming ACLs. I only found this as I'm making raw.acls and smb2.acls
pass against 3.6.x and 4.0.0 with acl_xattr mapped onto a POSIX backend.

An incoming inheritable ACE entry containing only one permission,
WRITE_DATA maps into a POSIX owner perm of "-w-", which violates
the principle that the owner of a file/directory can always read.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov 15 19:52:52 CET 2012 on sn-devel-104

6 years agopopt_common: Fix typos.
Karolin Seeger [Wed, 14 Nov 2012 10:40:27 +0000 (11:40 +0100)]
popt_common: Fix typos.

Karolin

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 15 01:31:50 CET 2012 on sn-devel-104

6 years agolib/replace: replace all *printf function if we replace snprintf (bug #9390)
Stefan Metzmacher [Tue, 13 Nov 2012 13:07:11 +0000 (14:07 +0100)]
lib/replace: replace all *printf function if we replace snprintf (bug #9390)

This fixes segfaults in log level = 10 on Solaris.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Nov 14 19:41:14 CET 2012 on sn-devel-104

6 years agosubunit: Update to latest upstream version.
Jelmer Vernooij [Wed, 14 Nov 2012 08:47:16 +0000 (09:47 +0100)]
subunit: Update to latest upstream version.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Nov 14 12:11:58 CET 2012 on sn-devel-104

6 years agotesttools: Update to latest version.
Jelmer Vernooij [Wed, 14 Nov 2012 08:46:53 +0000 (09:46 +0100)]
testtools: Update to latest version.

6 years agosmbd_open_one_socket does not use the messaging_context variable so why pass it in?
Richard Sharpe [Tue, 13 Nov 2012 21:53:35 +0000 (13:53 -0800)]
smbd_open_one_socket does not use the messaging_context variable so why pass it in?

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 14 02:19:46 CET 2012 on sn-devel-104