1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

41799 Commits

Author SHA1 Message Date
Volker Lendecke
c2b29de2b1 s3-autoconf: Fix deps for dbwrap_torture
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-16 18:05:34 +02:00
Volker Lendecke
494003fb67 s3-g_lock: Properly free "rec" on retry to avoid deadlock
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-16 18:05:34 +02:00
Christian Ambach
7c56d80bee s3:brlock: give traverse_fn a proper name 2012-08-16 18:05:29 +02:00
Christian Ambach
6e3901194b s3:vfs_gpfs: make sure parameters are set correctly for leases
gpfs:leases requires kernel oplocks = yes and level2 oplocks = no
to work properly

make sure those are set correctly for a share
2012-08-16 18:05:29 +02:00
Christof Schmitt
a8b583089b s3:vfs_gpfs: Fix compile error in gpfs module
Fix this compile error by adding fcntl.h as a include that defines F_RDLCK
and F_WRLCK:

modules/gpfs.c: In function ‘set_gpfs_lease’:
modules/gpfs.c:102: error: ‘F_RDLCK’ undeclared (first use in this function)
modules/gpfs.c:102: error: (Each undeclared identifier is reported only once
modules/gpfs.c:102: error: for each function it appears in.)
modules/gpfs.c:105: error: ‘F_WRLCK’ undeclared (first use in this function)
2012-08-16 18:05:21 +02:00
Andrew Bartlett
df8e9c1287 s3-selftest: Add a seperate test for ACL tests using vfstest
This does not check for consistency or correctness yet, that will be
done with python unit tests.  The purpose of this test is to ensure
that the vfstest wrapper doesn't crash.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 16 09:32:25 CEST 2012 on sn-devel-104
2012-08-16 09:32:25 +02:00
Andrew Bartlett
05885a84f9 s3-torture: Add ACL commands to vfstest
This will allow easier investigation of our ACL layer.

Andrew Bartlett
2012-08-16 15:25:40 +10:00
Andrew Bartlett
345b980c3e s3-torture: Use talloc more in vfstest
This matches the rest of Samba, which allocates many of these structures with talloc.

Andrew Bartlett
2012-08-16 15:25:40 +10:00
Andrew Bartlett
43255a1d18 s3-torture: Initialise fsp fully in vfstest open 2012-08-16 15:25:40 +10:00
Andrew Bartlett
1157db293f s3-smbd: Do not check no_acl_syscall_error(errno) after sys_acl_init()
This is no longer a VFS call, so will no longer fail in this way.

Andrew Bartlett
2012-08-16 15:25:39 +10:00
Andrew Bartlett
802d67cabe selftest: Extend xattr-tdb-1 vfstest to call stat 2012-08-16 15:25:39 +10:00
Andrew Bartlett
820d1795d7 s3-vfs: Continue to make vfs_xattr_tdb non-recursive
We now always use _NEXT_ VFS calls, even to build the file id.

Andrew Bartlett
2012-08-16 15:25:38 +10:00
Andrew Bartlett
843e19eff4 s3-vfs: Add new VFS module to fake setting an ACL
The purpose of this module is to remove the relience on the system having ACL support
to test NT ACLs.

Andrew Bartlett
2012-08-16 15:19:17 +10:00
Andrew Bartlett
97e7c3b8bd s3-selftest: convert xattr-tdb-1 vfstest driver into a subunit test
We don't use the simple smb.conf because we need to override all the
paths for this to work as non-root without a panic, so we use the s3dc
environment, which already loads this module.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 16 02:55:19 CEST 2012 on sn-devel-104
2012-08-16 02:55:19 +02:00
Andrew Bartlett
748d8f5310 s3-selftest: convert stream_depot vfstest driver into a subunit test
This gives us our first automated coverage of the vfstest binary.

We don't use the simple smb.conf because we need to override all the
paths for this to work as non-root without a panic, so we use the s3dc
environment, which already loads this module.

Andrew Bartlett
2012-08-16 09:15:45 +10:00
Andrew Bartlett
08baa11ab8 fix printf warning in net connections 2012-08-16 07:48:06 +10:00
Gregor Beck
31980cf5cb s3:utils: remove standalone cclean tool
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-16 06:57:08 +10:00
Gregor Beck
1c2bae062d s3:net add command "connections cleanup"
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-16 06:56:51 +10:00
Andrew Bartlett
65976d680a s3-vfs: Set errno in xattr emulation
The caller may check this errno.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 15 18:05:33 CEST 2012 on sn-devel-104
2012-08-15 18:05:33 +02:00
Andrew Bartlett
cc3bdaaf0a s3-vfs: Avoid loops in VFS modules: call _NEXT functions in xattr emulation
We need to call the next module in the stack otherwise we will loop if
the stat call is in turn implemented in terms of extended attribute
lookup.

Andrew Bartlett
2012-08-15 16:28:03 +02:00
Andrew Bartlett
898c5e140d s3-vfs: ensure we strictly free the talloc_stackframe
We must do this when leaving the function or else in development, we
will panic.

Andrew Bartlett
2012-08-15 16:28:03 +02:00
Andrew Bartlett
fd42bc1846 librpc/idl: Make smb_acl_t public so we can pull/push it as a blob 2012-08-15 16:28:03 +02:00
Stefan Metzmacher
b596a116fd s3:smb2_server: do calculations based on SMBD_SMB2_NUM_IOV_PER_REQ in smbd_smb2_request_validate()
metze
2012-08-15 14:45:04 +02:00
Andrew Bartlett
24b1143068 s3-sysacls: Remove sys_acl_free_qualifier() as it is a no-op
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 15 05:23:18 CEST 2012 on sn-devel-104
2012-08-15 05:23:18 +02:00
Andrew Bartlett
6ccfd05e72 s3-sysacls: Remove sys_acl_free_acl() and replace with TALLOC_FREE() 2012-08-15 11:44:50 +10:00
Andrew Bartlett
e25830dcd8 s3-smbd: Remove sys_acl_*() VFS wrapper functions
We no longer do struct smb_acl_t manipuations via the VFS layer,
which is now reduced to handling the get/set functions.

