Bug 1627 - NIS workarounds
Summary: NIS workarounds
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.5
Hardware: Other AIX
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-18 09:02 UTC by Olaf Flebbe
Modified: 2005-08-24 10:21 UTC (History)
0 users

See Also:


Attachments
patch for NIS (HP-UX and AIX) (1.53 KB, patch)
2004-08-18 09:02 UTC, Olaf Flebbe
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Flebbe 2004-08-18 09:02:06 UTC
Since the nis headers are broken on HPUX 11.00, AIX 4.3 and 5.1 
a propose a workaround.


The workaround is tested on quite a few Unices and Linuxes: Linux (Redhat 7.1
and 9), Solaris 5.6, Solaris 8, AIX4.3, AIX 5.1, HPUX 10.20, HPUX 11.00, HPUX
11.22, IRIX 6.5. FreeBSD 4.7. In short: it should behave correctly.

1) 

HPUX 11.00: yp_match is declared 
/usr/include/rpcsvc/ypclnt.h:extern int yp_match(char *, char *, char *, int,
char **, int *);

That's a problem for HP's own C-compiler: the const argument user_name from
automount_lookup(), which is tried to pass non-const to yp_match.

I propose the remove the const from automount_lookup argument. (It must be
removed from both implementations, otherwise different conflicting headers show
up in includes/proto.h)

And two problems for AIX-5.1 (and AIX-4.3)

2) <rpcsvc/ypclnt.h> is not shielded with #ifndef against multiple inclusion.
proposed patch to remove the #include "rpcsvc/ypclnt.h", it is included in
include/includes, anyway.

3) The struct ypall_callback is only declared forward in  <rpcsvc/yp_prot.h>.
therefore I get compiler error with xlc. changing the order of declaration fixes
this.
Comment 1 Olaf Flebbe 2004-08-18 09:02:33 UTC
Created attachment 608 [details]
patch for NIS (HP-UX and AIX)
Comment 2 Gerald (Jerry) Carter (dead mail address) 2004-08-31 07:17:42 UTC
Looks right to me.  I'll check it in and watch the build farm.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:39:19 UTC
originally against 3.0.6rc2
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:21:46 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.