summaryrefslogtreecommitdiff
path: root/source3/include
Commit message (Collapse)AuthorAgeFilesLines
* s3:lib: factor out talloc_sub_advanced() from talloc_sub_full()Ralph Boehme2019-11-071-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13745 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: rename talloc_sub_advanced() to talloc_sub_full()Ralph Boehme2019-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have the following substitution functions: talloc_sub_basic() talloc_sub_advanced() talloc_sub_basic() currently substitutes a subset of talloc_sub_advanced(). We'll need a function X that only substitutes what talloc_sub_advanced() substitutes *without* what talloc_sub_basic() does. To get there rename talloc_sub_advanced() to talloc_sub_full(). A subsequent commit will then bring back talloc_sub_advanced() as described above. Examples with fictional replacement letters A and B. Currently: talloc_sub_basic: A talloc_sub_advanced: AB New: talloc_sub_basic: A talloc_sub_advanced: B talloc_sub_full: AB BUG: https://bugzilla.samba.org/show_bug.cgi?id=13745 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: remove unused function standard_sub_advanced()Ralph Boehme2019-11-071-4/+0
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13745 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib: Remove g_lock_do()Volker Lendecke2019-11-061-4/+0
| | | | | | | | This puts too much logic into this lowlevel infrastructure module, given the two minor external users. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove #define serverid_equal server_id_equalVolker Lendecke2019-11-061-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: libsmb: Added new API smbc_readdirplus2()Jeremy Allison2019-10-302-0/+31
| | | | | | | | | | | | Returns the same as smbc_readdirplus() but also can return a struct stat if passed in by the caller. struct stat is synthesized from the data returned by the SMB server. Signed-off-by: Puran Chand <pchand@vmware.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: libsmb: Add missing ino field to internal struct smbc_dirplus_list.Jeremy Allison2019-10-301-0/+1
| | | | | | | | | | | | This should have been added to struct libsmb_file_info, but this is user-visible so I don't want to change this now. Adding it to the containing struct allows us to synthesise a struct stat to return from smbc_readdirplus2() to return all the info from the server to callers. Signed-off-by: Puran Chand <pchand@vmware.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: libsmb: Move setting all struct stat fields into setup_stat().Jeremy Allison2019-10-301-1/+5
| | | | | | | | That way we only have one place where a struct stat is synthesised for libsmbclient callers. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: libsmb: Move setting st->st_ino into setup_stat.Jeremy Allison2019-10-301-1/+2
| | | | | | Signed-off-by: Puran Chand <pchand@vmware.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: libsmb: Change generate_inode()/setup_stat() to modern coding standards.Jeremy Allison2019-10-301-0/+5
| | | | | | | | | | | | Change setup_stat() to be void. It doesn't return anything. Export so it can be used by upcoming smbc_readdirplus2() call. Remove unused SMBCCTX *context parameters. Remove unused talloc_stackframe(). Signed-off-by: Puran Chand <pchand@vmware.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: include: printing: align function parametersMarco Wang2019-10-211-4/+4
| | | | | | | | | Signed-off-by: Marco Wang <m.aesophor@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 21 16:01:56 UTC 2019 on sn-devel-184
* s3: include: printing: fix indentation of struct printifMarco Wang2019-10-211-16/+16
| | | | | | Signed-off-by: Marco Wang <m.aesophor@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: include: printing: move copyright notice to beginningMarco Wang2019-10-211-3/+3
| | | | | | Signed-off-by: Marco Wang <m.aesophor@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Complete the removal of SMB_VFS_CHOWN()Jeremy Allison2019-10-153-18/+1
| | | | | | | | | | No longer used anywhere. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 15 20:07:51 UTC 2019 on sn-devel-184
* s3: VFS: Complete the removal of SMB_VFS_RMDIR()Jeremy Allison2019-10-103-12/+2
| | | | | | | | | | All users now use SMB_VFS_UNLINKAT(..., AT_REMOVEDIR). 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): Thu Oct 10 07:26:43 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_FCNTLAnoop C S2019-10-084-0/+14
| | | | | | Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib: add is_named_stream()Ralph Boehme2019-10-021-0/+1
| | | | | | | | | | | | | | | Add a new utility functions that checks whether a struct smb_filename points to a real named stream, excluding the default stream "::$DATA". foo -> false foo::$DATA -> false foo:bar -> true foo:bar:$DATA -> true BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_UNLINK() -> SMB_VFS_UNLINKAT().Jeremy Allison2019-09-263-13/+1
| | | | | | | | 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): Thu Sep 26 18:40:53 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_UNLINKAT().Jeremy Allison2019-09-263-0/+19
| | | | | | | | | | Currently identical to SMB_VFS_UNLINK(). Next, add to all VFS modules that implement unlink and eventually remove unlink. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbd: Make "share_mode_flags" 16-bit wideVolker Lendecke2019-09-171-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Let fsp_lease_type() look at leases.tdbVolker Lendecke2019-09-171-0/+8
| | | | | | | | | | | | The same lease can be used via different TCP connections (yes, we have tests for this!). At the end of downgrade_lease() we update all fsp's with fsps_lease_update() that link to the lease that just was changed. However, this is only in the local process, this is not cross-smbd. So other smbds using the same lease can use stale information and for example get the mandatory locking wrong. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Make "fd_handle->gen_id" 64-bit everywhereVolker Lendecke2019-09-171-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: remove unused current_user.{need,done}_chdir stackingStefan Metzmacher2019-09-111-2/+0
| | | | | | | | | | | | | | All become_*()/unbecome_*() functions don't alter the working directory. Only change_to_user_and_service*() does. Pair-Programmed-With: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> 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): Wed Sep 11 21:16:57 UTC 2019 on sn-devel-184
* smbd: rename [un]become_user*() to [un]become_user_without_service*()Stefan Metzmacher2019-09-111-0/+1
| | | | | | | | | | | | We should make the behavior change (that gives up some protection) more obvious, by changing the function names. At least some OEMs have patches relying on the 4.9/4.10 behaviour and we want them to detect that they have to do more work when they need to change directories. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: rename change_to_user_by_fsp() to change_to_user_and_service_by_fsp()Ralph Boehme2019-09-111-0/+1
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: rename change_to_user() to change_to_user_and_service()Ralph Boehme2019-09-111-0/+1
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add "utok_string"Volker Lendecke2019-09-111-0/+1
| | | | | | | A terse, one-line unix token representation for debugging purposes Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_MKDIR() -> SMB_VFS_MKDIRAT().Jeremy Allison2019-09-113-16/+1
| | | | | | | | 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 Sep 11 19:44:44 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_MKDIRAT().Jeremy Allison2019-09-113-0/+19
| | | | | | | | | | Currently identical to SMB_VFS_MKDIR(). Next, add to all VFS modules that implement mkdir and eventually remove mkdir. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: profile: Remove syscall_symlink entry now syscall is no longer used.Jeremy Allison2019-09-111-1/+0
| | | | | | | Missed as part of the previous replacement of symlink -> symlinkat. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:lib: add update_stat_ex_from_saved_stat()Ralph Boehme2019-09-101-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: add brl_req_guid() and brl_req_mem_ctx() helper functionsStefan Metzmacher2019-09-091-0/+2
| | | | | | | | | | This allows the vfs backend to detect a retry and keep state between the retries. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_SYMLINK() -> SMB_VFS_SYMLINKAT().Jeremy Allison2019-09-032-15/+1
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Sep 3 22:32:30 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_SYMLINKAT().Jeremy Allison2019-09-033-0/+19
| | | | | | | | | | Currently identical to SMB_VFS_SYMLINK(). Next, add to all VFS modules that implement symlink and eventually remove symlink. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_READLINK() -> SMB_VFS_READLINKAT().Jeremy Allison2019-08-233-19/+1
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 23 20:06:22 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_READLINKAT().Jeremy Allison2019-08-233-0/+22
| | | | | | | | | | Currently identical to SMB_VFS_READLINK(). Next, add to all VFS modules that implement readlink and eventually remove readlink. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_MKNOD() -> SMB_VFS_MKNODAT().Jeremy Allison2019-08-223-19/+1
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 22 19:17:07 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_MKNODAT().Jeremy Allison2019-08-223-0/+22
| | | | | | | | | | Currently identical to SMB_VFS_MKNOD(). Next, add to all VFS modules that implement mknod and eventually remove mknod. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: smbd: Add sys_mknodat() wrapper call.Jeremy Allison2019-08-221-0/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_LINK() -> SMB_VFS_LINKAT().Jeremy Allison2019-08-203-16/+1
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 20 22:26:17 UTC 2019 on sn-devel-184
* s3: VFS: Add SMB_VFS_LINKAT().Jeremy Allison2019-08-203-0/+25
| | | | | | | | | | Currently identical to SMB_VFS_LINK(). Next, move add to all VFS modules that implement link and eventually remove link. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: Complete the replacement of SMB_VFS_RENAME() -> SMB_VFS_RENAMEAT().Jeremy Allison2019-08-163-16/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Add SMB_VFS_RENAMEAT().Jeremy Allison2019-08-163-1/+22
| | | | | | | | | | | Currently identical to SMB_VFS_RENAME() - uses AT_FDCWD for both src and dst directories. Next, move add to all VFS modules that implement rename and eventually remove rename. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: change connection_struct cwd_fname to cwd_fspRalph Boehme2019-08-161-1/+1
| | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Make "lease" const in SMB_VFS_CREATE_FILE()Volker Lendecke2019-08-091-3/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove "share_access" from files_structVolker Lendecke2019-08-061-3/+3
| | | | | | | | | | | | Nobody used this (except vfs_gpfs, which did not need it really). If you *really* need this, you can always look in locking.tdb, but this should never happen in any hot code path, as no runtime decisions are made on the share access after the open is done. Bump VFS interface number to 42. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove a duplicate prototype for set_blocking()Volker Lendecke2019-08-061-1/+0
| | | | | | | This is now in lib/util/blocking.h Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server: Rename create_tcpip_socketSamuel Cabrero2019-07-221-1/+0
| | | | | | | Additionally move function declaration from proto.h to rpc_server.h Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: smbd: Add a note explaining MAX_DIRECTORY_HANDLES only applies to SMB1.Jeremy Allison2019-07-091-1/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: smbd: Remove now unused MAX_OPEN_DIRECTORIES define.Jeremy Allison2019-07-091-5/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>