Bug 8972 - Directory group write permission bit is set if unix extensions are enabled
Summary: Directory group write permission bit is set if unix extensions are enabled
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P5 regression
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 8595
  Show dependency treegraph
 
Reported: 2012-06-02 22:41 UTC by pewpew
Modified: 2020-12-11 08:25 UTC (History)
0 users

See Also:


Attachments
my smb.conf in Ubuntu 12.04 (535 bytes, text/plain)
2012-06-04 22:54 UTC, pewpew
no flags Details
git-am fix for 3.5.next and also 3.6.next. (1.06 KB, patch)
2012-06-05 00:38 UTC, Jeremy Allison
vl: review+
Details
Test patchset I added to master. (6.02 KB, patch)
2012-06-05 03:49 UTC, Jeremy Allison
no flags Details
(Slightly fixed) tests I added to master. (6.03 KB, patch)
2012-06-05 04:00 UTC, Jeremy Allison
no flags Details
Updated patch for v3-6-test only. (1.04 KB, patch)
2012-06-13 17:49 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pewpew 2012-06-02 22:41:07 UTC
Samba server, mount.cifs client only - group write bit always set on directory created with unix extensions enabled, I mean client umask is being honored at all bits, except group write bit. If I disable unix extensions, then it works ok ("directory mask" parameter is working ok).
Smbclient and Windows clients work fine (no unix extensions involved (smbclient - why not?)). File creation works fine - umask is working.
Config parameters except "unix extensions" seem not involved in this bug, tried with ldap based auth, plain user auth, directory modes and more, nothing changed.

For reproducing just use default config with writable share.
Tried that with 3.4.7 Samba server - everything works as it should.

Servers affected: Samba 3.5.15 (Gentoo), 3.6.5 (Gentoo), 3.6.3 (Ubuntu 12.04)
Server unaffected: 3.4.7 (Ubuntu 10.04)
Clients used: mount.cifs 5.4 (Gentoo 3.2.16 kernel), mount.cifs 1.12-3.4.7 (Ubuntu 10.04 2.6.32-41 kernel)
Comment 1 Jeremy Allison 2012-06-04 21:26:56 UTC
I need to see your smb.conf file please - the exact one you use to reproduce this.

Jeremy.
Comment 2 pewpew 2012-06-04 22:54:16 UTC
Created attachment 7624 [details]
my smb.conf in Ubuntu 12.04

Ubuntu 12.04 smb.conf with comments stripped. Checked the config after clearing, it still works the same way.
Comment 3 Jeremy Allison 2012-06-05 00:38:04 UTC
Created attachment 7626 [details]
git-am fix for 3.5.next and also 3.6.next.

Obvious fix - we can't mess with file_attributes on a POSIX call.
Comment 4 Jeremy Allison 2012-06-05 00:38:25 UTC
Comment on attachment 7626 [details]
git-am fix for 3.5.next and also 3.6.next.

I will write a test for this for master.
Comment 5 Jeremy Allison 2012-06-05 00:40:27 UTC
We should get this in for next release.

Jeremy.
Comment 6 Jeremy Allison 2012-06-05 03:49:31 UTC
Created attachment 7627 [details]
Test patchset I added to master.
Comment 7 Jeremy Allison 2012-06-05 03:50:28 UTC
Comment on attachment 7627 [details]
Test patchset I added to master.

NB. No review needed, this is informational only to show how I have prevented any regressions for this bug in the future.

Jeremy.
Comment 8 Jeremy Allison 2012-06-05 04:00:22 UTC
Created attachment 7628 [details]
(Slightly fixed) tests I added to master.

No review needed, just informational.
Comment 9 Jeremy Allison 2012-06-05 04:05:41 UTC
Making it a blocker to make sure we don't release another 3.6.x or 3.5.x without this patch, it's a simple fix (but important) we really should get into the next release.

Jeremy.
Comment 10 Volker Lendecke 2012-06-06 12:04:46 UTC
Comment on attachment 7626 [details]
git-am fix for 3.5.next and also 3.6.next.

It is probably the minimum necessary change. I would assert however that overloading the file_attributes parameter to VFS_CREATEFILE depending on FILE_FLAG_POSIX_SEMANTICS is really bad design. The real fix IMHO is to have a separate parameter for the posix calls.
Comment 11 Jeremy Allison 2012-06-06 16:46:59 UTC
Re-assigning to Karolin for inclusion in 3.5.next and 3.6.next.

+1 on that being a REALLY BAD design :-). Sorry for that. Let's look into fixing it for the 4.0.x release.

Thanks for the review.

Jeremy.
Comment 12 Karolin Seeger 2012-06-13 17:37:34 UTC
Patch does not apply to current v3-6-test (ec7a5f259).
Re-assigning to Jeremy.
Comment 13 Jeremy Allison 2012-06-13 17:49:03 UTC
Created attachment 7642 [details]
Updated patch for v3-6-test only.

Sorry for the problem. Here's the same patch updated for v3-6-test.
Jeremy.
Comment 14 Jeremy Allison 2012-06-13 17:49:26 UTC
Re-assigning to Karolin for inclusion in 3.6.next.
Jeremy.
Comment 15 Karolin Seeger 2012-06-13 17:53:11 UTC
(In reply to comment #13)
> Created attachment 7642 [details]
> Updated patch for v3-6-test only.
> 
> Sorry for the problem. Here's the same patch updated for v3-6-test.
> Jeremy.

Thanks a lot, Jeremy!

Pushed to v3-6-test and v3-5-test.
Closing out bug report.

Thanks!