The only backend that implemented these functions (aside from audit)
was the vfs_default module calling the sys_acl code.  The various ACL
implementation modules either worked on the fully initilaised
smb_acl_t object or on NT ACLs.

This not only makes the operation of the posix ACL code more efficient
(as allocation and free is not put via the VFS), it makes it easier to
test and removes the fantasy that a module could safely redefine this
structure or the behaviour here.

The smb_acls.idl now defines the structure, and it is now allocated
with talloc.

These operations were originally added to the VFS in commit
3bb219161a.

Andrew Bartlett
2012-08-15 11:44:50 +10:00
Andrew Bartlett
a63a2a72eb s3-smbd: Remove unused conn argument from convert_permset_to_mode_t() 2012-08-15 11:44:50 +10:00
Andrew Bartlett
3d031f2189 s3-smbd: Call sys_acl_set_permset() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:49 +10:00
Andrew Bartlett
9f16fcfd3f s3-smbd: Call sys_acl_set_qualifier() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:49 +10:00
Andrew Bartlett
21e0b91e9c s3-smbd: Call sys_acl_set_tag_type() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:49 +10:00
Andrew Bartlett
50d147b858 s3-smbd: Call sys_acl_create_entry() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:48 +10:00
Andrew Bartlett
db544790f1 s3-smbd: Call sys_acl_add_perm() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:48 +10:00
Andrew Bartlett
631a356ea2 s3-smbd: Call sys_acl_clear_perms() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:48 +10:00
Andrew Bartlett
d78c7c32dc s3-smbd: Call sys_acl_init() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:47 +10:00
Andrew Bartlett
8b3227eb45 s3-smbd: Call sys_acl_free_acl() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:47 +10:00
Andrew Bartlett
6a46fbb393 s3-smbd: Call sys_acl_free_qualifier() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:47 +10:00
Andrew Bartlett
e019b93f0e s3-smbd: Call sys_acl_get_entry() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:46 +10:00
Andrew Bartlett
d8fb9e77ec s3-smbd: Call sys_acl_free_qualifier() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:46 +10:00
Andrew Bartlett
6a2f142b49 s3-smbd: Call sys_acl_get_qualifier() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:45 +10:00
Andrew Bartlett
d83276c13f s3-smbd: Call sys_acl_get_tagtype() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:45 +10:00
Andrew Bartlett
3b409324d3 s3-smbd: Call sys_acl_get_permset() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:45 +10:00
Andrew Bartlett
7dff34f5d0 s3-smbd: Call sys_acl_get_perm() directly rather than via the VFS
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett
2012-08-15 11:44:44 +10:00
Andrew Bartlett
0705391ed0 s3-smbd: Move smb_acl_t declaration to smb_acl.idl
This will allow us to marshall this into and from an NDR blob on disk, which will
allow us to fake up ACL support during make test, and to test the NT ACL emulation
using python bindings via the VFS.

Andrew Bartlett
2012-08-15 11:44:44 +10:00
Andrew Bartlett
dcfb6aad16 s3-smbd: Change allocation of smb_acl_t to talloc()
The acl element is changed to be a talloc child, and is no longer one element
longer than requested by virtue of the acl[1] base pointer.

This also avoids one of the few remaining cases of over-allocation of a structure.

Andrew Bartlett
2012-08-15 11:44:43 +10:00
Christof Schmitt
bd23c8f1ce s3-winbind: Return the DC name from DC_PING
The DC that was attempted to ping is useful for troubleshooting. Return
the DC name in the response to the wbclient.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-15 11:44:42 +10:00
Christof Schmitt
7baa7091b7 s3-winbind: Pass ping-dc result to client
The client checks for an error code in response.data.auth.nt_status,
make sure the result is stored there.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-15 11:44:42 +10:00
Andrew Bartlett
ff5d177a69 s3-passdb: Silence scary DEBUG(0) message on first use of secrets.tdb databases
When pdb_samba4 first opens this databse, this message is printed.

Andrew Bartlett
2012-08-14 15:37:22 +02:00
Andrew Bartlett
fe295358df s3-vfs: Put vfs_aixacl_util.c helper functions into a header file
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 14 02:16:11 CEST 2012 on sn-devel-104
2012-08-14 02:16:11 +02:00
Salvador I. Gonzalez
34c4664dc0 s3-selftest: Add smbclient tarmode test
(With small changes to have test complete by Andrew Bartlett)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-14 08:37:48 +10:00
Salvador I. Gonzalez
14285005ec s3-selftest: Fix copy/paste error in test usage string
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-14 07:48:05 +10:00
Salvador I. Gonzalez
4e4c3062bc Fix smbclient/tarmode panic on connecting to Windows 2000 clients.
'Freed frame ../source3/libsmb/clilist.c:934, expected ../source3/client/clitar.c:821'
  Cause: (strequal(finfo->name,"..") || strequal(finfo->name,"."))
    evaluates to true, do_tar returns without freeing ctx

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 13 23:12:50 CEST 2012 on sn-devel-104
2012-08-13 23:12:50 +02:00
Jeremy Allison
aaeb3f5d9b Ensure we update last_access on the winbindd child struct on each request. 2012-08-13 10:35:41 -07:00
Björn Jacke
f7403d838f s3: skip loading vfs modules for printer connections
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sun Aug 12 23:40:23 CEST 2012 on sn-devel-104
2012-08-12 23:40:23 +02:00
Andrew Bartlett
f36e28d131 s3-nfs4acls: Remove lookup_sid and sidmap from NFSv4 ACL mapping and check gid first
By checking just the IDMAP, and by removing the sidmap and lookup_sid calls, we support
IDMAP_BOTH.  This is because by checking for a mapping to a GID first, we can rely on
the fact that IDMAP_BOTH will resolve to a GID.

