metze/samba/wip.git
11 years agosamba-tool user test: Fix expected output.
Jelmer Vernooij [Fri, 19 Oct 2012 07:53:02 +0000 (09:53 +0200)]
samba-tool user test: Fix expected output.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Fri Oct 19 11:37:44 CEST 2012 on sn-devel-104
(cherry picked from commit e3a48bb5f65bf9f5b77df010dcb75fcc9721cf3b)

11 years agoselftest: Move more tests to common list script.
Jelmer Vernooij [Fri, 5 Oct 2012 09:51:37 +0000 (11:51 +0200)]
selftest: Move more tests to common list script.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Fri Oct 12 02:06:42 CEST 2012 on sn-devel-104
(cherry picked from commit ff82afb1f8ad3cf950277487aff05d442d03c969)

11 years agosamba.join: Fix multiple spaces.
Jelmer Vernooij [Thu, 11 Oct 2012 15:23:13 +0000 (17:23 +0200)]
samba.join: Fix multiple spaces.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Thu Oct 11 20:30:43 CEST 2012 on sn-devel-104
(cherry picked from commit 21b58b5eacb67b4dee6e7efe90bd529bbfd6ef77)

11 years agoselftest: Move some tests to common test script. (cherry picked from commit 1aa291c33...
Jelmer Vernooij [Fri, 5 Oct 2012 09:46:25 +0000 (11:46 +0200)]
selftest: Move some tests to common test script. (cherry picked from commit 1aa291c331c29c2f5ee4572b660c4c2061755856)

11 years agoselftests.tests: Remove reference to Samba 4. (cherry picked from commit 1080b6c2caf1...
Jelmer Vernooij [Fri, 5 Oct 2012 09:39:34 +0000 (11:39 +0200)]
selftests.tests: Remove reference to Samba 4. (cherry picked from commit 1080b6c2caf1191fd896f3caf38e576a00b01982)

11 years agosamba4-tests: Move 'samba.tests.source' up.
Jelmer Vernooij [Thu, 27 Sep 2012 16:41:32 +0000 (09:41 -0700)]
samba4-tests: Move 'samba.tests.source' up.

We would like to run this as early as possible so we get a quick
failure when there is trailing whitespace.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Thu Sep 27 20:26:27 CEST 2012 on sn-devel-104
(cherry picked from commit b7822a55c40c5c42356b263c3d7bc1998fb1a7d3)

11 years agosamba.provision.sambadns: Use == to compare strings, not 'is'. (cherry picked from...
Jelmer Vernooij [Thu, 11 Oct 2012 15:11:44 +0000 (17:11 +0200)]
samba.provision.sambadns: Use == to compare strings, not 'is'. (cherry picked from commit 2adf27a99b999a4fd0329d9fa398a9208b60e367)

11 years agowafsamba: Ignore some more symbols when checking for dupes. (cherry picked from commi...
Jelmer Vernooij [Thu, 11 Oct 2012 12:39:50 +0000 (14:39 +0200)]
wafsamba: Ignore some more symbols when checking for dupes. (cherry picked from commit 276460cf8afb4894fe1e980c7a75e866c14ba144)

11 years agoFix bug #9329 - Directory listing with SeBackup can crash smbd.
Jeremy Allison [Fri, 26 Oct 2012 00:07:29 +0000 (17:07 -0700)]
Fix bug #9329 - Directory listing with SeBackup can crash smbd.

When we do a become_root()/unbecome_root() pair to temporarily
raise privilege, this NULLs out the NT token. If we're within
a become_root()/unbecome_root() pair then return the previous
token on the stack as our NT token. This is what we should be
using to check against NT ACLs in the file server. This copes
with security context changing when removing a file on close
under the context of another user (when 2 users have a file
open, one sets delete on close and then the other user has
to actually do the delete).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
11 years agoWHATSNEW: Update changes since rc3.
Karolin Seeger [Mon, 29 Oct 2012 11:43:43 +0000 (12:43 +0100)]
WHATSNEW: Update changes since rc3.

Karolin

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Oct 29 15:06:00 CET 2012 on sn-devel-104

11 years agodocs-xml:smbd.8: document new smbXsrv_*_global.tdb files
Stefan Metzmacher [Thu, 18 Oct 2012 13:35:39 +0000 (15:35 +0200)]
docs-xml:smbd.8: document new smbXsrv_*_global.tdb files

metze

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Oct 19 14:00:39 CEST 2012 on sn-devel-104
(cherry picked from commit 81d0b8aebf8e7dee73907fabf408f0b2c3145207)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
The last 39 patches address bug 9304 - remove unused sessionid.tdb and
connections.tdb related code.

11 years agos3:lib: remove unused connections_fetch_entry*() and connections_init()
Stefan Metzmacher [Fri, 5 Oct 2012 17:05:32 +0000 (19:05 +0200)]
s3:lib: remove unused connections_fetch_entry*() and connections_init()

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit a144911958d7bcd291a8f42a40832ffc0187279a)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: remove unused claim_connection/yield_connection
Stefan Metzmacher [Fri, 5 Oct 2012 17:13:39 +0000 (19:13 +0200)]
s3:smbd: remove unused claim_connection/yield_connection

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit d4f369c470ec1c8c7986a73e4ee6e18a97edd834)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: don't call claim/yield_connection() in make_connection_snum/close_cnum()
Stefan Metzmacher [Fri, 5 Oct 2012 17:11:31 +0000 (19:11 +0200)]
s3:smbd: don't call claim/yield_connection() in make_connection_snum/close_cnum()

This was used to maintain the connections.tdb database which is being removed.
We use info from the smbXsrv_tcon instead.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 3eff70087005ffdee2ca579e65846ba1c33ec17f)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:lib/conn_tdb: implement connections_forall_read() based on smbXsrv_*_global_traverse()
Gregor Beck [Mon, 3 Sep 2012 09:13:16 +0000 (11:13 +0200)]
s3:lib/conn_tdb: implement connections_forall_read() based on smbXsrv_*_global_traverse()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 0ccbf89bda71cdbe8d216bab0aa6aacd98cf95df)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: fill tcon->global->session_global_id
Stefan Metzmacher [Thu, 18 Oct 2012 11:40:08 +0000 (13:40 +0200)]
s3:smbd: fill tcon->global->session_global_id

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit f76436c6ea7867fb60d6ac6b65cffc502a018467)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbXsrv.idl: add session_global_id to smbXsrv_tcon_global
Stefan Metzmacher [Thu, 18 Oct 2012 11:38:34 +0000 (13:38 +0200)]
s3:smbXsrv.idl: add session_global_id to smbXsrv_tcon_global

