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
Andrew Bartlett
9983ad7a80 s3-passdb: Rename pdb_samba4 to samba_dsdb and autoconfigure when we are a AD DC
The name samba_dsdb is not ideal, but it matches the primary ldb
module we use, and more importantly it avoids having '4' in the name.
We should slowly avoid using the term samba4 in long-term places like
the smb.conf because it is confusing to users given we are shipping
Samba 4.0 as an AD DC as well as all the other supported roles (domain
member/standalone server/classic DC)

Additionally, samba4 will be an odd name when we eventually release
Samba 5.0!

samba4 remains accepted as an alias to ensure existing smb.conf files
load, but to allow changes here in the future, we set the value during
the smb.conf load, and not during the provision when we are an AD DC.

This simplifies the default smb.conf for the vast majority of our
users and reduces the number of things listed in smb.conf files that
we later have to work around if we wish to change the
name/implementation of the passdb glue module again.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep  4 04:45:16 CEST 2012 on sn-devel-104
2012-09-04 04:45:16 +02:00
Björn Jacke
05f9829ab5 waf: add new quota header checks and sysquota_4B source file
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sun Sep  2 23:21:22 CEST 2012 on sn-devel-104
2012-09-02 23:21:22 +02:00
Björn Jacke
9dd0e1608e s3: remove some duplicate quota code 2012-09-02 21:44:54 +02:00
Björn Jacke
af5dcaa740 s3: adopt the new sysquotas_4B support for BSD
most BSD systems have ufs/ufs/quota.h and they count the quota in blocks, not
bytes and have slightly different dqblk struct members.
2012-09-02 20:58:58 +02:00
Björn Jacke
d392485919 s3: add sysquotas_4B support
this is from James Peach's darwin patch, that exists since a couple of years
already.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sun Sep  2 01:00:41 CEST 2012 on sn-devel-104
2012-09-02 01:00:40 +02:00
Volker Lendecke
d5f845c0d3 s3: Make an if statement a bit easier to read
Fix indentation a bit

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Sep  1 07:07:12 CEST 2012 on sn-devel-104
2012-09-01 07:07:12 +02:00
Jeremy Allison
46455642a7 Change the S3 fileserver over to se_file_access_check().
Don't set the priv_open_requested yet until the open-for-backup
request is correctly passed in.
2012-08-31 20:29:13 -07:00
Volker Lendecke
f0a9180ae9 s3: Fix warnings in aio_fork.c 2012-09-01 03:33:21 +02:00
Volker Lendecke
2ffe69082e s3: Remove a shadowing variable declaration 2012-09-01 03:33:21 +02:00
David Disseldorp
e4505fc27b tdb: return unpack error on strdup failure
Signed-off-by: Lars Müller <lars@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Aug 31 21:05:21 CEST 2012 on sn-devel-104
2012-08-31 21:05:21 +02:00
Volker Lendecke
85706c4e16 s3: Fix a few "warning: ISO C90 forbids mixed declarations and code"
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 31 19:24:47 CEST 2012 on sn-devel-104
2012-08-31 19:24:47 +02:00
Christian Ambach
2eb606bfa9 s3:build fix autoconf build on RHEL5
RHEL5 only has autoconf 2.59, so autogen.sh still needs to find autoconf-2.60.m4
somewhere, but it was removed with 5f58359

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Aug 31 12:50:03 CEST 2012 on sn-devel-104
2012-08-31 12:50:03 +02:00
Christof Schmitt
424492a963 s3:dbwrap_ctdb: Add DB name and key to warning message
When a operation takes too long, it is useful for debugging to know the
DB and the key.

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-31 11:10:14 +02:00
Jeremy Allison
3d34406c7b Windows does canonicalization of inheritance bits. Do the same.
We need to filter out the
SEC_DESC_DACL_AUTO_INHERITED|SEC_DESC_DACL_AUTO_INHERIT_REQ
bits. If both are set we store SEC_DESC_DACL_AUTO_INHERITED
as this alters whether SEC_ACE_FLAG_INHERITED_ACE is set
when an ACE is inherited. Otherwise we zero these bits out.
See:

http://social.msdn.microsoft.com/Forums/eu/os_fileservices/thread/11f77b68-731e-407d-b1b3-064750716531