If the sidmap idea is valued - it allows multiple SIDs to map to a single unix ID, this should
be done in the IDMAP layer.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 11 01:17:36 CEST 2012 on sn-devel-104
2012-08-11 01:17:36 +02:00
Andrew Bartlett
c991ac0ebf s3-smbd: Merge ACE entries based on mapped UID/GID not SID
As the test for a valid posix ACL is based on the unix uid/gid only appearing once in the ACL
the merge process also needs to be UID/GID based.

This is a problem when we have multiple builtin groups mapped to the same POSIX group
as happens in a Samba4 provision.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-08-10 14:38:47 -07:00
Andrew Bartlett
d3188a0480 s3-smbd: Convert posix_acls.c to use struct unixid internally
This is consistent with the rest of Samba which uses this structure to represent
a unix uid or gid.

World values remain represented by the owner_type being WORLD_ACE in the containing
structure.  A -1 value is filled in to the unixid.id in the same way the .world value
was initialised in the union.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-08-10 14:38:47 -07:00
Andrew Bartlett
1c3c5e2156 s3-smbd: Create a shortcut for building the token of a user by SID for posix_acls
When a user owns a file, but does not have specific permissions on that file, we need to
make up the user permissions.  This change ensures that the first thing that we do
is to look up the SID, and confirm it is a user.  Then, we avoid the getpwnam()
and directly create the token via the SID.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-08-10 14:38:47 -07:00
Stefan Metzmacher
8defcb8bd1 Revert "s3:smbd: include smbXsrv.h before smbd/proto.h to have the smbXsrv_ structs available"
This reverts commit 98ccca8dca.

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 10 17:35:38 CEST 2012 on sn-devel-104
2012-08-10 17:35:38 +02:00
Stefan Metzmacher
0e76bbc520 Revert "s3:smbd: Include smbXsrv.h before vfs.h (in smbd.h) so that the smbXsrv structures are available"
This reverts commit e332bfaff5.
2012-08-10 15:56:33 +02:00
Stefan Metzmacher
2cbfdd433e Revert "s3:smb: include "smbXsrv.h" before "vfs.h""
This reverts commit db0c233624.
2012-08-10 15:56:33 +02:00
Stefan Metzmacher
205185e88c s3:smbXsrv.idl: remove smbXsrv_*0 defines
This makes ctags more usable.

metze
2012-08-10 15:56:13 +02:00
Stefan Metzmacher
2b41f3702f s3:param: fix compiler warnings with FN_GLOBAL_CONST_STRING()
metze
2012-08-10 15:56:05 +02:00
Björn Jacke
13f8674a15 build: rename security → samba-security
there is a libsecurity on OSF1 which clasheѕ with our security lib. see bug #9023.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 10 14:22:21 CEST 2012 on sn-devel-104
2012-08-10 14:22:20 +02:00
Jeremy Allison
a5495bc6b0 Remove smb_panic() from unix_strlower(). Just rely on error code return.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  9 23:52:53 CEST 2012 on sn-devel-104
2012-08-09 23:52:53 +02:00
Jeremy Allison
b70f23c2b5 Correctly check for errors in strlower_m() returns. 2012-08-09 12:08:18 -07:00
Jeremy Allison
ce21d08040 Fix strlower_m() to return an error indication. 2012-08-09 12:07:41 -07:00
Jeremy Allison
c13887defc Check error returns on strnorm(). 2012-08-09 12:07:32 -07:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Jeremy Allison
e1ec86a49c Fix missing ads_destroy in error path. 2012-08-09 09:47:35 -07:00
Jeremy Allison
9fcc6f27fb Change strupper_m() to return a value. 2012-08-09 09:47:35 -07:00
Jeremy Allison
af3e529c18 Fix bad return in unix_strupper. 2012-08-09 09:47:35 -07:00
Jeremy Allison
b6eb3a6808 Prepare to remove smb_panic() from unix_strlower(). 2012-08-09 09:47:35 -07:00
Jeremy Allison
8605b35e88 Fix bad return values in unix_strlower/unix_strupper. 2012-08-09 09:47:35 -07:00
Michael Adam
523602863a s3:torture:delete: add a 12th subtest to the delete-on-close tests
test whether second open is possible with initial delete on close
and how setting and unsetting delete on close on the handle affects
the initial delete on close (it does not...)
2012-08-09 16:22:53 +02:00
Michael Adam
db160bf510 s3:torture:delete: fix 11th test to work against windows 2012-08-09 16:22:50 +02:00
Michael Adam
2e53fb109f s3:torture:delete: simplify return code handling, fixing a couple of return codes in error cases 2012-08-09 15:29:51 +02:00
Michael Adam
49a2c68011 s3:torture:delete: reduce indentation 2012-08-09 15:29:50 +02:00
Michael Adam
54e5810638 s3:torture:delete: add a comment 2012-08-09 15:29:49 +02:00
Michael Adam
c228b7abee s3:torture:delete: add a comment 2012-08-09 15:29:47 +02:00
Michael Adam
7a7b86d3c7 s3:torture:delete: add a comment 2012-08-09 15:29:46 +02:00
Michael Adam
5b1afa6307 s3:torture:delete: move the success message for a subtest to the correct place 2012-08-09 15:29:45 +02:00
Michael Adam
2f7a371b92 s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:44 +02:00
Michael Adam
3668a4c94c s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:42 +02:00
Michael Adam
777c7a965b s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:41 +02:00
Michael Adam
c36deaf3af s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:40 +02:00
Michael Adam
e833141622 s3:torture:delete: really fail the test in a failure case 2012-08-09 15:29:39 +02:00
Michael Adam
9058288d6a s3:torture:delete: fix a comment 2012-08-09 15:29:38 +02:00
Michael Adam
bf492d1ffb s3:torture:delete: fix a message 2012-08-09 15:29:37 +02:00
Michael Adam
ff5e6e33fd s3:torture:delete: fix a message 2012-08-09 15:29:36 +02:00
Michael Adam
4aac6d00a9 s3:torture:delete: fix a message 2012-08-09 15:29:35 +02:00
Michael Adam
595845ca30 s3:torture:delete: fix a message (counting the opens) 2012-08-09 15:29:33 +02:00
Michael Adam
2aded6aebd s3:torture:delete: untangle function call from result check 2012-08-09 15:29:32 +02:00
Michael Adam
ef3684739a s3:torture:delete: untangle function call from result check 2012-08-09 15:29:26 +02:00
Michael Adam
4e75b0c717 s3:torture:delete: untangle function call from result check 2012-08-09 15:27:16 +02:00
Michael Adam
ccb25831e2 s3:torture:delete: untanlge function call from result check 2012-08-09 15:27:15 +02:00
Michael Adam
8a92ae23fe s3:torture:delete: untangle function call from result check 2012-08-09 15:26:09 +02:00
Michael Adam
02b092533a s3:torture:delete: untangle function call from result check 2012-08-09 15:26:08 +02:00
Michael Adam
5138eb50a3 s3:torture:delete: untangle function call from result check 2012-08-09 15:26:07 +02:00
Michael Adam
5bc7c77cd8 s3:torture:delete: untangle function call from result check 2012-08-09 15:26:06 +02:00
Michael Adam
b5e9378e28 s3:torture:delete: untangle function call from result check 2012-08-09 15:25:19 +02:00
Michael Adam
361429d02f s3:torture:delete: untangle function call from result check 2012-08-09 15:25:18 +02:00
Michael Adam
8684506478 s3:torture:delete: untangle function call from result check 2012-08-09 15:25:17 +02:00
Michael Adam
1db70c0b8b s3:torture:delete: untangle function call from result check 2012-08-09 15:25:16 +02:00
Michael Adam
a70a4ad731 s3:torture:delete: untangle function call from result check 2012-08-09 15:13:33 +02:00
Andrew Bartlett
434bed75c4 s3-events: Do not vasprintf() the tevent debug messages that will not be shown
This malloc() and free() actually shows up quite high on a call profile of
provision of the AD DC (and this is the matching patch for source3).

