Bug 11508 - nss_tests.c too many arguments to getpwent_r
Summary: nss_tests.c too many arguments to getpwent_r
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.3.0
Hardware: All Solaris
: P5 major (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-09 17:49 UTC by Tom Schulz
Modified: 2020-12-11 13:24 UTC (History)
5 users (show)

See Also:


Attachments
Fix for Solaris getpwent_r and getgrent_r (932 bytes, patch)
2015-09-15 00:28 UTC, Tom Schulz
slow: review+
jra: review+
Details
patch for 4.3 cherry-picked from master (1.88 KB, patch)
2015-10-05 19:56 UTC, Michael Adam
obnox: review+
jra: review+
obnox: review? (slow)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Schulz 2015-09-09 17:49:04 UTC
Trying to build 4.3.0 on a Solaris 10 i386 box. nss_tests.c fails to compile with the error too many arguments to function 'getpwent_r' and also to function getgrent_r. Checking around, I see that the GNU versions of these functions take one more argument than the Solaris version. The error output is:

[2473/3885] Compiling source4/torture/local/nss_tests.c
../source4/torture/local/nss_tests.c: In function 'test_enum_r_passwd':
../source4/torture/local/nss_tests.c:352:3: error: too many arguments to function 'getpwent_r'
In file included from /usr/include/crypt.h:18:0,
                 from ../lib/replace/../replace/replace.h:843,
                 from ../source4/include/includes.h:23,
                 from ../source4/torture/local/nss_tests.c:22:
/usr/include/pwd.h:57:23: note: declared here
../source4/torture/local/nss_tests.c:352:7: warning: assignment makes integer from pointer without a cast [enabled by default]
../source4/torture/local/nss_tests.c: In function 'test_enum_r_group':
../source4/torture/local/nss_tests.c:546:3: error: too many arguments to function 'getgrent_r'
In file included from ../lib/replace/system/passwd.h:38:0,
                 from ../source4/torture/local/nss_tests.c:26:
/usr/include/grp.h:43:22: note: declared here
../source4/torture/local/nss_tests.c:546:7: warning: assignment makes integer from pointer without a cast [enabled by default]
Waf: Leaving directory `/home/projects/tools/samba/samba-4.3.0rc4.i386/bin'
Comment 1 Tom Schulz 2015-09-15 00:28:27 UTC
Created attachment 11441 [details]
Fix for Solaris getpwent_r and getgrent_r

Patch to use only three arguments for Solaris.
Comment 2 Jeremy Allison 2015-09-16 20:38:29 UTC
(In reply to Tom Schulz from comment #1)

Tom, can I add your 'Signed-off-by:' and push to master ?

Thanks,

Jeremy.
Comment 3 Tom Schulz 2015-09-16 23:42:50 UTC
Please do.
Comment 4 Volker Lendecke 2015-09-26 20:06:32 UTC
This misses configure tests
Comment 5 Volker Lendecke 2015-09-26 20:08:17 UTC
Hmm. I take this back. There are configure tests, but for some reason it still fails the build for me.
Comment 6 Michael Adam 2015-10-05 19:56:11 UTC
Created attachment 11478 [details]
patch for 4.3 cherry-picked from master
Comment 7 Michael Adam 2015-10-05 20:01:27 UTC
(In reply to Volker Lendecke from comment #5)
> 
> ... but for some reason it still fails the build for me.

Is that possibly a linking error because of getgrouplist() not defined?

That would be yet another bug.
Comment 8 Michael Adam 2015-10-05 20:10:58 UTC
(In reply to Michael Adam from comment #7)
> (In reply to Volker Lendecke from comment #5)
> > 
> > ... but for some reason it still fails the build for me.
> 
> Is that possibly a linking error because of getgrouplist() not defined?
> 
> That would be yet another bug.

It aready exists: bug #11512.
Comment 9 Jeremy Allison 2015-10-05 21:57:17 UTC
Comment on attachment 11478 [details]
patch for 4.3 cherry-picked from master

LGTM.
Comment 10 Jeremy Allison 2015-10-05 21:57:44 UTC
Karolin please push to 4.3.next.
Comment 11 Karolin Seeger 2015-10-12 18:50:33 UTC
(In reply to Jeremy Allison from comment #10)
Pushed to autobuild-v4-3-test.
Comment 12 Karolin Seeger 2015-10-19 08:48:25 UTC
(In reply to Karolin Seeger from comment #11)
Pushed to v4-3-test.
Closing out bug report.

Thanks!