for details.
2012-08-30 10:08:50 -07:00
Jeremy Allison
795920cf4a Change the other two places where we set a security descriptor given by the client to got through set_sd(),
the canonicalize sd function.
2012-08-30 10:08:50 -07:00
Jeremy Allison
70ebf1da67 Re-add set_sd(), called from set_sd_blob(). Allows us to centralize all ACL canonicalization. 2012-08-30 10:08:50 -07:00
Jeremy Allison
8c84ecef89 Rename set_sd() to set_sd_blob() - this describes what it does. 2012-08-30 10:08:50 -07:00
Christian Ambach
02aacb17d1 s3:libsmb correctly set isFsctl for snapshot list
FSCTL_GET_SHADOW_COPY_DATA is a FSCTL, so set the isFsctl marker
otherwise smbclient allinfo will not report snapshots any more with the changes
made for Bug #8311

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu Aug 30 18:57:24 CEST 2012 on sn-devel-104
2012-08-30 18:57:24 +02:00
Andrew Bartlett
a58bf44c1e s4-torture: Add start of a test to confirm winbindd PAC parsing
So far this confirms that we can accept a ticket using the secrets.tdb
entry.

Andrew Bartlett
2012-08-29 23:46:17 +02:00
Christof Schmitt
6678907fae s3:vfs_gpfs: Use directory not file to get fileset id
The query of the fileset quota needs to determine the file set id first.
With the currently available interface, this requires opening the file
to get a file descriptor. For files, this open can fail when a share
mode is set.

Workaround this by querying the fileset id on the directory instead.

The proper solution would be getting an interface for getting the
fileset id that does not require opening the file.

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Aug 29 18:58:34 CEST 2012 on sn-devel-104
2012-08-29 18:58:33 +02:00
Björn Jacke
f31d0d0e30 vfs_media_harmony: fix some compile warnings with llvm
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Aug 29 16:05:10 CEST 2012 on sn-devel-104
2012-08-29 16:05:09 +02:00
David Disseldorp
fb15e5a58f s3-printing: fix bug 9123 lprng job tracking errors
The lprng printing back-end is truncating the print job filename in the
lpq output, which means that Samba is not able to determine the back-end
job ID for a newly submitted print job.
Remove the unneeded spoolss job ID from the print job file name to
ensure the job filename is not truncated. Also log these warnings at a
higher log level.

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Aug 29 14:25:13 CEST 2012 on sn-devel-104
2012-08-29 14:25:12 +02:00
Andreas Schneider
ba862f47d7 s3-smbd: Fix flooding the logs with records we don't find in pcap.
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug 28 16:38:55 CEST 2012 on sn-devel-104
2012-08-28 16:38:55 +02:00
Andrew Bartlett
dc8d29cdae s3-vfs: Indicate the symlink destination when failing check_reduced_name 2012-08-28 15:47:37 +10:00
Andrew Bartlett
f2ccff7b06 s3-vfs: Try to be consistent about localtime vs GMT handling in vfs_shadow_copy2
With the ability to handle times a abolute time_t values since 1970
this becomes more important to get absolutly correct.

Andrew Bartlett
2012-08-28 15:47:37 +10:00
Andrew Bartlett
de209587f9 s3-vfs_shadow_copy2: Also accept a sscanf result 2012-08-28 15:47:03 +10:00
Andrew Bartlett
5aa9a6c936 s3-passdb: Allow reload of the static passdb from python
This is then used in provision when the passdb backend is forced.

Andrew Bartlett
2012-08-28 07:57:30 +10:00
Andrew Bartlett
1a8fd711d7 selftest: Add test of smbclient --machine-pass against and using both s3 and s4
This uses both smbclient binaries to ensure that both work in both environments.

Andrew Bartlett
2012-08-28 07:57:29 +10:00
Andrew Bartlett
f2d9be5af6 s3-secrets: Use talloc_stackframe() in secrets_init_path() 2012-08-28 07:57:29 +10:00
Andrew Bartlett
5adf8c8634 s3-secrets: Handle all valid ROLE_ values in get_default_sec_channel() 2012-08-28 07:57:29 +10:00
Andrew Bartlett
708ce41b32 s3-secrets: Add helper function to set machine account password from secrets_tdb_sync
secrets_tdb_sync will be a new ldb module designed to sync secrets.ldb
entries with the secrets.tdb file.

While not ideal to keep two copies of this data, this routine will
assist in allowing the samba-tool domain join code to operate
correctly in most cases where winbindd and smbd are used.

Andrew Bartlett
2012-08-28 07:57:29 +10:00
Andrew Bartlett
e17bf6af22 s3-param: Avoid assert on use of talloc_tos() without stackframe
This is hit during samba-tool domain classicupgrade