Andrew Bartlett
2012-08-09 20:14:22 +10:00
Stefan Metzmacher
0d7b17f4db s3:smb2_sesssetup: setup global->[en|de]cryption_key
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug  9 09:59:02 CEST 2012 on sn-devel-104
2012-08-09 09:59:02 +02:00
Stefan Metzmacher
0cb11efa87 s3:smb2_read: don't try sendfile if encryption is used
metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
a0cf42b709 s3:smb2_server: add smbd_smb2_request->do_encryption
For now it's always false...

metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
95e4270813 s3:smb2_tcon: set global->encryption_required and enforce it
This the account or client doesn't support encryption we should
reject the tree connect.

metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
64dce26533 s3:smb2_sesssetup: set global->encryption_required and enforce it
This the account or client doesn't support encryption we should
reject the session setup.

metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
8734887348 s3:smbXsrv.idl: add encryption_required to smbXsrv_tcon_global0
metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
b5a72f4f35 s3:smb2_server: check the session before we could response with an error.
metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
f15d9a6670 s3:smb2_server: do central file_id check if the operation requires it
Note that it's fine to call file_fsp_smb2() twice, the 2nd call
just returns smb2req->compat_chain_fsp without a 2nd lookup.

metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
47c5900040 s3:nmbd: log a failure in get_domain_master_name_node_status_success() as level 1
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  8 20:14:29 CEST 2012 on sn-devel-104
2012-08-08 20:14:29 +02:00
Stefan Metzmacher
a3ccdafd1b s3:nmbd: don't log get_domain_master_name_node_status_fail at level 0
metze
2012-08-08 18:20:47 +02:00
Stefan Metzmacher
1c76e99ae4 s3:smb2_server: s/i/idx in smbd_smb2_request_pending_queue()
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  8 17:32:26 CEST 2012 on sn-devel-104
2012-08-08 17:32:26 +02:00
Stefan Metzmacher
83d262088b s3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() in smbd_smb2_request_pending_queue()
metze
2012-08-08 12:52:52 +02:00
Stefan Metzmacher
0067de2074 s3:smb2_server: remove useless variable 'i'
metze
2012-08-08 12:52:51 +02:00
Stefan Metzmacher
63d92a192d s3:smb2_server: rewrite dup_smb2_vec3() using SMBD_SMB2_*_IOV_OFS and helper variables
metze
2012-08-08 12:52:51 +02:00
Stefan Metzmacher
fc8e3bd569 s3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_done_ex()
metze
2012-08-08 12:52:51 +02:00
Stefan Metzmacher
97b5aaa648 s3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_verify_sizes()
metze
2012-08-08 12:52:50 +02:00
Stefan Metzmacher
05ae95a0d5 s3:smb2_server: use the common buffer layout for smbd_smb2_request_pending*
metze
2012-08-08 12:52:50 +02:00
Stefan Metzmacher
644eab32af s3:smb2_read: use SMBD_SMB2_NUM_IOV_PER_REQ when checking for sendfile() support
metze
2012-08-08 12:52:50 +02:00
Stefan Metzmacher
2b9dd9049e s3:smb2_read: fix indentation in schedule_smb2_sendfile_read()
metze
2012-08-08 12:52:50 +02:00
Stefan Metzmacher
9f51d610d2 s3:smb2_server: don't try to update req->in.vector[0] in smbd_smb2_request_pending_queue()
req->in.vector[0] is reserved for the transport and might be removed in future.
This is currently always { NULL, 0 }, as it's not used, by our
transport layer code. The SMB2 layer should never touch this!