This is required for some debugging tools like smbstatus.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 7be7ec803f88de68ef9a5e2b14994a13589ff441)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:lib: remove function connections_forall()
Gregor Beck [Mon, 27 Aug 2012 13:21:42 +0000 (15:21 +0200)]
s3:lib: remove function connections_forall()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit b74ed25a9999c0029ddf2771f729c497c20b9c30)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agodoc-xml: remove "net connections" documentation
Stefan Metzmacher [Thu, 18 Oct 2012 08:13:59 +0000 (10:13 +0200)]
doc-xml: remove "net connections" documentation

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 3b61c605d6815a8033d70f367a69e876f63bc5de)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:utils/net: remove unused "net connections"
Stefan Metzmacher [Fri, 5 Oct 2012 17:20:45 +0000 (19:20 +0200)]
s3:utils/net: remove unused "net connections"

The connections.tdb will go away.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 4a7a8ecb0b69b3b79823aab7504e75451d20e5a0)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:net_serverid: remove connections_forall from "net serverid wipedbs"
Gregor Beck [Thu, 23 Aug 2012 12:02:22 +0000 (14:02 +0200)]
s3:net_serverid: remove connections_forall from "net serverid wipedbs"

This tdb will go away.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 5a4ffb20ffe387fa5bb373778ba84d24a7e5b74f)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:lib: remove unused sessionid_*() functions
Gregor Beck [Thu, 23 Aug 2012 08:36:59 +0000 (10:36 +0200)]
s3:lib: remove unused sessionid_*() functions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit ac5c8909a94228cec47067188036f1c2a42378aa)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:net_serverid: remove sessionid_traverse from "net serverid wipedbs"
Gregor Beck [Thu, 23 Aug 2012 12:02:22 +0000 (14:02 +0200)]
s3:net_serverid: remove sessionid_traverse from "net serverid wipedbs"

This tdb will go away.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 2f2cb2f6894c94f375310661e7c40c167a784eda)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: don't use (fill) sessionid.tdb in session_claim/yield any more.
Gregor Beck [Thu, 23 Aug 2012 14:15:25 +0000 (16:15 +0200)]
s3:smbd: don't use (fill) sessionid.tdb in session_claim/yield any more.