Andrew Bartlett
2012-08-28 07:57:28 +10:00
Stefan Metzmacher
ced27e1c5d s3:lib: make sure we don't try to send messages to server_id's marked as disconnected
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 24 15:54:48 CEST 2012 on sn-devel-104
2012-08-24 15:54:48 +02:00
Stefan Metzmacher
1f7eac907a s3:lib: remove unused processes_exist()
metze
2012-08-24 13:43:34 +02:00
Stefan Metzmacher
9529301503 s3:lib: readd the CTDB_CONTROL_CHECK_SRVIDS optimization to serverids_exist()
metze
2012-08-24 13:43:33 +02:00
Stefan Metzmacher
18c6757dbb s3:lib: only loop over the server_ids we need to verify in serverids_exist()
metze
2012-08-24 13:43:33 +02:00
Stefan Metzmacher
6c3c25b5c1 s3:lib: use server_id_is_disconnected() in serverids_exist()
metze
2012-08-24 13:43:33 +02:00
Stefan Metzmacher
dc7d0f6883 s3:lib: inline processes_exist() into serverids_exist()
metze
2012-08-24 13:43:32 +02:00
Stefan Metzmacher
84b5a5cbcd s3:lib: SERVERID_UNIQUE_ID_NOT_TO_VERIFY only means not to verify the 'unique_id' part
It doesn't mean the the server_id is always valid.

metze
2012-08-24 13:43:32 +02:00
Stefan Metzmacher
0b5e354080 s3:lib: implement process_exists() as wrapper of serverid_exists()
The changes the behavior of process_exists() it checks the pid.unique_id
now, if it's not SERVERID_UNIQUE_ID_NOT_TO_VERIFY.

metze
2012-08-24 13:43:31 +02:00
Stefan Metzmacher
774c28416b s3:g_lock: use serverid_exists() with SERVERID_UNIQUE_ID_NOT_TO_VERIFY
metze
2012-08-24 13:43:31 +02:00
Stefan Metzmacher
99b134adbe s3:lib: implement serverid_exists() as wrapper of serverids_exist()
metze
2012-08-24 13:43:31 +02:00
Stefan Metzmacher
6145329fcd s3:lib: remove CTDB_CONTROL_CHECK_SRVIDS optimization in serverids_exist() for now
This will be readded...

metze
2012-08-24 13:43:30 +02:00
Björn Jacke
cbecd1595c s3: fix compile warning on openindiana
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Aug 23 18:22:13 CEST 2012 on sn-devel-104
2012-08-23 18:22:13 +02:00
Björn Jacke
cbcfd85f41 s3/registry: fix compile warning on openindiana 2012-08-23 16:43:48 +02:00
Andrew Bartlett
0aed29105e s3-smbd: Add security_info_wanted argument to get_nt_acl_no_snum
I need to get at the owner, group, DACL and SACL when testing correct
ACL storage.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
e058dfb3b0 s3-pysmbd: Fix return type of smbd.get_nt_acl
The security_ prefix is stripped off in the python bindings.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
e8e24a251b s3-smbd: Add talloc_stackframe() to get_nt_acl_no_snum()
This is required because the functions it calls use talloc_tos().

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
8c71dc3505 param: Add startup checks for valid server role/binary combinations
This should eliminate confusion from our users about what they can
expect to successfully run.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
332efe1539 s3-pysmbd: Fix error message 2012-08-23 15:02:26 +02:00
Andrew Bartlett
51e3547426 s3-pysmbd: Allow a mode to be specified for the simple ACL
The additional group for the ACL is now optional.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
8518dd6406 file_server: Move default VFS module settings to loadparm.c
This means that any utility that calls into the VFS layer will get the
right modules.

Because we use the fake_acls backend we need to override this whole
list in Samba4.pm however.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Stefan Metzmacher
069db9b630 s3:smb2_break: encrypt OPLOCK BREAK notifications
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 23 10:01:14 CEST 2012 on sn-devel-104
2012-08-23 10:01:14 +02:00
Stefan Metzmacher
54dfd08cb2 s3:smb2_server: use smbXsrv_session->nonce_*
metze
2012-08-23 08:23:07 +02:00
Stefan Metzmacher
6f9610e618 smbXsrv.idl: add nonce_* to smbsrv_session
metze
2012-08-23 08:23:07 +02:00
Stefan Metzmacher
6c7ffa9092 s3:smb2_server: remove dump_data() from smbd_smb2_request_pending_timer()
This was just for debugging...

metze
2012-08-23 08:23:07 +02:00
Jeremy Allison
63ea42853c Remove align_string(). No longer used.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 22 20:38:50 CEST 2012 on sn-devel-104
2012-08-22 20:38:50 +02:00
Jeremy Allison
7eee4947f3 Fix bug in SMB_FIND_INFO_STANDARD parsing found by Volker.
The function align_string() is now broken as base_ptr no longer
points at the start of the SMB data packet, but
at the start of the returned TRANS2 data area.