metze
2012-08-08 12:50:22 +02:00
Andrew Bartlett
b7b4879350 s3-torture: Extend pdbtest to also run an authentication unit-test
This tests both the builtin auth_sam against passdb directly and the
configured auth module.

Andrew Bartlett
2012-08-08 08:03:21 +02:00
Andrew Bartlett
de2d813898 build: Remove pdbtest from the autoconf build
pdbtest is internal test utility that is not installed.  It is only
run from the full (waf) make test, and does not need to be built in
the autoconf build.

Removing it from the autoconf build makes it easier to expand this
test to depend on more parts of Samba.

Andrew Bartlett
2012-08-08 08:03:21 +02:00
Stefan Metzmacher
6bfdca4786 s3:smb2_sesssetup: remove unused code in smbd_smb2_reauth_generic_return()
A reauth exchange is already signed, with the channel signing key.

metze
2012-08-08 05:37:49 +02:00
Stefan Metzmacher
5f7d786b08 s3:smb2_sesssetup: remove TALLOC_FREE(session) from smbd_smb2_[re]auth_generic_return
The caller does this via the smbd_smb2_session_setup_state_destructor()

metze
2012-08-08 05:37:49 +02:00
Stefan Metzmacher
c9ecfd6f3d s3:smb2_server: sign the last request at the start of smbd_smb2_request_reply()
This means we correctly sign all responses in a compound chain.

metze
2012-08-08 05:13:42 +02:00
Volker Lendecke
64c0367335 s3: Fix a crash in reply_lockingX_error
A timed brlock with 2 locks comes in and the second one blocks,
file is closed. smbd_cancel_pending_lock_requests_by_fid sets
blr->fsp to NULL. reply_lockingX_error (called via
MSG_SMB_BLOCKING_LOCK_CANCEL) deferences blr->fsp because
blr->lock_num==1 (the second one blocked).

This patch fixes the bug by only undoing the locks if fsp!=NULL.
fsp==NULL is the close case where everything is undone anyway.

Thanks to Peter Somogyi, somogyi@hu.ibm.com for this bug report.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug  8 04:12:04 CEST 2012 on sn-devel-104
2012-08-08 04:12:04 +02:00
Björn Jacke
c2dee12d67 vfs_dirsort: Remove unnecessary return; statement
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Aug  8 02:17:13 CEST 2012 on sn-devel-104
2012-08-08 02:17:13 +02:00
Björn Jacke
375ba1b483 vfs_afsacl.c: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Björn Jacke
ebc92d0715 vfs_full_audit: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Björn Jacke
dab8fe5dea vfs_time_audit: Remove unnecessary return; statement 2012-08-08 00:21:26 +02:00
Björn Jacke
3f9b2cc682 vfs_time_audit: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Volker Lendecke
9adf6a061a vfs-mediaharmony: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Björn Jacke
da4057fdca vfs_media_harmony: fix return of void
caught by the Studio Compiler

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Aug  7 22:22:48 CEST 2012 on sn-devel-104
2012-08-07 22:22:48 +02:00
Stefan Metzmacher
c3016915a1 s3:smb2_server: fix SMB2 signing of compound responses
We need to defer the signing until we know the response
doesn't change anymore before it goes over the wire.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug  7 20:29:30 CEST 2012 on sn-devel-104
2012-08-07 20:29:30 +02:00
Stefan Metzmacher
40f771e010 s3:smb2_server: there's no need to copy req->out.vector when we just keep the last request
metze
2012-08-07 18:32:47 +02:00
Stefan Metzmacher
8d63efe273 s3:smb2_server: use memmove instead of copying single vector elements
metze
2012-08-07 18:32:47 +02:00
Stefan Metzmacher
9b8973d3b5 s3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() smbd_smb2_request_pending_queue()
metze
2012-08-07 18:32:46 +02:00
Stefan Metzmacher
bfc87a4a76 s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
metze
2012-08-07 18:32:46 +02:00
Stefan Metzmacher
5730272690 s3:smb2_server: make use of SMBD_SMB2_OUT_*_IOV smbd_smb2_request_reply()
metze
2012-08-07 18:32:46 +02:00
Stefan Metzmacher
727b1d1fa8 s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
2da62179de s3:smb2_server: make use of SMBD_SMB2_*_IOV_OFS
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
d609bb9b42 s3:smb2_server: make use of helper macros in smb2_calculate_credits()
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
efaea8e0e1 s3:smb2_server: make use of helper macros in smbd_smb2_request_validate()
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
4e6e1ecb6e s3:smb2_server: make use of SMBD_SMB2_NUM_IOV_PER_REQ
metze
2012-08-07 18:32:44 +02:00
Stefan Metzmacher
337604a0cf s3:smb2_server: add some more SMBD_SMB2_* defines/macros
metze
2012-08-07 18:32:44 +02:00
Andrew Bartlett
d825adf86a s3-param: Remove never-reached condition for popts == NULL
All the callers provide a parametric options pointer to fill in.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 17:16:38 CEST 2012 on sn-devel-104
2012-08-07 17:16:37 +02:00
Andrew Bartlett
31d1fde037 s3-param: Remove never-reached condition for opt_list == NULL
All the callers provide a parametric options pointer to fill in.

Andrew Bartlett
2012-08-07 23:20:54 +10:00
Rusty Russell
d65bded0c2 source3/loadparm.c: Move string_set/string_free inside.
The only user, so make them static inside loadparm.c

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-07 23:20:05 +10:00
Rusty Russell
3bb65aa159 source3/smbd/conn.c: wean off string_set/string_free
Use straight talloc strings.  This is the only user outside loadparm.c.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-07 23:20:05 +10:00
Rusty Russell
a14c02d2a7 source3/loadparm: make struct loadparm_service a talloc object.
This gives us a place to allocate members from.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-07 23:20:05 +10:00
Rusty Russell
592e3f4b23 loadparm: Add ctx member to struct loadparm_global.
Rather than tallocing global parameters off NULL, keep it neat by having
a Global.ctx member.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-07 23:20:04 +10:00
Andrew Klaassen
9b7b736e5b media_harmony VFS module: Add and build by default.
- Supersedes previous patch.
 - Added various fixes for fake mtime functionality.
 - Now requires lp_cache_locked_write_times patch (bug 8912).
 - Removed various xattr functions to comply with recent VFS changes.
 - Changed SMB_STRUCT_DIR to DIR and SMB_STRUCT_DIRENT to struct dirent to comply with recent VFS changes.
 - Added manpage.
 - Added sample trigger_avid_update.py script.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Aug  7 15:16:39 CEST 2012 on sn-devel-104
