Bug 8012 - Use getgrset() instead of initgroups() + getgroups() when getgrouplist() is not defined
Summary: Use getgrset() instead of initgroups() + getgroups() when getgrouplist() is n...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.5.8
Hardware: PPC AIX
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 18:44 UTC by Yannick Bergeron (mail address dead)
Modified: 2011-03-29 19:50 UTC (History)
3 users (show)

See Also:


Attachments
0001-s3-use-getgrset-when-it-is-available.patch (3.44 KB, text/plain)
2011-03-28 12:19 UTC, Volker Lendecke
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yannick Bergeron (mail address dead) 2011-03-15 18:44:08 UTC
AIX doesn't have getgrouplist() subroutine.
Samba provides getgrouplist_internals() for such case.
getgrouplist_internals() calls initgroups() and getgroups() to fetch the group list of the user.
getgrset() could be used (if defined on the system) instead of initgroups() + getgroups()


I'm in touch with Volker Lendecke and Christian Ambach about this request.
A patch will be provided shortly

I would appreciate if it could be included in master, 3.5 and 3.6 once submitted

Best regards,

Yannick Bergeron
Comment 1 Yannick Bergeron (mail address dead) 2011-03-21 11:42:52 UTC
This has been committed:
master ed46dfc4f16e230645fae5f3b3b21c462694c30a
v3.6-test 026829635072d6446b80df27c1f13c062ce934a5

Could this be cherry-picked in v3.5-test also?


Best regards,

Yannick Bergeron
Comment 2 Volker Lendecke 2011-03-28 12:19:57 UTC
On Mon, Mar 21, 2011 at 11:42:52AM +0000, samba-bugs@samba.org wrote:
> master ed46dfc4f16e230645fae5f3b3b21c462694c30a
> v3.6-test 026829635072d6446b80df27c1f13c062ce934a5
> 
> Could this be cherry-picked in v3.5-test also?

Attached find a patch that applies to 3-5-test.

Volker
Comment 3 Volker Lendecke 2011-03-28 12:19:57 UTC
Created attachment 6353 [details]
0001-s3-use-getgrset-when-it-is-available.patch
Comment 4 Volker Lendecke 2011-03-28 14:05:37 UTC
Comment on attachment 6353 [details]
0001-s3-use-getgrset-when-it-is-available.patch

This has successfully been compiled on AIX, as well as ubuntu.
Comment 5 Stefan Metzmacher 2011-03-28 14:26:46 UTC
Comment on attachment 6353 [details]
0001-s3-use-getgrset-when-it-is-available.patch

Looks ok
Comment 6 Stefan Metzmacher 2011-03-28 14:28:46 UTC
Karolin, please pick for the next release
Comment 7 Karolin Seeger 2011-03-29 19:50:44 UTC
Pushed to v3-5-test.
Closing out bug report.

Thanks!