Replace it with a check for FLAGS2_UNICODE_STRINGS and
a call to ucs2_align().
2012-08-22 10:03:20 -07:00
Andrew Bartlett
125e93cdde s3-pysmbd: Correct the python type for smb_acl_t
The t is weird, but the python bindings trim the traditional IDL name
prefix of each element, as it is usually rudundent.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
450fcd79c7 s3-vfs: Remove extra calls to SMB_VFS_HANDLE_GET_DATA
Found by the talloc_stackframe() out of order checker!

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Jeremy Allison
c84e6aebc2 Fix bug #9098 - winbind does not refresh kerberos tickets.
Based on work from Ian Gordon <ian.gordon@strath.ac.uk>.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 22:01:15 CEST 2012 on sn-devel-104
2012-08-21 22:01:15 +02:00
Andrew Bartlett
ebb776f51f selftest: Add tests for vfs_aio_fork
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 13:12:33 CEST 2012 on sn-devel-104
2012-08-21 13:12:33 +02:00
Andrew Bartlett
e79ed4fe72 s3-vfs: Make vfs_aio_fork erratic timing behaviour a run-time option
This will allow this to be tested as part of a normal selftest.

Andrew Bartlett
2012-08-21 11:35:20 +02:00
Andrew Bartlett
dc063bf3bd s3-pysmbd: Add get/set functions for the posix ACL layer
These will be used to verify that an ACL set as an NT ACL creates
the correct posix ACL.

Andrew Bartlett
2012-08-21 15:25:50 +10:00
Andrew Bartlett
4df2c65ea6 s3-pysmbd: Correct comments in python VFS bindings 2012-08-21 15:25:50 +10:00
Andrew Bartlett
02e25b2a43 s3-passdb: Allow pdb_sid_to_id to work on any SID
This is needed so that pdb_samba4 can map any SID during a provision.

At runtime, winbindd will be asked first, but this shortcut direct to the
ldb file makes it possible to set the permissions on the sysvol share at
provision time.

Andrew Bartlett
2012-08-21 15:25:49 +10:00
Andrew Bartlett
d963aaf73b s3-pysmbd: Add hook for a VFS chown() 2012-08-21 15:25:49 +10:00
Andrew Bartlett
4d5471f1c6 build: Remove special case for the build farm
Except in the formatting of the selftest output, this removes the special case
of the build farm, so that an autobuild, a manual make test and the build farm
are more similar.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 06:39:04 CEST 2012 on sn-devel-104
2012-08-21 06:39:04 +02:00
Herb Lewis
21e67bdcee Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR parsing errors.
A connection is idle when both struct winbindd_cli_state->request AND
struct winbindd_cli_state->response are NULL. Otherwise we can flag
as idle a connection in the state of having sent the request to
the winbindd child (request != NULL) but not yet received a reply
(response == NULL).

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 01:31:46 CEST 2012 on sn-devel-104
2012-08-21 01:31:46 +02:00
Andrew Bartlett
7a59c3d9b8 s3-build: Enable vfs_fake_acls when in developer mode or on the build farm 2012-08-20 21:58:06 +10:00
Andrew Bartlett
ae4195dd40 s3-vfs: Add lstat and lchown hooks to the vfs_fake_acls module 2012-08-20 21:58:05 +10:00
Andrew Bartlett
cbe758cfbb s3-vfs: Correct the implementation of fake_acls_sys_acl_delete_def_file() 2012-08-20 21:57:47 +10:00
Andrew Bartlett
6c0bef1756 s3-vfs: Use the system. namespace for fake ACLs
By using the system. namespace, we make sure this is only run on top of a TDB
based ACL store (ie in make test).

Andrew Bartlett
2012-08-20 21:57:47 +10:00
Andrew Bartlett
0f2d288f76 s3-smbd: ensure we give appropriate errors for EA requests on streams 2012-08-20 21:57:47 +10:00
Andrew Bartlett
6ce084f092 s3-smbd: Do not look for EA information on a stream
The estimated EA size needs to be of the main file.  However, the fsp
may point to the stream, so we need to ignore it if this is the case.

This may mean we estimate wrong if there has been a rename.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Andrew Bartlett
f9f8a8c3d8 s3-smbd: Push smb_fname into estimate_ea_size
This ensures that we return the ea size of the stream, not the overall file.