2012-08-07 15:16:39 +02:00
Stefan Metzmacher
e7bf8e7e23 s3:smb2_server: do one central as_root check if the operation requires it
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug  7 13:14:38 CEST 2012 on sn-devel-104
2012-08-07 13:14:38 +02:00
Stefan Metzmacher
eec941e411 s3:smb2_server: do one central tcon check if the operation requires it
metze
2012-08-07 11:16:37 +02:00
Stefan Metzmacher
59b9dfa0cb s3:smb2_server: do one central session check if the operation requires it
metze
2012-08-07 11:16:37 +02:00
Stefan Metzmacher
aba6df9f55 s3:smb2_server: add and use smbd_smb2_call()
metze
2012-08-07 11:16:37 +02:00
Stefan Metzmacher
e01333242f s3:smb2_server: add .as_root to smbd_smb2_dispatch_table
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
f69ed57d0f s3:smb2_server: add .need_tcon to smbd_smb2_dispatch_table
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
46f7a60e78 s3:smb2_server: add .need_session to smbd_smb2_dispatch_table
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
357110c10b s3:smb2_server: introduce a smbd_smb2_dispatch_table (for now just with names)
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
5ac4d3d274 s3:smb2_server: move 'conn' to main block of smbd_smb2_request_dispatch()
metze
2012-08-07 11:16:36 +02:00
Andrew Bartlett
f06c216d0b s3-pysmbd: Try opening as a file, then as a directory
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 08:59:21 CEST 2012 on sn-devel-104
2012-08-07 08:59:21 +02:00
Andrew Bartlett
e571d5c03e s3-pysmbd: Use talloc_zero()
This avoids operating on uninitialised data

Andrew Bartlett
2012-08-07 14:57:33 +10:00
Andrew Bartlett
e658421fe1 s3-passdb: Simplify idmap wrapper in pdb_samba4
The source3 consumers of this API are now quite happy to be given an answer
of ID_TYPE_BOTH, so we do not need this extra code to try and force the
answer to UID or GID.

Andrew Bartlett
2012-08-07 14:57:33 +10:00
Andrew Bartlett
227d490477 s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper 2012-08-07 14:57:07 +10:00
Stefan Metzmacher
721096b1ad s3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_read*()
This changes the way we read SMB2 traffic from the socket,
now as create just one large buffer for the whole NBT payload
and then split it into iovec elements in smbd_smb2_inbuf_parse_compound()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug  6 21:54:35 CEST 2012 on sn-devel-104
2012-08-06 21:54:35 +02:00
Stefan Metzmacher
fbd663c143 s3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_create()
metze
2012-08-06 20:02:32 +02:00
Stefan Metzmacher
9e9d784def s3:smb2_server: remove const from smbd_smb2_first_negprot()
metze
2012-08-06 20:02:32 +02:00
Stefan Metzmacher
c1b3454259 s3:smb2_server: add smbd_smb2_inbuf_parse_compound()
metze
2012-08-06 20:02:32 +02:00
Christian Ambach
18c152f8aa lib/param: move enum dns_update_settings to lib/param 2012-08-06 18:07:52 +02:00
Andrew Bartlett
0514a84f7e Rework recursive waf build to be a selftest-enabled not a developer build
This essentially reverts commit a943a9ba2f.

I've fixed this by making lib/param/parm_table.c honour --enable-selftest.

Andrew Bartlett
2012-08-06 20:51:56 +10:00
Andrew Bartlett
dd8c0e59a3 build: Remove duplicate declaration of --enable-selftest 2012-08-06 20:51:55 +10:00
Andrew Bartlett
49b2720317 lib/param: Also enable vlp when --enable-selftest is specified 2012-08-06 20:51:55 +10:00
Stefan Metzmacher
1c7bd2b71c s3:smbd: remove unused variable in sesssetup.c
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Aug  5 23:09:06 CEST 2012 on sn-devel-104
2012-08-05 23:09:06 +02:00
Stefan Metzmacher
4384b1e73b s3:smb2_server: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:41 +02:00
Stefan Metzmacher
47c67f2eac s3:smb2_ioctl: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
e281b9f798 s3:smb2_lock: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
e67d07f639 s3:smb2_setinfo: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
9c58a0a870 s3:smb2_getinfo: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
e9a21e5c8b s3:smb2_negprot: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:39 +02:00
Stefan Metzmacher
f28b2ac65a s3:smb2_write: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:38 +02:00
Stefan Metzmacher
f08e478d2f s3:smb2_tcon: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:37 +02:00
Stefan Metzmacher
6e9a65ded3 s3:smb2_create: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:37 +02:00
Stefan Metzmacher
926379ae79 s3:smb2_find: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:36 +02:00
Stefan Metzmacher
559742f45f s3:smb2_sesssetup: make use of SMBD_SMB2_* macros
metze
2012-08-05 20:55:36 +02:00
Stefan Metzmacher
048c8d3db4 s3:smb2_glue: make use of SMBD_SMB2_IN_HDR_PTR()
metze
2012-08-05 20:55:36 +02:00
Stefan Metzmacher
8cf817d7fd s3:smb2_read: make use of SMBD_SMB2_IN_BODY_PTR()
metze
2012-08-05 20:55:35 +02:00
Stefan Metzmacher
121dbd6210 s3:smb2_notify: make use of SMBD_SMB2_IN_*_PTR()
metze
2012-08-05 20:55:35 +02:00
Stefan Metzmacher
88a34026f5 s3:smb2_flush: make use of SMBD_SMB2_IN_BODY_PTR()
metze
2012-08-05 20:55:35 +02:00
Stefan Metzmacher
52805c4169 s3:smb2_close: make use of SMBD_SMB2_IN_BODY_PTR()
metze
2012-08-05 20:55:34 +02:00
Stefan Metzmacher
21742c3693 s3:smb2_break: make use of SMBD_SMB2_IN_BODY_PTR()
metze
2012-08-05 20:55:34 +02:00
Stefan Metzmacher
7ee54cd9c4 s3:smbd: add helper macros to access smb2req->{in,out}.vector[]
For SMB3 encryption we need to change the vector layout
and we better hide this behind some central macros.

