summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Samba-VirusFilter: common headers and sources.Trever L. Adams2018-02-091-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | | Samba-VirusFilter Contributors: SATOH Fumiyasu @ OSS Technology Corp., Japan Module creator/maintainer Luke Dixon luke.dixon@zynstra.com Samba 4 support Trever L. Adams Documentation Code contributions Samba-master merge work With many thanks to the Samba Team. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13246 Signed-off-by: Trever L. Adams <trever.adams@gmail.com> Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit b1e69edd0592d3b4b0f958792826a236dd3466e1)
* examples/scripts: remove unused shares directoryStefan Metzmacher2017-12-136-1228/+0
| | | | | | | | | | These scripts are not that useful anymore, as they rely on parameters to be defined in loadparm.c It's confusing to get 'git grep' matches for parameters there... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* VFS examples: remove init_search_opsUri Simchoni2017-11-112-12/+0
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Removed unused 'oplock contention limit' config parameterChristof Schmitt2017-10-191-1/+0
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* examples: add cache effectiveness stats to gencache.stpRalph Boehme2017-08-111-0/+23
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Aug 11 14:19:24 CEST 2017 on sn-devel-144
* examples: add winbindd.stp and a shell script to generate itRalph Boehme2017-07-192-0/+3168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: Instrument all winbindd processes: # stap winbindd.stp Instrument a specific winbindd process: # stap -x PID winbindd.stp Example output: # stap winbindd.stp Collecting data, press ctrl-C to stop... ^C Winbind request service time ============================ winbindd_getpwnam_send count: 99, sum: 6229 ms (min: 2669 us, avg: 62921 us, max: 157907 us) Winbind request runtime ======================= winbindd_getpwnam_send count: 99, sum: 3 ms (min: 21 us, avg: 36 us, max: 77 us) Winbind domain-child request service time ========================================= _wbint_LookupName count: 99, sum: 1403 ms (min: 619 us, avg: 14181 us, max: 136613 us) _wbint_GetNssInfo count: 99, sum: 0 ms (min: 2 us, avg: 3 us, max: 6 us) _wbint_LookupSid count: 102, sum: 49 ms (min: 13 us, avg: 481 us, max: 6315 us) _wbint_Sids2UnixIDs count: 101, sum: 2 ms (min: 18 us, avg: 29 us, max: 49 us) _wbint_LookupSids count: 101, sum: 84 ms (min: 411 us, avg: 838 us, max: 3524 us) Winbind domain-child AD-backend service time ============================================ sid_to_name count: 56, sum: 45 ms (min: 431 us, avg: 816 us, max: 6275 us) sequence_number count: 12, sum: 1209 ms (min: 46618 us, avg: 100803 us, max: 131439 us) name_to_sid count: 99, sum: 176 ms (min: 547 us, avg: 1781 us, max: 9866 us) ... Regenerate winbindd.stp: $ examples/systemtap/generate-winbindd.stp.sh Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Jul 19 16:20:56 CEST 2017 on sn-devel-144
* examples: add gencache.stpRalph Boehme2017-07-191-0/+124
| | | | | | | | | | | | | | | Add a Systemtap script to profile gencache. Usage: - profile a single smbd process: # stap -x 22225 gencache.stp smbd - profile all winbindd proceses: # stap gencache.stp winbindd Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/vfs: rename SMB_VFS_STRICT_LOCK to SMB_VFS_STRICT_LOCK_CHECKRalph Boehme2017-07-112-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
* s3/vfs: remove SMB_VFS_STRICT_UNLOCKRalph Boehme2017-07-102-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>
* 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>