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

84075 Commits

Author SHA1 Message Date
Andrew Bartlett
26bae894f2 vfs: Fix compilation of solaris ACL module
Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10 18:46:22 +11:00
Andrew Bartlett
9dfd0a0dc9 build: Remove bashism from SAMBAMANPAGES rule
In sh, you must assign the variable, then export it.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10 18:46:22 +11:00
Björn Baumbach
313da9dc7d smb.conf(5): update list of available protocols (bug #9552)
Update protocol listing in variable substitution list.

Signed-off-by: Bjoern Baumbach <bb@sernet.de>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan  9 21:22:18 CET 2013 on sn-devel-104
2013-01-09 21:22:18 +01:00
Andreas Schneider
3a7c2777ee s3-lib: Use new strict directory create function in create_pipe_sock().
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  9 10:55:23 CET 2013 on sn-devel-104
2013-01-09 10:55:23 +01:00
Andreas Schneider
1aa0503401 Use the new directory_create_or_exist_strict() function.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 09:11:20 +01:00
Andreas Schneider
6039388fc1 util: Add a strict directory_create_or_exist function.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 09:11:20 +01:00
Stefan Metzmacher
5d721de7fd s3:smb2_negprot: set the 'remote_proto' value
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 09:11:20 +01:00
Björn Baumbach
4d1fd0b7da samba_dnsupdate: set KRB5_CONFIG for nsupdate command
Let nslookup use krb5.conf, which is set in our KRB5_CONFIG.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 09:11:20 +01:00
Stefan Metzmacher
8d9a77f864 s4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disconnected() (bug #9540)
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 09:11:20 +01:00
Matthieu Patou
2cc6f9ce7f libnet-vampire: reports Exops as they rather than sync on some partitions
Instead of showing:
Partition[CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com]
objects[1] linked_values[8]
Report a exop based on CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com
as
Exop on CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com, ...

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Wed Jan  9 09:01:30 CET 2013 on sn-devel-104
2013-01-09 09:01:30 +01:00
Matthieu Patou
09b0010806 script: Add a script to display testsuite runtime sorted
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
2013-01-09 07:19:54 +01:00
Matthieu Patou
0c86126d16 libnet: set the invocation_id earlier in order to avoid annoying messages
At that moment we have all the information to set the invocation id so
let's set it, it will avoid useless messages about missing invocation
id.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
2013-01-09 07:19:54 +01:00
Jesper Larsen
411440d2d9 replace: Fix compilation of rep_mkstemp
Commit 1fbc185 removed the variable 'p'.
Use the equivalent variable 'template' instead.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  9 07:18:33 CET 2013 on sn-devel-104
2013-01-09 07:18:33 +01:00
Ira Cooper
0615f68096 s3: Fix vfs_zfsacl to compile.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:51 +11:00
Andrew Bartlett
1002cc9a66 selftest: show that Samba honours "write list" and valid users
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-09 15:29:47 +11:00
Jeremy Allison
fcdd6092b1 Fixup the change_to_user_by_session() case as called from become_user_by_session()
Use inside source3/printing/nt_printing.c:get_correct_cversion().

Allow check_user_ok() to be called with vuid==UID_FIELD_INVALID.
All this should do is throw away one entry in the vuid cache.

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

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:47 +11:00
Volker Lendecke
296c0c34f1 smbd: Remove some ()
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:44 +11:00
Volker Lendecke
38b34cc3e5 smbd: Simplify an if-expression
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:41 +11:00
Volker Lendecke
17708821ff smbd: Fix a typo
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:38 +11:00
Jeremy Allison
b668c9077b Move create_share_access_mask() from smbd/service.c to smbd/uid.c.
Make it static. Only called from uid.c now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:35 +11:00
Jeremy Allison
86d1e1db8e Fix bug #9518 - conn->share_access appears not be be reset between users.
Ensure make_connection_snum() uses the same logic as
check_user_ok() to decide if a user can access a share.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:32 +11:00
Jeremy Allison
1abb5eb89b Factor code out of check_user_ok() into a call to check_user_share_access().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:29 +11:00
Jeremy Allison
ea86f4e100 Initialize stack variables. Prelude to factoring out calls to check_user_share_access().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:25 +11:00
Jeremy Allison
8475f206b2 Add check_user_share_access() which factors out the share security and read_only flag setting code.
Allows this to be called from both make_connection_snum() as well as check_user_ok().
Gives a consistent share security check function.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:22 +11:00
Jeremy Allison
6d7bffa606 Correctly setup the conn->share_access based on the current user token.
Also use this to set conn->read_only. Cache the share_access in the
struct vuid_cache_entry struct so we only evaluate this once per new
user access on this share.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:18 +11:00
Jeremy Allison
5e9eebf5de Change API for create_share_access_mask() - remove conn struct.
Eventually this will be indepentent of conn, just pass in the
readonly flag.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:08 +11:00
Jeremy Allison
926d9307f7 Change API for create_share_access_mask() to pass in the token.
Don't automatically use the one from conn->session_info->security_token.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:00 +11:00
Jeremy Allison
00de188e1f Fix API for create_share_access_mask().
Return the uint32_t share_access rather than directly
changing the conn struct.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:53 +11:00
Jeremy Allison
f7464bbf72 Remove static from create_share_access_mask().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:50 +11:00
Jeremy Allison
4983d5838a Add uint32_t share_access to vuid_cache_entry.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:48 +11:00
Jeremy Allison
7d90ae123a Clean up struct connection_struct, make struct vuid_cache a pointer not inline.
Change VFS ABI to 31 for 4.1.0.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:45 +11:00
Jeremy Allison
5e483ab147 Remove unneeded variable "const struct auth_session_info *session_info"
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:42 +11:00
Jeremy Allison
2e2f46433c Remove dead code now vuser can no longer be NULL.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:39 +11:00
Jeremy Allison
0a09ffd188 Remove the second set of {} braces, no longer needed.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-09 15:28:34 +11:00
Jeremy Allison
45845f5ba1 Remove one set of enclosing {} braces, no longer needed.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:31 +11:00
Jeremy Allison
390a812ccb Move the definition of struct vuid_cache_entry *ent outside blocks.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:28 +11:00
Jeremy Allison
310c4cac90 Start to tidy-up check_user_ok().
Now we have removed "security=share" we cannot be
called with vuid == UID_FIELD_INVALID.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:23 +11:00
Jeremy Allison
5bffdac4ed torture/vfstest.c: Always use create_conn_struct(). Don't hand create connection structs.
Signed-off-by: Jeremy Allison <jra@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 14:54:31 +11:00
Jeremy Allison
7ba6850904 source3/smbd/pysmbd.c: Always use create_conn_struct(). Don't hand create connection structs.
Signed-off-by: Jeremy Allison <jra@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 14:54:29 +11:00
Jeremy Allison
a9730cb390 smbd/posix_acls.c: Use create_conn_struct(). Don't hand-create connection structs.
Signed-off-by: Jeremy Allison <jra@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 14:54:26 +11:00
Jeremy Allison
b6fe9ec683 Allow create_conn_struct() to be called with snum == -1.
Signed-off-by: Jeremy Allison <jra@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 14:54:23 +11:00
Andrew Bartlett
97eb0493fc smbd: Rework create_conn_struct to use conn_new()
This avoids issues with required structure elements not being initialised.

In particular, once conn->vuid_cache becomes a pointer, this ensures
that it is initalised in all cases.

Andrew Bartlett

Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-09 14:54:22 +11:00
Volker Lendecke
3d5c534f0c smbd: Fix bug 9549 -- Memleak in the async echo handler
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  8 23:30:41 CET 2013 on sn-devel-104
2013-01-08 23:30:41 +01:00
Andrew Bartlett
eae01b0d3d samba-tool Add --service argument to samba-tool ntacl get/set
This also ensures a VFS connect is done to the correct service.

Andrew Bartlett

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  8 03:39:21 CET 2013 on sn-devel-104
2013-01-08 03:39:20 +01:00
Andrew Bartlett
cef5f466af pysmbd: Change to keyword based arguments
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07 16:23:24 -08:00
Andrew Bartlett
4741cda956 scripting-provision: Set sysvol ACLs on the sysvol share
This allows us to correctly load any modules that have been specified
by the smb.conf for [sysvol] and issue a VFS connect operation which
may be required by some VFS modules.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07 16:20:51 -08:00
Andrew Bartlett
0533905c5d scripting-ntacls: Optionally allow the service to be specified.
Providing a service allows a VFS connect to be issued on the correct
service, and so ensures that the correct modules are loaded rather
than just what is specified in [globals].

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07 16:19:43 -08:00
Andrew Bartlett
813a3f0df9 pysmbd: Convert pysmbd to take an optional service to connect to
This uses create_conn_struct to correctly call VFS_CONNECT(), but only
if a service has been specified.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07 16:18:35 -08:00
Andrew Bartlett
5a3e915d20 smbd: Fix calls to create_conn_struct_cwd to be correctly indented.
These are whitespace changes only, left out of the previous commit to preserve clarity.

Andrew Bartlett.

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07 16:18:14 -08:00
Andrew Bartlett
6c80cf747d smbd: Split create_conn_struct into a fn that does not change the working dir
The python bindings do not want the current working directory changed
during operations, so we provide two functions, one providing the
original behaviour, and other providing the python bindings with just
the memory allocation and initilisation stuff.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07 16:09:39 -08:00