metze
2012-08-05 20:55:34 +02:00
Stefan Metzmacher
7327310754 s3:smb2_server: use 'i' instead of '1' as vector index in smbd_smb2_request_pending_timer()
If we reach this code i is currently always 1, but it's easier to unstand this
way.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Aug  5 20:00:26 CEST 2012 on sn-devel-104
2012-08-05 20:00:26 +02:00
Stefan Metzmacher
1a0c40f537 s3:smb2_lock: remove unused in_smbpid
metze
2012-08-05 16:39:31 +02:00
Stefan Metzmacher
96fa47f56e s3:smb2_write: remove unused in_smbpid
metze
2012-08-05 16:39:31 +02:00
Stefan Metzmacher
056070f395 s3:smb2_read: remove unused in_smbpid
metze
2012-08-05 16:39:30 +02:00
Stefan Metzmacher
401860cab6 s3:smbd: add support for SMB_EXTENDED_SIGNATURES in SMBtconX
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Aug  4 14:28:04 CEST 2012 on sn-devel-104
2012-08-04 14:28:04 +02:00
Stefan Metzmacher
ff75fd9eda s3:smbd: setup the application session key with the first tcon on a session
Look for Server.Session.SessionKeyState in [MS-SMB].
The first SMBtconX sets the state to available, which makes it possible
to protect the session key at that stage, if client and server
support TREE_CONNECT_ANDX_EXTENDED_SIGNATURE.

metze
2012-08-04 12:33:06 +02:00
Stefan Metzmacher
3a0db4d865 s3:rpc_server/wkssvc: make usage of session_extract_session_key()
This makes sure we return NO_USER_SESSION_KEY if there's no session key.

metze
2012-08-04 12:33:06 +02:00
Stefan Metzmacher
396f3177ca s3:rpc_server/netlogon: make usage of session_extract_session_key()
This makes sure we return NO_USER_SESSION_KEY if there's no session key.

metze
2012-08-04 12:33:06 +02:00
Stefan Metzmacher
49d0432efd s3:smbd: setup session->global->signing_/application_key during SPNEGO SMB1 session setups
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Aug  4 11:09:42 CEST 2012 on sn-devel-104
2012-08-04 11:09:42 +02:00
Stefan Metzmacher
2265e4633a s3:smbd: setup session->global->signing_/application_key during old SMB1 session setups
metze
2012-08-04 09:10:23 +02:00
Stefan Metzmacher
3d63e4da17 s3:smbd: keep the "application session key" during SMB1 reauth
metze
2012-08-04 09:10:22 +02:00
Stefan Metzmacher
c32120b4e9 s3:libsmb: add EXTENDED_SIGNATURE support in cli_tcon_andx*()
metze
2012-08-04 09:10:22 +02:00
Stefan Metzmacher
b1a0fda73d libcli/smb: pass hdr/len to smb_signing_check/sign_pdu() and skip the nbt header
metze
2012-08-04 09:10:21 +02:00
Stefan Metzmacher
b1c5efbfea s3:smbd: skip nbt header in srv_check_sign_mac()
metze
2012-08-04 09:10:20 +02:00
Christian Ambach
764f2f99e0 s3-ctdb: return proper exit code
do not loose the result from ctdbd_messaging_send_blob()

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Aug  3 14:49:01 CEST 2012 on sn-devel-104
2012-08-03 14:49:01 +02:00
Christian Ambach
0a45e9c4d2 s3-ctdb: adjust a loglevel 2012-08-03 12:53:49 +02:00
Volker Lendecke
6cfe6e92a1 s3-ctdb: Fix ctdb_serverids_exist for target nodes that died
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-03 12:53:49 +02:00
Volker Lendecke
6d83e35410 s3-ctdb: Add debugs to ctdb_serverids_exist
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-03 12:53:49 +02:00
Andrew Bartlett
1e5098d5e1 s3-pysmbd: Add hook for get_nt_acl()
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  2 13:27:55 CEST 2012 on sn-devel-104
2012-08-02 13:27:54 +02:00
Andrew Bartlett
64f494de5e s3-pysmbd: fix DEBUG 2012-08-02 11:35:19 +02:00
Andrew Bartlett
e5686a4cf0 s3-pysmbd: Add my copyright 2012-08-02 11:35:19 +02:00
Andrew Bartlett
55a0d6606c s3-pysmbd: Add set_nt_acl() function based on parts of vfstest
This will allow us to set the full NT ACL on a file, using the VFS
layer, during provision of the AD DC.

