User reported that the transition from Samba 4.15 to 4.17 resulted in share parameter "access based share enum" ceased to work properly (share always rejected from share list). It appears that Samba is now trying to open share_info.tdb as the user in question and failing because file permissions are 0o600. ``` [2022/12/16 07:12:04, 0] ../../source3/lib/sharesec.c:161(share_info_db_init) Failed to open share info database /var/db/system/samba4/share_info.tdb (Permission denied) ``` Merge request here: https://gitlab.com/samba-team/samba/-/merge_requests/2853 Gist of fix is to wrap share_access_check() in become_root() / unbecome_root() pair.
This bug was referenced in samba master: 80c0b416892bfacc0d919fe032461748d7962f05
Created attachment 17707 [details] git-am fix for 4.17.next, 4.16.next. Cherry-picked from master.
Comment on attachment 17707 [details] git-am fix for 4.17.next, 4.16.next. LGTM
Re-assigned to Jule for integration into 4.17.next, 4.16.next.
Pushed to autobuild-v4-{17,16}-test.
This bug was referenced in samba v4-16-test: b9d02e857b2cd95a207e06e5c29daa23c45d180d
This bug was referenced in samba v4-17-test: 4f47415e248452dc34b10008474853bbc81a2165
Closing out bug report. Thanks!
This bug was referenced in samba v4-17-stable (Release samba-4.17.5): 4f47415e248452dc34b10008474853bbc81a2165
This bug was referenced in samba v4-16-stable (Release samba-4.16.9): b9d02e857b2cd95a207e06e5c29daa23c45d180d
This bug was referenced in samba master: ff3b50034e2821e54633daafc751d3ea3c00f4c3 8cfc6ea92320be4ef26b91fce58fd76bfc7b95eb
*** Bug 15647 has been marked as a duplicate of this bug. ***