We use data from new smbXsrv_session instead.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit dbff58228e5d05d9799322973aee950951d23fb8)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:lib: implement sessionid_traverse_read with smb2srv_session_traverse_read
Gregor Beck [Thu, 23 Aug 2012 08:36:59 +0000 (10:36 +0200)]
s3:lib: implement sessionid_traverse_read with smb2srv_session_traverse_read

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit f2714318ae7358abd328e264dc80821c2749bcc6)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd/connection: use smbXsrv_tcon_traverse to count connections
Gregor Beck [Tue, 28 Aug 2012 13:53:28 +0000 (15:53 +0200)]
s3:smbd/connection: use smbXsrv_tcon_traverse to count connections

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit d9ea786c86d6bc42df60881ff703213ef3bd9319)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd:setup_new_vc_session: traverse sessions instead of connections to shutdown...
Gregor Beck [Tue, 28 Aug 2012 12:29:51 +0000 (14:29 +0200)]
s3:smbd:setup_new_vc_session: traverse sessions instead of connections to shutdown other smbds

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit f588704640868a003d901b57045511623e6a1f69)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:build: move sessionid_tdb.o and conn_tdb.o to SMBD_OBJ_BASE
Gregor Beck [Fri, 7 Sep 2012 13:18:39 +0000 (15:18 +0200)]
s3:build: move sessionid_tdb.o and conn_tdb.o to SMBD_OBJ_BASE

and use SMBD_OBJ_BASE for a couple of targets where sessionid_tdb and conn_tdb
were used.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit bcfa721a36269d4390ae5ce747cfd3dff6a255ac)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbXsrv_tcon: add smbXsrv_tcon_global_traverse()
Gregor Beck [Tue, 28 Aug 2012 13:35:58 +0000 (15:35 +0200)]
s3:smbXsrv_tcon: add smbXsrv_tcon_global_traverse()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 89cc865cabdf7f7fd7c26d3da784c1d7f9e1d6b0)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbXsrv_session: add smbXsrv_session_global_traverse()
Gregor Beck [Wed, 22 Aug 2012 12:28:31 +0000 (14:28 +0200)]
s3:smbXsrv_session: add smbXsrv_session_global_traverse()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c3a658f59578899215920a42f5cb568f9368ce13)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: use session_global_id as session number for pam and utmp
Gregor Beck [Thu, 23 Aug 2012 13:21:06 +0000 (15:21 +0200)]
s3:smbd: use session_global_id as session number for pam and utmp

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit b288ddd5c0ee7524e30a4fce3ec4f03c19a1764a)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:configure: check that struct utmp.ut_line is large enough for our use case
Stefan Metzmacher [Mon, 8 Oct 2012 09:15:50 +0000 (11:15 +0200)]
s3:configure: check that struct utmp.ut_line is large enough for our use case

We use "smb/%u" with a 32-bit number, "smb/4294967295\0" requires
15 chars (including the '\0').

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 92d53dd7dc8ca71ae28d2a8762524396cd3c6f58)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: initialize session->global before calling session_claim
Gregor Beck [Mon, 27 Aug 2012 09:03:25 +0000 (11:03 +0200)]
s3:smbd: initialize session->global before calling session_claim

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit e24b1041b1f6e5b1c5a258a2cbe058f134a45ed9)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: remove smbd_server_connection argument from session_claim()
Gregor Beck [Mon, 27 Aug 2012 07:21:58 +0000 (09:21 +0200)]
s3:smbd: remove smbd_server_connection argument from session_claim()

retrieve the server connection from the smbXsrv_session  argument instead.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 02b9b79447be46835adf963cca14c618d0c435e6)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: pass smbXsrv_session instead of user_struct to session_claim() and session_y...
Gregor Beck [Thu, 23 Aug 2012 12:47:33 +0000 (14:47 +0200)]
s3:smbd: pass smbXsrv_session instead of user_struct to session_claim() and session_yield()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 4878769f8e6763fbb8347f2ea674c7a861d95564)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:net_status_shares: use connections_forall_read for a read only traversal
Gregor Beck [Mon, 27 Aug 2012 13:18:07 +0000 (15:18 +0200)]
s3:net_status_shares: use connections_forall_read for a read only traversal

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 77f99ece482a11aad50219e64d231b27dbbccbba)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:count_current_connections: do not clear orphaned entries from connections.tdb
Gregor Beck [Mon, 27 Aug 2012 13:12:36 +0000 (15:12 +0200)]
s3:count_current_connections: do not clear orphaned entries from connections.tdb

This removes one of the last callers of connetions_forall.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 77906e7cdf4c40ab860af8bb42e2c5f3b5501e7d)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbcontrol: don't do stack_trace by connection but by server_id.
Gregor Beck [Tue, 28 Aug 2012 07:31:59 +0000 (09:31 +0200)]
s3:smbcontrol: don't do stack_trace by connection but by server_id.