This is important as if there is an EA on the main file, the raw.streams
test was failing.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Andrew Bartlett
9699c335fd s3-vfs: Allow vfs_xattr_tdb to work without a connected share
This is needed to that get_nt_acl_no_snum() can work.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Michael Adam
c35bdb34da s3: add a debug message for failed execv in sys_popen()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-08-17 20:07:07 +02:00
Stefan Metzmacher
6457fb5c39 s3:lib: implement interpret_pid() as wrapper of server_id_from_string()
metze
2012-08-17 20:07:07 +02:00
Stefan Metzmacher
6a58c5fc64 s3:lib: implement serverid_equal() as macro of server_id_equal()
metze
2012-08-17 20:07:07 +02:00
Christian Ambach
f46c4dfe28 s3:vfs_tsmsm only send notifications when file was offline before
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Aug 17 20:05:30 CEST 2012 on sn-devel-104
2012-08-17 20:05:30 +02:00
Volker Lendecke
dda4c5d794 s3: Adapt the tsmsm module to the new aio routines
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +02:00
Volker Lendecke
d1e1f8224f s3-vfs: Fix calls of lp_parm_talloc_string
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +02:00
Volker Lendecke
3755a418cc s3: Remove the gpfs_hsm_notify module
The functionality has been merged into vfs_gpfs

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +02:00
Volker Lendecke
2c3a58db9e s3: Merge vfs_gpfs_hsm_notify into vfs_gpfs.c
It was separated out because formerly our async I/O was not properly
stackable. aio_fork could for example catch aio and not get aio_return
get through to vfs_gpfs

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +02:00
Stefan Metzmacher
1b487ad3d7 s3:selftest: add some tests against a share the requires encryption
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 17 16:34:26 CEST 2012 on sn-devel-104
2012-08-17 16:34:26 +02:00
Stefan Metzmacher
45471f4d8f s3:smb2_negprot: annouce/negotiate SMB3 encryption support
metze
2012-08-17 14:51:57 +02:00
Stefan Metzmacher
9397d6709f s3:smb2_server: add SMB3 encryption support
metze
2012-08-17 14:51:57 +02:00
Stefan Metzmacher
9f1dfd8fac s3:smbd: don't disconnect the client when a share has "smb encrypt = required"
It's not the client fault, if he doesn't know that encryption is required.
We should just return ACCESS_DENIED and let the client work on other
shares and open files on the current SMB connection.

metze
2012-08-17 14:51:57 +02:00
Stefan Metzmacher
e5d4e8df6b s3:smbd: lp_smb_encrypt() returns SMB_SIGNING_* values
metze
2012-08-17 14:51:57 +02:00
Stefan Metzmacher
8b3da9a1f4 s3:smbd: make use of ENCRYPTION_REQUIRED()
metze
2012-08-17 14:51:57 +02:00
S Hargagan
21c8fa2566 Fix bug #9085 - NMB registration for a duplicate workstation fails with registration refuse
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 17 04:15:21 CEST 2012 on sn-devel-104
2012-08-17 04:15:21 +02:00
Andrew Bartlett
6b7a99107d s3-torture: Allow vfstest to set ACLs on a directory
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 17 02:35:49 CEST 2012 on sn-devel-104
2012-08-17 02:35:49 +02:00
Stefan Metzmacher
16edb6eb7b s3:smb2_server: try to sign an error response if we have a signing key
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 17 00:54:01 CEST 2012 on sn-devel-104
2012-08-17 00:54:01 +02:00
Stefan Metzmacher
19ca98a162 s3:smb2_server: verify the signature before the session_status
metze
2012-08-16 23:13:07 +02:00
Stefan Metzmacher
f4432fea6a s3:smb2_server: add some const to print_req_vectors()
metze
2012-08-16 23:13:07 +02:00
Volker Lendecke
fbebd7530e s3-libsmb: Add a python wrapper
Please note that this is not finished and only for internal use.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-08-16 21:10:32 +02:00
Volker Lendecke
cbe25105c7 s3-g_lock: Make g_lock_lock more robust
If for some reason the cleanup of dbwrap_watch_send does not work
properly, we might starve indefinitely. Make the lock routine more
robust by retrying every 5-10 seconds. g_lock_trylock will clean up
orphaned entries.

Signed-off-by: Christian Ambach <ambi@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu Aug 16 19:44:00 CEST 2012 on sn-devel-104
2012-08-16 19:44:00 +02:00
Volker Lendecke
b83cd05ce1 s3-msg: For msg_channel, correct the talloc hierarchy
talloc_free() of a channel must free all immediate requests that have
piled up

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-16 18:05:34 +02:00
Volker Lendecke
8e50ff02f1 s3-msg: Rename msg_channel_init_destructor
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-16 18:05:34 +02:00
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