summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* PY3: fix "TabError: inconsistent use of tabs and spaces"Noel Power2018-09-271-10/+10
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* examples: Fix the smb2mount buildVolker Lendecke2018-09-072-2/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* examples: Fix mingw64 detectionVolker Lendecke2018-09-051-0/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* examples: Add winexe re-implemented on current Samba libsVolker Lendecke2018-08-286-0/+2788
| | | | | | | | | | | | | | | | | | | | | | | | | | | winexe from https://sourceforge.net/projects/winexe/ is a project based on Samba libraries from 2012. According to the winexe git repository the last Samba commit winexe was updated to is 47bbf9886f0c from November 6, 2012. As winexe uses unpublished Samba internal libraries, it broke over time. This is a port of the winexe functionality to more modern Samba versions. It still uses internal APIs, but it being part of the tree means that it is much easier to keep up to date. The Windows service files were taken literally from the original winexe from the sourceforge git. Andrzej Hajda chose GPLv3 only and not GPLv3+. As GPL evolves very slowly, this should not be a practical problem for quite some time. To build it under Linux, you need mingw binaries on your build system. Under Debian stretch, the package names are gcc-mingw-w64 and friends. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 28 02:03:07 CEST 2018 on sn-devel-144
* PEP8: fix W291: trailing whitespaceJoe Guo2018-08-241-2/+2
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E401: multiple imports on one lineJoe Guo2018-08-241-1/+4
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E303: too many blank lines (2)Joe Guo2018-08-241-1/+0
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E261: at least two spaces before inline commentJoe Guo2018-08-241-1/+1
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3: vfs: add SMB_VFS_GET_DOS_ATTRIBUTES_SEND/RECVRalph Boehme2018-07-272-0/+130
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: vfs: add SMB_VFS_GETXATTRAT_SEND/RECVRalph Boehme2018-07-272-0/+145
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* examples/VFS/skel_transparent: make vfs_fn_pointers staticStefan Metzmacher2018-07-251-1/+1
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jul 25 20:44:12 CEST 2018 on sn-devel-144
* examples/VFS/skel_opaque: make vfs_fn_pointers staticRalph Boehme2018-07-251-1/+1
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* examples/VFS/skel_opaque: fix a likely a copy/paste errorRalph Boehme2018-07-251-1/+0
| | | | | | | This line was probably copied over from skel_transparent.c, remove it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* examples/VFS/skel_transparent: call smb_vfs_assert_all_fns()Stefan Metzmacher2018-07-251-0/+8
| | | | | | | This template should always include all calls. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* examples/VFS/skel_transparent: add missing durable handle functionsRalph Boehme2018-07-251-0/+46
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* examples/VFS/skel_transparent: add missing audit_file_fnRalph Boehme2018-07-251-0/+14
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* examples/VFS/skel_opaque: call smb_vfs_assert_all_fns()Stefan Metzmacher2018-07-251-0/+7
| | | | | | | This template should always implement all calls. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* examples/VFS/skel_opaque: add missing durable handle functionsRalph Boehme2018-07-251-0/+33
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* examples/VFS/skel_opaque: add missing audit_file_fnRalph Boehme2018-07-251-0/+10
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: VFS: Remove SMB_VFS_FCHMOD_ACL().Jeremy Allison2018-05-252-17/+0
| | | | | | | No longer used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: VFS: Remove SMB_VFS_CHMOD_ACL().Jeremy Allison2018-05-252-17/+0
| | | | | | | No longer used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Fix typo for responseJoe Guo2018-05-121-1/+1
| | | | | | | | reponse --> response Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s3: client: Add btime_ts to struct finfo.Jeremy Allison2018-05-051-0/+1
| | | | | | | | | | Fill it in when available, else return it as zero. Based on a patch from Puran Chand <pchand@vmware.com>. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3: VFS: Remove SMB_VFS_WRITE() function and all implementations.Jeremy Allison2018-05-052-15/+0
| | | | | | | | | | All code in Samba now uses SMB_VFS_PWRITE or SMB_VFS_PWRITE_SEND. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat May 5 01:38:07 CEST 2018 on sn-devel-144
* s3: VFS: Remove SMB_VFS_READ() function and all implementations.Jeremy Allison2018-05-042-15/+0
| | | | | | | All code in Samba now uses SMB_VFS_PREAD or SMB_VFS_PREAD_SEND. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Remove fsync_fn() from the VFS and all modules. VFS ABI change.Jeremy Allison2018-05-022-13/+0
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed May 2 01:06:28 CEST 2018 on sn-devel-144
* Samba-VirusFilter: common headers and sources.Trever L. Adams2018-01-241-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. 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>
* 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>