Andrew Bartlett
2012-08-02 11:35:19 +02:00
Andrew Bartlett
b041d29c11 s3-pypassdb: Fix wrapper for pdb_domain_info to return correct dns_{domain,forest} 2012-08-02 11:35:19 +02:00
Stefan Metzmacher
b93e6ef5e7 s3:smbd: add a optional_support helper variable to reply_tcon_and_X()
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  1 18:25:26 CEST 2012 on sn-devel-104
2012-08-01 18:25:26 +02:00
Stefan Metzmacher
3fb6549db0 s3:smbd: make use of TCONX_FLAG_DISCONNECT_TID define
metze
2012-08-01 14:17:16 +02:00
Stefan Metzmacher
3682eb80ab s3:libsmb: add a optional_support helper variable
metze
2012-08-01 14:17:16 +02:00
Stefan Metzmacher
137d65b397 s3:libsmb: add a tcon_flags helper variable
metze
2012-08-01 14:17:16 +02:00
Stefan Metzmacher
d3aaa1ebc8 libcli/smb: move some TCON related defines to smb_constants.h
metze
2012-08-01 14:17:16 +02:00
Stefan Metzmacher
8e1c6d4232 s3:rpc_client: rename pipe_auth_data->user_session_key to transport_session_key
metze
2012-08-01 14:17:15 +02:00
Stefan Metzmacher
0ec50e8a2f s3:libsmb: remove unused cli_state->user_session_key
metze
2012-08-01 14:17:15 +02:00
Stefan Metzmacher
0068a9fd93 s3:utils/net_rpc*: make use of cli_get_session_key()
metze
2012-08-01 14:17:15 +02:00
Stefan Metzmacher
616206a806 s3:libnet_join: make use of cli_get_session_key() in libnet_join_joindomain_rpc()
metze
2012-08-01 14:17:14 +02:00
Stefan Metzmacher
8b42f526f4 s3:rpc_client: make use of smbXcli_session_application_key()
metze
2012-08-01 14:17:14 +02:00
Stefan Metzmacher
c9eac1af14 s3:libsmb: make use of smb1cli_session_set_session_key()
metze
2012-08-01 14:17:12 +02:00
Michael Adam
9b9ef92701 s3:ctdbd_conn: use unitX_t types consistently throughout the module
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-08-01 12:30:26 +02:00
Richard Sharpe
d4bce355ad Add two flags to allow for handling of Extended Signatures (Session Key Protection) on a TCON_AND_X request and response.
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Wed Aug  1 06:36:37 CEST 2012 on sn-devel-104
2012-08-01 06:36:37 +02:00
Volker Lendecke
eaa381a292 s3: Fix Coverity ID 710791 Resource leak
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 31 13:34:53 CEST 2012 on sn-devel-104
2012-07-31 13:34:53 +02:00
Volker Lendecke
3bc1f4570e s3: Fix Coverity ID 710803 Resource leak
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:23 +02:00
Volker Lendecke
d1dccfbda6 s3: Fix Coverity ID 710818 Resource leak
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:23 +02:00
Volker Lendecke
2ddc3a280e s3: Fix Coverity ID 710827 Resource leak
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:22 +02:00
Volker Lendecke
d2eb26cfbd s3: Make request_timed_out() static
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:22 +02:00
Stefan Metzmacher
35c0f164bc s3:smbd: do a clean shutdown during release_ip() after CTDB_SRVID_RELEASE_IP
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 31 11:33:27 CEST 2012 on sn-devel-104
2012-07-31 11:33:27 +02:00
Stefan Metzmacher
d73b7938bb s3:smbd: use print_sockaddr() instead of client_socket_addr()
We already have a server address in sockaddr_storage format.

Also the name "client_socket" was very miss leading,
as it returns the local address of the socket.

metze
2012-07-31 09:34:21 +02:00
Stefan Metzmacher
13de233fc6 s3:smbd: move smbd_register_ips() next to release_ip()
metze
2012-07-31 09:34:21 +02:00
Stefan Metzmacher
ec69eb41bf s3:dbwrap_ctdb: initialize db_record->db
metze
2012-07-31 09:34:20 +02:00
Andrew Bartlett
0e1814c6f6 s3-utils: Add cast to fix error found by -Werror=format
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jul 30 11:51:02 CEST 2012 on sn-devel-104
2012-07-30 11:51:02 +02:00
Andrew Bartlett
9c9df9c8a3 s3-libsmbclient: Add missing talloc_stackframe() calls
These caused a panic with the new assertion on the talloc stackframe being
in place.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jul 29 05:21:24 CEST 2012 on sn-devel-104
2012-07-29 05:21:23 +02:00
Andrew Bartlett
dc00df2add lib/param: Rename "socket address" to "nbt client socket address" to clarify role
This parameter is only used in our NBT client code and in nmbd as a
fallback when we fail to select a better interface from "interfaces"
to use directly.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 27 12:16:25 CEST 2012 on sn-devel-104
2012-07-27 12:16:25 +02:00
Andrew Bartlett
b181a0b96b lib/param: Remove use of lp{cfg,}_socket_address outside the NBT client and server
In these other cases, control of the sockets to bind to can be obtained using
"bind interfaces only = yes" and "interfaces = ".

Andrew Bartlett
2012-07-27 17:59:51 +10:00
Andrew Bartlett
ca24820736 lib/param: Remove unused "paranoid server security"
This became unused when security=server went away.

Andrew Bartlett
2012-07-27 03:34:23 +02:00
Andrew Bartlett
42e405a422 param: Make socket_address common, Revert 611ef42053
This essentially reverts the commit 611ef42053
Author: Yasuma Takeda <yasuma@osstech.co.jp>
Date:   Fri Dec 5 13:37:51 2008 -0800

    Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.conf

Intead, the documentation is fixed so that the correct default is
recorded.  Removing the special case handling here allows this to be
dealt with in the same way as all other parameters.

Andrew Bartlett
2012-07-27 03:34:23 +02:00
Andrew Bartlett
bc1826abd6 lib/param: Merge parameter tables into a common file
This file is then included into both loadparm systems.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-27 03:34:23 +02:00
Andrew Bartlett
2429647790 s3-param: Merge "log file" parameter with lib/param
The lib/param code uses a special handler for setting the log file.

We need to set this here, so that we can make this table common.

Andrew Bartlett
2012-07-27 03:34:22 +02:00