Inparticular use serverid_traverse_read instead of connections_foralli
to enumerate processes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit b237bbc0d1afdfea3b6b6335854f92d6fe80a151)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:lib: remove unused function connections_traverse()
Gregor Beck [Mon, 27 Aug 2012 13:07:08 +0000 (15:07 +0200)]
s3:lib: remove unused function connections_traverse()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit d5c273919d129f884d5fb13e06ad73e01c7176e1)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:rpc_server/srvsvc: remove function net_enum_pipes()
Gregor Beck [Mon, 27 Aug 2012 12:46:22 +0000 (14:46 +0200)]
s3:rpc_server/srvsvc: remove function net_enum_pipes()

The relevant records are not written to connections.tdb since commit
a781b78417b6d7b875230dd2edcb932445aa4197

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 611e30ea233f0e5dab1439e930ea8544b85ca3b2)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:auth: use const in smb_pam_xxx_session()
Gregor Beck [Mon, 3 Sep 2012 11:55:50 +0000 (13:55 +0200)]
s3:auth: use const in smb_pam_xxx_session()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c9a2111b0025156ba70c6eb9fa857e5d639f62b7)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:auth: remove duplicate propotypes for smb_pam_claim_session and smb_pam_close_session
Michael Adam [Thu, 18 Oct 2012 14:14:19 +0000 (16:14 +0200)]
s3:auth: remove duplicate propotypes for smb_pam_claim_session and smb_pam_close_session

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 7aa0d7c55f9cbb3ed96beaf7c4891cadc9bc00ae)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd/utmp: remove ip address from utmp record
Stefan Metzmacher [Tue, 9 Oct 2012 07:38:36 +0000 (09:38 +0200)]
s3:smbd/utmp: remove ip address from utmp record

1. This was broken since Samba 3.2. when ipv6 support was
   added, it only worked for ipv6 addresses.
2. userspace tools only display the hostname field.
3. This is not really portable

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 9b2a3ebf5cfb4613b117ebb83abe92b93e759381)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: remove duplicate prototypes for sys_utmp_claim() an sys_utmp_yield()
Michael Adam [Thu, 18 Oct 2012 14:06:42 +0000 (16:06 +0200)]
s3:smbd: remove duplicate prototypes for sys_utmp_claim() an sys_utmp_yield()

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 42b0398bdeae8fd7e8ae92ab3a464c3eba9fb0da)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: add exit_server to the smbd_shim hooks
Stefan Metzmacher [Tue, 9 Oct 2012 12:35:04 +0000 (08:35 -0400)]
s3:smbd: add exit_server to the smbd_shim hooks

This is in preparation of moving sessionid_tdb and conn_tdb
to smbd exclusively.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 8a1c7a0a660d78786adac483ecafa157c3a3dc2e)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: move initialization of the smbd_shim from smbd_init_globals() to main()
Michael Adam [Thu, 18 Oct 2012 13:59:55 +0000 (15:59 +0200)]
s3:smbd: move initialization of the smbd_shim from smbd_init_globals() to main()

This is in preparation of adding server exit hooks to the shim.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 8eab264470ee7adea1e448fc29bc8111902a83b0)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3: fix comment header description for smbd_shim
Michael Adam [Thu, 18 Oct 2012 13:58:01 +0000 (15:58 +0200)]
s3: fix comment header description for smbd_shim

This was copy'n'pasted from "RPC pipe client"...

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 781db9d1e564797546009aa5a49378b6e70502d7)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd: update sconn->remote_hostname after the netbios session request
Stefan Metzmacher [Wed, 17 Oct 2012 12:59:30 +0000 (14:59 +0200)]
s3:smbd: update sconn->remote_hostname after the netbios session request

Also update the info in the new smbXsrv structure.
This way we can log the remote name in status outputs.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 980191d189ee1f5a25e74a6bdf141d4c7e4455d5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agobuildtools/wafsamba: only display 'ok' if the result is True
Stefan Metzmacher [Mon, 8 Oct 2012 09:18:03 +0000 (11:18 +0200)]
buildtools/wafsamba: only display 'ok' if the result is True

Otherwise we print the raw value.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 1de9e714756b65b1e15fae044bde065bb2572b16)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:utils/net fix a compiler warning
Christian Ambach [Fri, 21 Sep 2012 20:58:29 +0000 (13:58 -0700)]
s3:utils/net fix a compiler warning

ret might be used uninitialized in out-of-memory condition
(cherry picked from commit f480b44430520f998fea867aa4c2cf9e93cb8d51)

11 years agoWHATSNEW: Prepare release notes for Samba 4.0.0rc4.
Karolin Seeger [Mon, 29 Oct 2012 11:22:17 +0000 (12:22 +0100)]
WHATSNEW: Prepare release notes for Samba 4.0.0rc4.

Karolin

11 years agopackaging: Move smbprint to a comman location.
Andreas Schneider [Wed, 17 Oct 2012 16:25:41 +0000 (18:25 +0200)]
packaging: Move smbprint to a comman location.

