The branch, master has been updated via 42e1556 smbd: Add debugs to smbXsrv_open.c via 174275e smbd: Pass down "lease" to open_file_ntcreate via 1230954 smbd: Pass down "lease" to create_file_unixpath via 446de4f vfs3: Pass "lease" through SMB_VFS_CREATE_FILE via 86f9146 MAINTAINERS: Remove MAINTAINERS.txt via f6684f8 messaging3: Fix an error path memleak from b19283c param: avoid dereferencing null lp_ctx
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 42e1556bd92092caf997a87964d65d4ce6d0cc39 Author: Volker Lendecke <v...@samba.org> Date: Mon Jul 7 11:49:49 2014 +0000 smbd: Add debugs to smbXsrv_open.c At one point it was pretty difficult to track a failure. Add more DEBUG to avoid gdb Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Mon Aug 11 23:32:45 CEST 2014 on sn-devel-104 commit 174275e069c107ee021e212462a1a15a77264b5e Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 21 15:58:23 2013 +0000 smbd: Pass down "lease" to open_file_ntcreate Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1230954806647d5c9f2cacebea1bbc584de11b38 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 21 15:56:50 2013 +0000 smbd: Pass down "lease" to create_file_unixpath Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 446de4f680fad224f88c3373d92f8dd4caf8172d Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 21 13:56:14 2013 +0000 vfs3: Pass "lease" through SMB_VFS_CREATE_FILE Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 86f914679f5a817bfb890995f2fc0beeeb765b88 Author: Ira Cooper <i...@samba.org> Date: Sun Aug 10 11:11:26 2014 -0400 MAINTAINERS: Remove MAINTAINERS.txt Due to the new code review rules, there is no more need for the MAINTAINERS.txt file. Signed-off-by: Ira Cooper <i...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit f6684f87980d8da5603109ed0ca8fbfad55f64c7 Author: Volker Lendecke <v...@samba.org> Date: Sat Aug 9 16:51:05 2014 +0000 messaging3: Fix an error path memleak Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: MAINTAINERS.txt | 221 ----------------------------- examples/VFS/skel_opaque.c | 1 + examples/VFS/skel_transparent.c | 2 + source3/include/vfs.h | 7 +- source3/include/vfs_macros.h | 8 +- source3/lib/messages_dgm.c | 1 + source3/modules/vfs_default.c | 3 +- source3/modules/vfs_full_audit.c | 2 + source3/modules/vfs_media_harmony.c | 3 + source3/modules/vfs_time_audit.c | 2 + source3/modules/vfs_worm.c | 3 +- source3/printing/nt_printing.c | 3 + source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 + source3/smbd/dosmode.c | 1 + source3/smbd/nttrans.c | 4 + source3/smbd/open.c | 10 +- source3/smbd/proto.h | 1 + source3/smbd/reply.c | 10 ++ source3/smbd/smb2_create.c | 1 + source3/smbd/smbXsrv_open.c | 7 + source3/smbd/trans2.c | 6 + source3/smbd/vfs.c | 3 +- 22 files changed, 70 insertions(+), 231 deletions(-) delete mode 100644 MAINTAINERS.txt Changeset truncated at 500 lines: diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt deleted file mode 100644 index 3b6a88a..0000000 --- a/MAINTAINERS.txt +++ /dev/null @@ -1,221 +0,0 @@ -Samba maintainers ------------------ - -This file lists the maintainers for subsystems in Samba. Please see -the end of the file for information on how the maintainers system -works. If you can't work out who the maintainer is for some code, -please ask on the samba-technical list or on the samba-technical IRC -channel. - - -======================================================================= - -directory: lib/tevent/ -maintainers: - Stefan Metzmacher <me...@samba.org> -policy: - All commits require review by the maintainer. - - If no maintainer is available for longer than a week - discussion on the samba-technical list and review by 2 - Samba-Team members is needed (e.g. Andrew Tridgell <tri...@samba.org> - and Volker Lendecke <v...@samba.org>). - - Larger changes need also discussion on the samba-technical list - and review by all maintainers. - -directory: lib/tsocket/ -maintainers: - Stefan Metzmacher <me...@samba.org> -policy: - All commits require review by the maintainer. - - If no maintainer is available for longer than a week - discussion on the samba-technical list and review by 2 - Samba-Team members is needed. - - Larger changes need also discussion on the samba-technical list - and review by all maintainers. - -files: buildtools/**, source4/**/wscript -maintainers: - Andrew Tridgell <tri...@samba.org> - Jelmer Vernooij <jel...@samba.org> -policy: - small commits to master allowed if all existing tests - pass. Larger commits require discussion on the samba-technical - list and review by the maintainer - -files: lib/tdb -maintainers: - Rusty Russell <ru...@samba.org> -policy: - Mail/CC changes to the maintainer, commit the changes - unless the maintainer objects. - -files: lib/talloc -maintainers: - Andrew Tridgell <tri...@samba.org> - Rusty Russell <ru...@samba.org> -policy: - small commits to master allowed if all existing tests - pass. Larger commits require discussion on samba-technical - list and review by the maintainer - -files: lib/tevent/py*, lib/talloc/py*, lib/ldb/py*, lib/tdb/py* -maintainers: - Jelmer Vernooij <jel...@samba.org> -policy: - Larger commits require pre-push review by the maintainer or - one of the maintainers of the containing subsystem. - - Other non-trivial (typo, etc) commits require pre- or post-push review by the - maintainer or one of the maintainers of the containing subsystem. - -files: lib/ccan -maintainers: - Rusty Russell <ru...@samba.org> -policy: - Please ping me when changes made, so I can sync with CCAN project. - -files: libcli/dns -maintainers: - Kai Blin <k...@samba.org> -policy: - Mail/CC changes to the maintainer, commit the changes - unless the maintainer objects. - -======================================================================= - -Samba Maintainers System ------------------------- - -The Samba project has adopted a maintainers system, with the following -approach: - - - we have created a new 'MAINTAINERS.txt' file in the root of the git - tree - - - that file will contain a list of subsystems, and along with each - subsystem a list of maintainers - - - subsystems may be subdirectories, or logical groups of files (for - example "build system" or "selftest" could be subsystems that span - multiple directories) - - - if a subsystem is not listed in the MAINTAINERS.txt file, then this - maintainers proposal does not apply to that subsystem. The previous - Samba development methods apply to unlisted subsystems. - - - when we first create the MAINTAINERS.txt it will be empty, thus on - the first day of adoption there is no actual change to our - development practices - - - we will add subsystems to the MAINTAINERS.txt file via consensus - within the Samba Team. This means that someone would propose - themselves, or another team member, as a subsystem maintainer, and - if there are no objections then they can push a change to the - maintainers file after a couple of days waiting for replies. If - there is an existing maintainer for that subsystem then at minimum - the person proposing should wait for a positive ack from the - previous maintainer. - - - a typical subsystem declaration would be: - - directory: /libds - maintainers: - Andrew Bartlett <abart...@samba.org> - Andrew Tridgell <tri...@samba.org> - policy: - small commits to master allowed if all existing tests - pass. Larger commits require discussion on samba-technical - list and review by the maintainer - - - the maintainers for a subsystem may update the policy for that - subsystem at any time by pushing a commit to the MAINTAINERS.txt - file. Significant changes should also be sent to the - samba-technical list to ensure that all developers are aware of the - policy change - - - a subsystem may have multiple maintainers, and it is expected that - this will be the case for many of our subsystems. - - - a maintainer may delegate responsibility to someone else for a - period of time (such as during rapid development or when the - maintainer is away). A maintainer may also appoint a backup - maintainer. These changes should be noted in the maintainers file, - and removed when no longer relevent. - - - maintainer handover would happen by agreement between the old and - new maintainer, and is signified by a commit to the MAINTAINERS.txt - file. If agreement cannot be reached then we can resolve the - disagreement using discussions on the team list. If agreement still - can't be reached then the maintainer won't change. - -What does it mean to be a maintainer? -------------------------------------- - -If you are a maintainer for a subsystem then you have some additional -rights and responsibilies for that code. Specifically: - - - you should make time to review any proposed changes to any - subsystems that you maintain. You should then provide feedback on - proposed changes or sign off on the changes once you are happy with - them. - - - you may choose the policy for the subsystems you maintain. That - policy could be a permissive one, where you allow for small changes - without review, or it could be a strict one, where you only allow - reviewed changes to be pushed. - - - being a maintainer for a subsystem does not override the "right of - veto" of other team members for technical objections. See the - "right of veto" section below for more information. - - - the maintainers can set the developmental direction of the - subsystem, but should strive to achieve concensus where possible - with other team members for the benefit of the whole - project. - -Note that if you set a permissive policy on your subsystem, so that -small changes may be pushed without review, you are still responsible -for reviewing changes if someone specifically asks you to review a -patch. - -Try to reuse policy wording ---------------------------- - -It would be good if we end up with only a few sets of policy wording, -rather than a completely different policy for each subsystem. To try -to achieve that, maintainers should try to re-use an existing policy -wording if possible. - - -The right of veto ------------------ - -Over the last few years the Samba Team has started to use a +1/-1 -voting system, which was inspired by the Apache voting system for -technical issues (see http://www.apache.org/foundation/voting.html). - -For the maintainers proposal to work, I think we need to ensure that -everyone understands what a -1 "veto" vote means on a technical issue. - -For purely technical issues, the +1/-1 voting system should not be a -"most votes wins" system. Instead a single -1 vote is supposed to -override any number of +1 votes, so a -1 vote is a "veto", and all -team members have the right to give a -1 veto vote on any purely -technical issue. - -Along with the right to give a -1 veto vote comes the responsibility -to backup that veto with a technical argument, and the willingness to -then defend your argument in any subsequent discussions and to work -with the patch proposer to find a solution. If you do not backup your --1 veto vote, or you are unwilling on unable to participate in any -discussions that arise from that veto, then the veto vote may be -disregarded. - -Note that a veto is supposed to be used only for purely technical -reasons, so for example pointing out a security concern with a change, -or pointing out that the code may segfault or cause a regression of -functionality. diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 724dd7b..47b46a4 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -169,6 +169,7 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 329b016..fbb1323 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -164,6 +164,7 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -180,6 +181,7 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle, create_options, file_attributes, oplock_request, + lease, allocation_size, private_flags, sd, ea_list, result, pinfo); diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 6c0bf70..a81fb6c 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -156,7 +156,10 @@ fsp->pending_break_messages array */ /* Leave at 31 - not yet released. add SMB_VFS_[GET/SET]_COMPRESSION() */ -#define SMB_VFS_INTERFACE_VERSION 31 +/* Bump to version 32 - Samba 4.2 will ship with that. */ +/* Version 32 - Add "lease" to CREATE_FILE operation */ + +#define SMB_VFS_INTERFACE_VERSION 32 /* All intercepted VFS operations must be declared as static functions inside module source @@ -535,6 +538,7 @@ struct vfs_fn_pointers { uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -940,6 +944,7 @@ NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index de9f55f..e2d494d 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -136,13 +136,13 @@ smb_vfs_call_open((handle)->next, (fname), (fsp), (flags), (mode)) #define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, \ - create_options, file_attributes, oplock_request, allocation_size, private_flags, sd, ea_list, result, pinfo) \ + create_options, file_attributes, oplock_request, lease, allocation_size, private_flags, sd, ea_list, result, pinfo) \ smb_vfs_call_create_file((conn)->vfs_handles, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), \ - (create_options), (file_attributes), (oplock_request), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo)) + (create_options), (file_attributes), (oplock_request), (lease), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo)) #define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, \ - create_options, file_attributes, oplock_request, allocation_size, private_flags, sd, ea_list, result, pinfo) \ + create_options, file_attributes, oplock_request, lease, allocation_size, private_flags, sd, ea_list, result, pinfo) \ smb_vfs_call_create_file((handle)->next, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), \ - (create_options), (file_attributes), (oplock_request), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo)) + (create_options), (file_attributes), (oplock_request), (lease), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo)) #define SMB_VFS_CLOSE(fsp) \ smb_vfs_call_close((fsp)->conn->vfs_handles, (fsp)) diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index 8b897f6..df34d53 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -388,6 +388,7 @@ int messaging_dgm_cleanup(struct messaging_context *msg_ctx, pid_t pid) ret = errno; DEBUG(10, ("%s: open(%s) failed: %s\n", __func__, lockfile_name, strerror(ret))); + TALLOC_FREE(lockfile_name); return ret; } diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index b8f4117..3430cd0 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -517,6 +517,7 @@ static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -527,7 +528,7 @@ static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle, return create_file_default(handle->conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, - file_attributes, oplock_request, + file_attributes, oplock_request, lease, allocation_size, private_flags, sd, ea_list, result, pinfo); diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 7f0222c..a51ab75 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -863,6 +863,7 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -907,6 +908,7 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle, create_options, /* create_options */ file_attributes, /* file_attributes */ oplock_request, /* oplock_request */ + lease, /* lease */ allocation_size, /* allocation_size */ private_flags, sd, /* sd */ diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index bba9805..f9432dc 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -1207,6 +1207,7 @@ static NTSTATUS mh_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -1234,6 +1235,7 @@ static NTSTATUS mh_create_file(vfs_handle_struct *handle, create_options, file_attributes, oplock_request, + lease, allocation_size, private_flags, sd, @@ -1270,6 +1272,7 @@ static NTSTATUS mh_create_file(vfs_handle_struct *handle, create_options, file_attributes, oplock_request, + lease, allocation_size, private_flags, sd, diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 3a45ecd..9dbbf8b 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -496,6 +496,7 @@ static NTSTATUS smb_time_audit_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -519,6 +520,7 @@ static NTSTATUS smb_time_audit_create_file(vfs_handle_struct *handle, create_options, /* create_options */ file_attributes, /* file_attributes */ oplock_request, /* oplock_request */ + lease, /* lease */ allocation_size, /* allocation_size */ private_flags, sd, /* sd */ diff --git a/source3/modules/vfs_worm.c b/source3/modules/vfs_worm.c index 77a18ca..3097419 100644 --- a/source3/modules/vfs_worm.c +++ b/source3/modules/vfs_worm.c @@ -32,6 +32,7 @@ static NTSTATUS vfs_worm_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, + struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -62,7 +63,7 @@ static NTSTATUS vfs_worm_create_file(vfs_handle_struct *handle, status = SMB_VFS_NEXT_CREATE_FILE( handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, - file_attributes, oplock_request, allocation_size, + file_attributes, oplock_request, lease, allocation_size, private_flags, sd, ea_list, result, pinfo); if (!NT_STATUS_IS_OK(status)) { return status; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index b76badf..3a3a339 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -531,6 +531,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr 0, /* create_options */ FILE_ATTRIBUTE_NORMAL, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + NULL, /* lease */ 0, /* allocation_size */ 0, /* private_flags */ NULL, /* sd */ @@ -584,6 +585,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr 0, /* create_options */ FILE_ATTRIBUTE_NORMAL, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + NULL, /* lease */ 0, /* allocation_size */ 0, /* private_flags */ NULL, /* sd */ @@ -762,6 +764,7 @@ static uint32 get_correct_cversion(struct auth_session_info *session_info, 0, /* create_options */ FILE_ATTRIBUTE_NORMAL, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + NULL, /* lease */ 0, /* private_flags */ 0, /* allocation_size */ NULL, /* sd */ diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 11abc6c..855b8c7 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -2359,6 +2359,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p, 0, /* create_options */ 0, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + NULL, /* lease */ 0, /* allocation_size */ 0, /* private_flags */ NULL, /* sd */ @@ -2506,6 +2507,7 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p, 0, /* create_options */ 0, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + NULL, /* lease */ 0, /* allocation_size */ 0, /* private_flags */ NULL, /* sd */ diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 2e68711..965e695 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -1128,6 +1128,7 @@ static NTSTATUS get_file_handle_for_metadata(connection_struct *conn, 0, /* create_options */ 0, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + NULL, /* lease */ 0, /* allocation_size */ 0, /* private_flags */ NULL, /* sd */ diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 2521a1e..0cf1ea3 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -574,6 +574,7 @@ void reply_ntcreate_and_X(struct smb_request *req) -- Samba Shared Repository