summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3:printing: Fix %J substitionRalph Boehme2019-11-073-13/+16
| | | | | | | | | | | | | | | | | | | | | print_run_command() uses lp_print_command() which internally performs basic substition by calling talloc_sub_basic(). As a result. any of the variables in the "basic set", including "%J" are already substituted. To prevent the unwanted subtitution, we declare all affected configuration options as const, which disabled the basic substition. As a result print_run_command() can run manual substitution on all characters, including %J, in the variadic argument list *before* calling lp_string() to run basic substition which we had disabled before with the const. 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> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 7 16:01:21 UTC 2019 on sn-devel-184
* s3:printing: add a DEBUG statementRalph Boehme2019-11-071-0/+2
| | | | | | | 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:lib: factor out talloc_sub_advanced() from talloc_sub_full()Ralph Boehme2019-11-072-5/+27
| | | | | | | 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-0711-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-072-20/+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>
* s3: replace standard_sub_advanced with talloc_sub_advanced in one placeRalph Boehme2019-11-071-4/+10
| | | | | | | 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:printing: fix a long lineRalph Boehme2019-11-071-1/+2
| | | | | | | 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>
* vfs: Use file_id_str_buf() in vfs_delay_inject_brl_lock_timer()Volker Lendecke2019-11-061-1/+2
| | | | | | | | 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): Wed Nov 6 21:58:52 UTC 2019 on sn-devel-184
* smbd: Use struct initialization instead of ZERO_STRUCT()Volker Lendecke2019-11-061-3/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Use file_id_str_buf() in smb_full_audit_file_id_create()Volker Lendecke2019-11-061-1/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in set_write_time()Volker Lendecke2019-11-061-2/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in rename_open_files()Volker Lendecke2019-11-061-7/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in contend_level2_oplocks_begin_default()Volker Lendecke2019-11-061-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in process_kernel_oplock_break()Volker Lendecke2019-11-061-3/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in process_oplock_break_message()Volker Lendecke2019-11-061-7/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in initial_break_processing()Volker Lendecke2019-11-061-9/+13
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in downgrade_lease()Volker Lendecke2019-11-061-8/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in downgrade_oplock()Volker Lendecke2019-11-061-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in set_file_oplock()Volker Lendecke2019-11-061-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use file_id_str_buf() in set_file_oplock()Volker Lendecke2019-11-061-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ntlm_auth: Fix nonempty line endingsVolker Lendecke2019-11-061-64/+64
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ntlm_auth: Simplify session generationVolker Lendecke2019-11-061-16/+3
| | | | | | | We don't need to parse a text sid, we have those as binary available Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Avoid includes.h in g_lock.cVolker Lendecke2019-11-061-1/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove g_lock_do()Volker Lendecke2019-11-062-68/+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>
* net: Avoid the use of g_lock_do()Volker Lendecke2019-11-061-25/+26
| | | | | | | g_lock_do() does too much in g_lock.c, and it's rarely used. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net: Avoid the use of g_lock_do()Volker Lendecke2019-11-061-71/+65
| | | | | | | g_lock_do() does too much in g_lock.c, and it's rarely used. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* g_lock: Avoid sys_random(), use generate_random()Volker Lendecke2019-11-061-2/+2
| | | | | 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-0612-18/+19
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: SMB1 UNIX extensions - remove dead code.Jeremy Allison2019-11-061-13/+0
| | | | | | | | | | We no longer set delete_on_fail on return from mknod. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 6 19:31:00 UTC 2019 on sn-devel-184
* s3: smbd: SMB1 UNIX extensions - POSIX mknod should just create the object, ↵Jeremy Allison2019-11-061-34/+1
| | | | | | | not change attributes after. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: smbd: SMB1 UNIX extensions - only allow size change on regular file.Jeremy Allison2019-11-061-8/+10
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* 3: smbd: SMB1 UNIX extensions - For POSIX mknod we can only create ↵Jeremy Allison2019-11-061-0/+5
| | | | | | | | | blk/chr/fifo/sock objects. Fail requests to create other object types. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: smbd: SMB1 UNIX extensions - Ensure POSIX mknod is root-only.Jeremy Allison2019-11-061-0/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Ensure return from net_share_enum_rpc() sets cli->raw_status on ↵Jeremy Allison2019-11-051-11/+22
| | | | | | | | | | | | | | | error. Convert net_share_enum_rpc() to return an NTSTATUS and ensure the status is set correctly on error so SMBC_errno() can return it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14176 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Nov 5 12:36:48 UTC 2019 on sn-devel-184
* s3:libads: Fix mem leak in ads_create_machine_acctJones Syue2019-11-041-1/+2
| | | | | | | | | | | Use 'goto done' instead of 'return' to fix machine_escaped leak. Signed-off-by: Jones Syue <jonessyue@qnap.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 4 22:48:50 UTC 2019 on sn-devel-184
* source3/winbindd/winbindd_util.c: typo fixesBjörn Jacke2019-10-311-3/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/utils/net_rpc.c: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/smbd/reply.c: typo fixesBjörn Jacke2019-10-311-3/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/registry/reg_parse.h: typo fixesBjörn Jacke2019-10-311-4/+4
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/registry/reg_import.h: typo fixesBjörn Jacke2019-10-311-8/+8
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/registry/reg_format.h: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/modules/vfs_virusfilter.c: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* source3/modules/vfs_recycle.c: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3:smbclient added ABI signature filePuran Chand2019-10-301-0/+188
| | | | | | | | Signed-off-by: Puran Chand <pchand@vmware.com> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Oct 30 22:18:15 UTC 2019 on sn-devel-184
* s4: torture Add a test for smbc_readdirplus2()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: Added new API smbc_readdirplus2()Jeremy Allison2019-10-307-1/+149
| | | | | | | | | | | | 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-302-0/+2
| | | | | | | | | | | | 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-302-14/+33
| | | | | | | | 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-302-9/+9
| | | | | | 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-302-26/+27
| | | | | | | | | | | | 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>