This also removes all the duplicate smbprint scripts.

This fixes bug #9301.

Signed-off-by: Andreas Schneider <asn@samba.org>
11 years agolib/tsocket: fix loop in tdgram_bsd_recvfrom() (bug #9184)
Stefan Metzmacher [Tue, 2 Oct 2012 10:20:26 +0000 (12:20 +0200)]
lib/tsocket: fix loop in tdgram_bsd_recvfrom() (bug #9184)

If the socket is not readable yet, we need to retry
if tsocket_bsd_pending() returns 0.

See also
https://lists.samba.org/archive/samba-technical/2012-October/087164.html

metze

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 23 14:44:21 CEST 2012 on sn-devel-104
(cherry picked from commit d2aa785290a283e06624f22a381a7ea02baae5ad)

11 years agodocs: fix opening and ending tag mismatch: para
Björn Baumbach [Mon, 8 Oct 2012 08:42:34 +0000 (10:42 +0200)]
docs: fix opening and ending tag mismatch: para

in forcedirectorysecuritymode.xml.

The last 2 patches are part of a fix for bug #9190 - Regression (change in
behavior) of default acl masks.

11 years agodocs: fix opening and ending tag mismatch: para
Björn Baumbach [Mon, 8 Oct 2012 08:42:34 +0000 (10:42 +0200)]
docs: fix opening and ending tag mismatch: para

in directorysecuritymask.xml.
(cherry picked from commit 903a37c23b30dff3d0f9c546a2e238252b3be583)

11 years agoEnsure the masks don't conflict with the ACL checks.
Jeremy Allison [Thu, 4 Oct 2012 20:55:58 +0000 (13:55 -0700)]
Ensure the masks don't conflict with the ACL checks.

The last 8 patches address bug #9190 - Regression (change in behavior) of
default acl masks.

11 years agoUpdate WHATSNEW.txt with removed parameters.
Jeremy Allison [Thu, 4 Oct 2012 19:08:03 +0000 (12:08 -0700)]
Update WHATSNEW.txt with removed parameters.

11 years agoRemove the parameters:
Jeremy Allison [Wed, 3 Oct 2012 23:04:18 +0000 (16:04 -0700)]
Remove the parameters:

security mask
force security mode
directory security mask
force directory security mode

and update the docs.

11 years agoRemove all uses of lp_security_mask/lp_force_security_mode/lp_dir_security_mask/lp_fo...
Jeremy Allison [Wed, 3 Oct 2012 21:49:01 +0000 (14:49 -0700)]
Remove all uses of lp_security_mask/lp_force_security_mode/lp_dir_security_mask/lp_force_dir_security_mode and replace with the normal masks. Now these parameters can be removed.

11 years agoWhen setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_A...
Jeremy Allison [Tue, 2 Oct 2012 17:15:54 +0000 (10:15 -0700)]
When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries.

11 years agoOnly apply masks on non-default ACL entries when setting the ACL.
Jeremy Allison [Tue, 2 Oct 2012 17:12:45 +0000 (10:12 -0700)]
Only apply masks on non-default ACL entries when setting the ACL.

11 years agoUse is_default_acl variable in canonicalise_acl().
Jeremy Allison [Tue, 2 Oct 2012 16:55:09 +0000 (09:55 -0700)]
Use is_default_acl variable in canonicalise_acl().

11 years agoReformat spacing to be even.
Jeremy Allison [Tue, 2 Oct 2012 16:21:17 +0000 (09:21 -0700)]
Reformat spacing to be even.

11 years agopam_winbind: fix segfault in pam_sm_authenticate()
David Disseldorp [Wed, 2 Nov 2011 17:39:03 +0000 (18:39 +0100)]
pam_winbind: fix segfault in pam_sm_authenticate()

Ensure the potentially null winbind context is not dereferenced on
cleanup.

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

11 years agoldb: bump version to 1.1.13 so the 4.0 release can get the isprint fix
Andrew Bartlett [Mon, 17 Sep 2012 18:57:33 +0000 (11:57 -0700)]
ldb: bump version to 1.1.13 so the 4.0 release can get the isprint fix

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep 17 23:47:57 CEST 2012 on sn-devel-104
(cherry picked from commit ac6deb30fd61b9746c46ab6b69e3ea1c8f762db5)

Fix bug #9322 - backport ldb version update.

11 years agos3:smbd:durable: factor stat checks out into vfs_default_durable_reconnect_check_stat()
Michael Adam [Tue, 23 Oct 2012 11:00:02 +0000 (13:00 +0200)]
s3:smbd:durable: factor stat checks out into vfs_default_durable_reconnect_check_stat()

This makes vfs_default_durable_reconnect() simpler to read
and it reduces code duplication in the failure case handling.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 25 23:03:13 CEST 2012 on sn-devel-104
(cherry picked from commit 52ace6767fddb389e3393c4b19685e59782c6a90)

The last 4 patches address bug #9319 - validate stat(2) information before
reconnect durable handles.

11 years agos3:smbd:durable: store stat info for disconnected durables and check at reconnect.
Michael Adam [Fri, 19 Oct 2012 14:00:05 +0000 (16:00 +0200)]
s3:smbd:durable: store stat info for disconnected durables and check at reconnect.

At durable reconnect, we check the stat info stored in the cookie against the
current stat data from the file we just opened.  If any detail differs, we deny
the durable reconnect, because in that case it is very likely that someone
opened the file while the handle was disconnected, which has to be interpreted
as an oplock break.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Oct 19 18:56:19 CEST 2012 on sn-devel-104
(cherry picked from commit 7d05ff77264cf48d1ee82ca19c8c7e6951e64cf5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:open_files.idl: add stat-info to vfs_default_durable_cookie.
Michael Adam [Fri, 19 Oct 2012 13:57:24 +0000 (15:57 +0200)]
s3:open_files.idl: add stat-info to vfs_default_durable_cookie.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit a6726f9023c899415441a619473ea9a7819d7c36)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd/durable: remove an extra blank line from vfs_default_durable_reconnect()
Michael Adam [Fri, 19 Oct 2012 13:53:50 +0000 (15:53 +0200)]
s3:smbd/durable: remove an extra blank line from vfs_default_durable_reconnect()

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 660e90d39174fbfea0e93f40adfe03fefb86916f)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd/durable: add write_time specific stuff to vfs_default_durable_cookie
Stefan Metzmacher [Fri, 19 Oct 2012 09:12:05 +0000 (11:12 +0200)]
s3:smbd/durable: add write_time specific stuff to vfs_default_durable_cookie

