The Samba-Bugzilla – Attachment 7942 Details for
Bug 9054
vfs_acl_xattr module in Samba 3.6.6 ignores Sgid bit of directories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch proposal for samba4 git (v 0.2)
0001-s3-smbd-fix-SGID-bit-inheritance.patch (text/plain), 1.42 KB, created by
Arvid Requate
on 2012-09-26 17:37:21 UTC
(
hide
)
Description:
Patch proposal for samba4 git (v 0.2)
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2012-09-26 17:37:21 UTC
Size:
1.42 KB
patch
obsolete
>From 93501062d5291f3696f1137bb359f1e628a73b7e Mon Sep 17 00:00:00 2001 >From: Arvid Requate <requate@univention.de> >Date: Wed, 26 Sep 2012 18:46:09 +0200 >Subject: [PATCH] s3:smbd fix SGID bit inheritance > >--- > source3/smbd/open.c | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/open.c b/source3/smbd/open.c >index 10c855c..a8889f4 100644 >--- a/source3/smbd/open.c >+++ b/source3/smbd/open.c >@@ -3468,7 +3468,29 @@ static NTSTATUS inherit_new_acl(files_struct *fsp) > inheritable_components = sd_has_inheritable_components(parent_desc, > fsp->is_directory); > >- if (!inheritable_components && !inherit_owner) { >+ /* SGID handling */ >+ bool inherit_sgid = false; >+ struct smb_filename parent_fname = { 0, }; >+ int res; >+ if (!parent_dirname(ctx, fsp->fsp_name->base_name, &parent_fname.base_name, NULL)) { >+ DEBUG(1, ("parent_dirname failed\n")); >+ /* TODO */ >+ } >+ >+ res = SMB_VFS_STAT(fsp->conn, &parent_fname); >+ if (res == -1) { >+ DEBUG(10, ("VFS_STAT(%s) failed: %s\n", parent_fname.base_name, >+ strerror(errno))); >+ /* TODO */ >+ } >+ TALLOC_FREE(parent_fname.base_name); >+ if ((parent_fname.st.st_ex_mode & S_ISGID) != 0) { >+ /* SGID to inherit */ >+ inherit_sgid = true; >+ group_sid = parent_desc->group_sid; >+ } >+ >+ if (!inheritable_components && !inherit_owner && !inherit_sgid) { > /* Nothing to inherit and not setting owner. */ > return NT_STATUS_OK; > } >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9054
:
7940
|
7941
| 7942