Bug 11068 - smbcacls does not set hex-encoded permissions correctly.
Summary: smbcacls does not set hex-encoded permissions correctly.
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.1.16
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-01-23 12:58 UTC by Zoe O'Connell
Modified: 2015-06-06 20:03 UTC (History)
2 users (show)

See Also:

Patch to resolve bug (493 bytes, patch)
2015-01-23 12:58 UTC, Zoe O'Connell
no flags Details
git-am fix for 4.2.next. (1.13 KB, patch)
2015-05-22 07:22 UTC, Jeremy Allison
jmcd: review+
git-am fix for 4.1.next. (978 bytes, patch)
2015-05-22 07:28 UTC, Jeremy Allison
jmcd: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Zoe O'Connell 2015-01-23 12:58:03 UTC
Created attachment 10655 [details]
Patch to resolve bug

smbcacls does not read hex permissions strings in set/modify options correctly, as the code is expecting an unsigned int. This results in the permissions being set to 0x0.

Example of broken behaviour:

zoe@server:~$ smbcacls --add "ACL:Domain\AUser:ALLOWED/OI|CI/0x001301ff" //server/share filename.txt

zoe@server:~$ smbcacls //server/share filename.txt

Verified as broken on 4.1.12, 4.1.16. Patch attached.
Comment 1 Jeremy Allison 2015-05-21 10:30:14 UTC
Perfect fix ! I just came across the same problem and created the same fix :-).

I'll get this into 4.2.next, 4.1.next.

Thanks !
Comment 2 Jeremy Allison 2015-05-22 07:22:20 UTC
Created attachment 11081 [details]
git-am fix for 4.2.next.

Jim please review for 4.2.next.
Comment 3 Jeremy Allison 2015-05-22 07:28:11 UTC
Created attachment 11082 [details]
git-am fix for 4.1.next.

Back-port for 4.1.next. Jim please review.
Comment 4 Jeremy Allison 2015-05-23 15:55:36 UTC
Re-assigning to Kaolin for inclusion in 4.2.next and 4.1.next.

Comment 5 Karolin Seeger 2015-06-01 19:09:25 UTC
(In reply to Jeremy Allison from comment #4)
Pushed to autobuild-v4-[1|2]-test.
Comment 6 Karolin Seeger 2015-06-06 20:03:40 UTC
(In reply to Karolin Seeger from comment #5)
Pushed to v4-[1|2]-test.
Closing out bug report.