metze

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): Fri Oct 19 17:12:29 CEST 2012 on sn-devel-104
(cherry picked from commit 24d225f44ee4958ed5e2bd934125a9b0c4fc3323)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
The last 4 patches address bug 9318 - fix write time updates for durable handles

11 years agos3:open_files.idl: add write_time specific stuff to vfs_default_durable_cookie
Stefan Metzmacher [Fri, 19 Oct 2012 09:12:05 +0000 (11:12 +0200)]
s3:open_files.idl: add write_time specific stuff to vfs_default_durable_cookie

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 506249b86382331c39676b8632ad33b535f9fb03)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd/durable: update the low level write_time before disconnecting the file.
Stefan Metzmacher [Fri, 19 Oct 2012 08:58:47 +0000 (10:58 +0200)]
s3:smbd/durable: update the low level write_time before disconnecting the file.

If we close the low level FD, we should better update the write_time
if needed.

It's not unlikely that the client doesn't reclaim the durable handle,
in that case we may not close the after the durable timeout.

In such a case we should make sure that we at least update the write time
on disconnect, this makes sure backup applications notice that
the file was changed.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 137376391d5642c0a18ff70a5184dac4b402fa42)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd/durable: trigger pending write_time updates before disconnecting the file
Stefan Metzmacher [Fri, 19 Oct 2012 08:54:27 +0000 (10:54 +0200)]
s3:smbd/durable: trigger pending write_time updates before disconnecting the file

