summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* s3/vfs: rename SMB_VFS_STRICT_LOCK to SMB_VFS_STRICT_LOCK_CHECKRalph Boehme2017-07-242-9/+9
| | | | | | | | | | | | | | | As per MS-SMB2 and MS-FSA and our SMB_VFS_STRICT_LOCK implementation, we're merely testing for locks, not setting any. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12887 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 11 03:37:44 CEST 2017 on sn-devel-144 (cherry picked from commit 67466271c26ca10c6bce6a51f9dd97a22258f8a4)
* s3/vfs: remove SMB_VFS_STRICT_UNLOCKRalph Boehme2017-07-242-16/+0
| | | | | | | | | | | It's just a noop, so let's remove it. SMB_VFS_STRICT_LOCK doesn't set logs, it just checks for the presence of incompatible locks. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12887 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit c9172c5a4505eb18cb4645e2436eabcc93ec67e1)
* s3/smbd: remove unneeded flags argument from SMB_VFS_OFFLOAD_WRITE_SENDRalph Boehme2017-07-032-5/+3
| | | | | | | | | | | | ...and instead use the fsctl to infer required behaviour in the VFS backends. Note that this removes the check from vfs_default because there we only handle FSCTL_SRV_COPYCHUNK(_WRITE) and must always perform the lock checks. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/vfs: make SMB_VFS_OFFLOAD_WRITE_SEND offload token basedRalph Boehme2017-07-032-5/+7
| | | | | | | | | | | | | Remove the source fsp argument and instead pass the offload token generated with SMB_VFS_OFFLOAD_READ_SEND/RECV. An actual offload fsctl is not implemented yet, neither in the VFS nor at the SMB ioctl layer, and returns NT_STATUS_NOT_IMPLEMENTED With these changes we now pass the copy-chunk-across-shares test. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/vfs: rename SMB_VFS_COPY_CHUNK_SEND/RECV to SMB_VFS_OFFLOAD_WRITE_SEND/RECVRalph Boehme2017-07-032-23/+23
| | | | | | | | | No change in behaviour, just a rename in preperation of more changes to SMB_VFS_OFFLOAD_WRITE_SEND. It helps keeping the diff of the actual changes smaller. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/vfs: add SMB_VFS_OFFLOAD_READ_SEND/RECVRalph Boehme2017-07-032-0/+134
| | | | | | | | | | | | | | | | | | Add SMB_VFS_OFFLOAD_READ_SEND an SMB_VFS_OFFLOAD_READ_RECV. This paves the way for supporting server-side copy-chunk with source and destination file-handles on different shares. It can be used to implement copy offload fsctl in the future, but for now this will be used as a mere copy-chunk replacement. SMB_VFS_OFFLOAD_READ generates a token that associates an fsp with the token and stores the fsp in a in-memory db. Initially only a copy-chunk resume key fsctl is supported. In the future this can be enhanced to support real offload fsctl. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: VFS: Change SMB_VFS_CONNECTPATH to take const struct smb_filename * ↵Jeremy Allison2017-07-012-3/+3
| | | | | | | | | | | | | instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jul 1 07:20:28 CEST 2017 on sn-devel-144
* s3: VFS: Change SMB_VFS_REALPATH to take and return struct smb_filename * ↵Jeremy Allison2017-07-012-3/+7
| | | | | | | | | | instead of char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_GETWD to return struct smb_filename * instead of char *.Jeremy Allison2017-07-012-3/+5
| | | | | | | | We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_CHDIR to use const struct smb_filename * instead of ↵Jeremy Allison2017-07-012-3/+5
| | | | | | | | | | const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_SYMLINK to use const struct smb_filename * instead ↵Jeremy Allison2017-06-182-5/+7
| | | | | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Jun 18 07:03:18 CEST 2017 on sn-devel-144
* s3: VFS: Change SMB_VFS_READLINK to use const struct smb_filename * instead ↵Jeremy Allison2017-06-182-5/+9
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_STATVFS to use const struct smb_filename * instead ↵Jeremy Allison2017-06-182-3/+5
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_LINK to use const struct smb_filename * instead of ↵Jeremy Allison2017-06-182-5/+7
| | | | | | | | | | const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_GET_QUOTA to use const struct smb_filename * instead ↵Jeremy Allison2017-06-182-7/+11
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_DISK_FREE to use const struct smb_filename * instead ↵Jeremy Allison2017-06-182-7/+11
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_CHFLAGS to use const struct smb_filename * instead ↵Jeremy Allison2017-06-182-3/+5
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_MKNOD to use const struct smb_filename * instead of ↵Jeremy Allison2017-06-182-5/+9
| | | | | | | | | | const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* s3: VFS: Change SMB_VFS_GETXATTR to use const struct smb_filename * instead ↵Jeremy Allison2017-06-012-5/+11
| | | | | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 1 02:58:53 CEST 2017 on sn-devel-144
* s3: VFS: Change SMB_VFS_SETXATTR to use const struct smb_filename * instead ↵Jeremy Allison2017-05-312-7/+14
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Change SMB_VFS_REMOVEXATTR to use const struct smb_filename * ↵Jeremy Allison2017-05-312-5/+7
| | | | | | | | | | instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Change SMB_VFS_LISTXATTR to use const struct smb_filename * instead ↵Jeremy Allison2017-05-312-5/+9
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Change SMB_VFS_SYS_ACL_SET_FILE to use const struct smb_filename * ↵Jeremy Allison2017-05-312-5/+10
| | | | | | | | | | instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Change SMB_VFS_SYS_ACL_BLOB_GET_FILE to use const struct ↵Jeremy Allison2017-05-312-5/+9
| | | | | | | | | | smb_filename * instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Change SMB_VFS_SYS_ACL_GET_FILE to use const struct smb_filename * ↵Jeremy Allison2017-05-312-3/+3
| | | | | | | | | | | | instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Requires a few extra cleanups in calling code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Change SMB_VFS_SYS_ACL_DELETE_DEF_FILE to use const struct ↵Jeremy Allison2017-05-312-3/+3
| | | | | | | | | | smb_filename * instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* vfs: add parameter to copy chunk VFS function to handle dup_extentsAurelien Aptel2017-05-102-3/+5
| | | | | | | | | FSCTL_DUPLICATE_EXTENTS_TO_FILE must be handled as a COW clone. Add a copy-chunk flags parameter to the VFS to handle this. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.Jeremy Allison2017-05-091-0/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: client tools. Remove direct access to struct user_auth_info ↵Jeremy Allison2017-05-091-1/+1
| | | | | | | | | | *cmdline_auth_info. Only access through utility functions. Remove all the local pointer aliases that were just being set to cmdline_auth_info in the client tools. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison2017-04-225-6/+6
| | | | | | | | | | | | | | | | | | | | XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
* examples:clifuse: Add a stub for getattrVolker Lendecke2017-03-141-0/+67
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Mar 14 19:15:03 CET 2017 on sn-devel-144
* examples: Add '-p', '--port' to smb2mountVolker Lendecke2017-03-141-3/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* ./examples/scripts/SambaConfig.py: fix typo in "continue"Douglas Bagnall2017-03-101-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* fix spelling of 'unchangeable'Edward Betts2017-02-221-1/+1
| | | | | | | | | Signed-off-by: Edward Betts <edward@4angle.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Wed Feb 22 12:21:51 CET 2017 on sn-devel-144
* Correct "doesnt" typos.Chris Lamb2017-02-221-2/+2
| | | | | | Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s3:waf: Make PARAM and SMBREGISTRY a subsystem of smbconf onlyAndreas Schneider2016-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is the only way to resolve cirular dependencies with these libraries. I've tried several ways but this is the only way to do it correctly. In future we should try to seperate them by passing down information or making a more lightweight loadparm mechanism. +---------+ +-------------+ | | | | | param <---------+ +--------+ smbregistry | | | | | | | +----+----+ | | +------^------+ | +---+----v--+ | | | | | +----------> smbconf +------------+ | | +-----------+ Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:popt_common: simplify popt_common_credentials handlingStefan Metzmacher2016-11-151-16/+2
| | | | | | | | | | | | | | | | This offers a global 'struct user_auth_info *cmdline_auth_info', similar to the 'cmdline_credentials' we have in source4/lib/cmdline/popt_common.c. And we create that in the POPT_CALLBACK_REASON_PRE stage and finalize it in the POPT_CALLBACK_REASON_POST stage. That means much less boring work for the callers and more freedom to change the user_auth_info internals in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* examples: Add smb2mountVolker Lendecke2016-10-146-0/+1695
| | | | | | | | | | | | | | | | | | This is an incomplete playground to add a fuse client based on the Samba-internal libsmb interfaces. There's a few fuse smb clients out there, but they all suffer from Samba not exporting the async internal libsmb interfaces. We don't export those with an API, because we believe we need the ability to mess with those interfaces. This is an attempt to create a fully asynchronous user-space fuse client file system that might make it easier to mess with fancy SMB features than it would be possible in a kernel client. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3/vfs: remove now unused is_offline/set_offline VFS functionsRalph Boehme2016-10-112-36/+0
| | | | | | | | | | The previous commit removed all callers of this, so lets remove it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Oct 11 14:44:03 CEST 2016 on sn-devel-144
* examples:smbclient:write: fix O3 error unused result of fgetsMichael Adam2016-05-131-2/+10
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* examples:smbclient:read: fix O3 error unused result of fgetsMichael Adam2016-05-131-1/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* examples:smbclient:fstatvfs: fix O3 error unused result of fgetsMichael Adam2016-05-131-1/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* examples:smbclient:statvfs: fix O3 error unused result of fgetsMichael Adam2016-05-131-1/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* examples:smbclient:notify: fix O3 error unused result from fgetsMichael Adam2016-05-131-1/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* examples:smbclient:testacl3: fix O3 error unused result from fgetsMichael Adam2016-05-131-1/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* examples/crackcheck: allow compilation with current buildsGarming Sam2016-05-061-1/+1
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Fri May 6 08:32:52 CEST 2016 on sn-devel-144
* examples/smb.conf.default: Fix typo in comment line: sever -> serverSantiago Vila2016-04-091-1/+1
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11823 Signed-off-by: Santiago Vila <sanvila@debian.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 9 02:35:23 CEST 2016 on sn-devel-144
* examples/perfcounter/perf_writer.c: fix memsetAurelien Aptel2016-03-301-1/+1
| | | | | | Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: vfs: Add VFS functions for setting and getting DOS attributes.Richard Sharpe2016-03-272-0/+76
| | | | | | | | | This will make it easier to support those systems and file systems that can store DOS attributes. It should retain the original functionality if VFS functions providing these things are not provided. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* examples: Remove all uses of strcpy in examples (except for validchr.c).Jeremy Allison2016-03-225-8/+13
| | | | | | | | I can't figure out how to make git handle the CR/LF differences in this file. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>