We need to call the pending write time update handler immediately.
Which means we don't wait exactly 2 seconds before updating the write time
after the first write.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 9e7bce53707732700928eaf2bb53a5f1cc5d7784)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:rpc_server: avoid a level 0 DEBUG if tstream_npa_connect_recv fails (bug #9309)
Stefan Metzmacher [Sat, 20 Oct 2012 09:08:19 +0000 (11:08 +0200)]
s3:rpc_server: avoid a level 0 DEBUG if tstream_npa_connect_recv fails (bug #9309)

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Oct 20 12:56:23 CEST 2012 on sn-devel-104
(cherry picked from commit d18591c97e1856bb48fd6d288db59065530f3a9b)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agolibcli/smb: fix unitialized padding in smb2_create_blob_push_one() (bug #9209)
Stefan Metzmacher [Sat, 27 Oct 2012 06:11:14 +0000 (08:11 +0200)]
libcli/smb: fix unitialized padding in smb2_create_blob_push_one() (bug #9209)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Oct 27 10:05:22 CEST 2012 on sn-devel-104
(cherry picked from commit 2b4672f2d30c01a4767acf660ddb061676c59908)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Oct 29 10:37:13 CET 2012 on sn-devel-104

11 years agobuild: Assert that auth_domain, auth_builtin, auth_sam, auth_winbind are builtin
Andrew Bartlett [Thu, 18 Oct 2012 08:58:04 +0000 (19:58 +1100)]
build: Assert that auth_domain, auth_builtin, auth_sam, auth_winbind are builtin

These modules are used by default and for various reasons cannot be compiled into a .so

The code setting up these lists is generic, so it is easier to just assert early,
for this non-default configuration.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
Address bug #9295 - Can't find guest.so module if auth_builtin is built as
module.

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Oct 18 13:14:38 CEST 2012 on sn-devel-104
(cherry picked from commit bea7a251781c65a87af6c6e1568cb71a5aef3f7f)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Oct 22 10:41:21 CEST 2012 on sn-devel-104

11 years agoBUG #9295: Build standard auth modules as internal modules.
Andreas Schneider [Wed, 17 Oct 2012 14:30:57 +0000 (16:30 +0200)]
BUG #9295: Build standard auth modules as internal modules.

Signed-off-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 7786919428527f8e3b75806f5058ddd2a6ad4fab)

11 years agoMerge commit 'samba-4.0.0rc3' into v4-0-test
Karolin Seeger [Tue, 16 Oct 2012 08:16:10 +0000 (10:16 +0200)]
Merge commit 'samba-4.0.0rc3' into v4-0-test

11 years agoVERSION: Set valid value for SAMBA_VERSION_IS_SVN_SNAPSHOT. samba-upstream/tags/samba-4.0.0rc3
Karolin Seeger [Tue, 16 Oct 2012 07:39:47 +0000 (09:39 +0200)]
VERSION: Set valid value for SAMBA_VERSION_IS_SVN_SNAPSHOT.

Karolin

11 years agoVERSION: Bump version number up to 4.0.0rc4.
Karolin Seeger [Tue, 16 Oct 2012 07:24:35 +0000 (09:24 +0200)]
VERSION: Bump version number up to 4.0.0rc4.

And re-enable git snapshots.

Karolin

11 years agoVERSION: Disable git snapshots for 4.0.0rc3.
Karolin Seeger [Tue, 16 Oct 2012 07:21:59 +0000 (09:21 +0200)]
VERSION: Disable git snapshots for 4.0.0rc3.

Karolin

11 years agoWHATSNEW: Update changes since rc2.
Karolin Seeger [Mon, 15 Oct 2012 09:55:35 +0000 (11:55 +0200)]
WHATSNEW: Update changes since rc2.

Karolin

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Oct 15 13:42:13 CEST 2012 on sn-devel-104

11 years agos4-dns: Ignore zones that shouldn't be returned currently
Matthieu Patou [Tue, 2 Oct 2012 04:36:34 +0000 (21:36 -0700)]
s4-dns: Ignore zones that shouldn't be returned currently

RootDNSServers should never be returned (Windows DNS server don't)
..TrustAnchors should never be returned as is, (Windows returns
TrustAnchors) and for the moment we don't support DNSSEC so we'd better
not return this zone.

Fix bug #9265 - Bind dlz fails to start if there is a trustedanchors zone.

11 years agokcc: return invalid parameter if the taskId is not 0
Matthieu Patou [Tue, 25 Sep 2012 20:27:04 +0000 (13:27 -0700)]
kcc: return invalid parameter if the taskId is not 0

Fix bug #9254 - DsExecuteKCC returns wrong error code if taskid != 0.

11 years agolibcli/dns: Time out requests after a while
Kai Blin [Sat, 13 Oct 2012 00:09:57 +0000 (02:09 +0200)]
libcli/dns: Time out requests after a while

Time out UDP requests after DNS_REQUEST_TIMEOUT seconds. Currently set
to 2 seconds.

This should fix bug #8878.

11 years agos4-repl: make dreplsrv_partition_find_for_nc return BAD_NC only
Matthieu Patou [Fri, 28 Sep 2012 01:38:29 +0000 (18:38 -0700)]
s4-repl: make dreplsrv_partition_find_for_nc return BAD_NC only

Fix bug #9264 - getncchanges returns invalid_parameters when it should return bad_nc

11 years agodrsuapi-idl: Fix the encoding of the source_dsa_dns
Matthieu Patou [Thu, 27 Sep 2012 21:20:26 +0000 (14:20 -0700)]
drsuapi-idl: Fix the encoding of the source_dsa_dns

astring is not aligned and is not conformant

Fix bug #9261 - ds_replica_sync fails when specifying a name and not a guid.

11 years agodrs-replica-info: level_not_supported is wrong when we do support (partialy the level)
Matthieu Patou [Thu, 27 Sep 2012 08:27:50 +0000 (01:27 -0700)]
drs-replica-info: level_not_supported is wrong when we do support (partialy the level)

Fix bug #9260 - kccdrs_replica_get_info returns invalid level when non supported
should be returned.

11 years agolib-addns: ensure that allocated buffer are pre set to 0
Matthieu Patou [Thu, 27 Sep 2012 08:22:57 +0000 (01:22 -0700)]
lib-addns: ensure that allocated buffer are pre set to 0

It avoid bugs when one of the buffer is supposed to contain a string
that is not null terminated (ie. label->label) and that we don't force
the last byte to 0.

Fix bug #9259 - rodc join fails complaining that it can't find a RWDC.

11 years agoldap-server: sscanf result was never used due to mistyped var
Matthieu Patou [Thu, 27 Sep 2012 01:32:28 +0000 (18:32 -0700)]
ldap-server: sscanf result was never used due to mistyped var

Fix bug #9258 - ldap server ignore configuration values set in the database for
timeout.

11 years agoldap-server: remove warning for the ret not being used
Matthieu Patou [Thu, 27 Sep 2012 01:31:39 +0000 (18:31 -0700)]
ldap-server: remove warning for the ret not being used

Fix bug #9257 - ldap server has at least one un-initialized variable.

11 years agos4-drs: fix the logic to allow REPL_SECRET if the account has GET_ALL_CHANGES
Matthieu Patou [Wed, 26 Sep 2012 18:49:07 +0000 (11:49 -0700)]
s4-drs: fix the logic to allow REPL_SECRET if the account has GET_ALL_CHANGES

The last 2 patches address bug #9256 - getncchanges with exop for
repl_obj_with_secrets should always be allowed for RWDC.

11 years agos4-drs: EXOP_REPL_SECRETS can be called by RW DC as well
Matthieu Patou [Wed, 26 Sep 2012 18:44:58 +0000 (11:44 -0700)]
s4-drs: EXOP_REPL_SECRETS can be called by RW DC as well

11 years agodrs-getncchanges: do not set the highestUsn to 0
Matthieu Patou [Tue, 25 Sep 2012 21:02:55 +0000 (14:02 -0700)]
drs-getncchanges: do not set the highestUsn to 0

Paragraph 4.1.10.5 says that
         if err = 0 then
         msgOut.pNC := msgIn.pNC
         msgOut.usnvecFrom := msgIn.usnvecFrom
so no need to set the highestUsn to 0

Fix bug #9255 - getncchanges with exop for repl_obj returns highest_usn.

11 years agodrs-crackname: if there is no sid do not return the domain
Matthieu Patou [Tue, 25 Sep 2012 17:51:47 +0000 (10:51 -0700)]
drs-crackname: if there is no sid do not return the domain

Fix bug #9253 - crackname returns a dns domain name even if there is no cracked
SID.

11 years agoImplement the LIST_INFO_FOR_SERVER input format
Matthieu Patou [Tue, 25 Sep 2012 04:34:02 +0000 (21:34 -0700)]
Implement the LIST_INFO_FOR_SERVER input format

Fix bug #9252 - preliminary tests for dcpromo in Windows 2012 fails with Samba
DC.

11 years agoWHATSNEW: Add more changes since rc2.
Karolin Seeger [Mon, 15 Oct 2012 08:35:14 +0000 (10:35 +0200)]
WHATSNEW: Add more changes since rc2.

To be continued...

Karolin

11 years agoWHATSNEW: Start release notes for Samba 4.0.0rc3.
Karolin Seeger [Fri, 12 Oct 2012 10:15:46 +0000 (12:15 +0200)]
WHATSNEW: Start release notes for Samba 4.0.0rc3.

To be continued...

Karolin

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Fri Oct 12 13:58:45 CEST 2012 on sn-devel-104

11 years agodocs: Add very basic samba manpage.
Karolin Seeger [Wed, 10 Oct 2012 08:43:02 +0000 (10:43 +0200)]
docs: Add very basic samba manpage.

Please feel free to extend.

Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Oct 11 11:40:37 CEST 2012 on sn-devel-104
(cherry picked from commit a11595bd2e6895f734e621c69c1ad0ee3e1a685a)

Addresses bug #8802 - Create missing manpages for new binaries.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Fri Oct 12 11:12:32 CEST 2012 on sn-devel-104

11 years agos3-printing: Increase debug level for info that the db is empty.
Andreas Schneider [Thu, 20 Sep 2012 08:20:31 +0000 (10:20 +0200)]
s3-printing: Increase debug level for info that the db is empty.

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Sep 20 12:01:48 CEST 2012 on sn-devel-104
(cherry picked from commit d52d7efba31e3f1e63ed365900aba0a8cb960930)

See bug #9112 - smbd.log is flooded by 'printer_list_get_printer: Failed to
fetch record!' for details.