Bug 1741 - nsswitch/winbind_nss_solaris.c doesnt compile on HP-UX
nsswitch/winbind_nss_solaris.c doesnt compile on HP-UX
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.6
PA-RISC HP-UX
: P3 major
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on: 1738
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-08 11:06 UTC by Richard Allen
Modified: 2005-08-24 10:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Allen 2004-09-08 11:06:00 UTC
Summary says it all.   After enabling Shared libraries on HP-UX, I saw some
"new" files get compiled for the first time and for the HP-UX platform, samba
wants to use winbind_nss_solaris.c but it did not compile due to a lack of a
definition of the nss_groupsbymem structure.
I found a OSS project called nss_ldap http://www.padl.com/OSS/nss_ldap.html
which hasd a definition of this struct and shamelessly stole it.

--- samba-3_0.orig/source/nsswitch/winbind_nss_solaris.c        2004-09-08
00:38:43.000000000 +0000
+++ samba-3_0/source/nsswitch/winbind_nss_solaris.c     2004-09-08
18:01:07.000000000 +0000
@@ -49,6 +49,22 @@
 
 #define NSS_ARGS(args) ((nss_XbyY_args_t *)args)
 
+#ifdef HPUX
+/*
+ * HP-UX 11 has no definiton of the nss_groupsbymem structure.   This
definition is 
+ * taken from the nss_ldap project at http://www.padl.com/OSS/nss_ldap.html
+ */
+struct nss_groupsbymem {
+       const char *username;
+       gid_t *gid_array;
+       int maxgids;
+       int force_slow_way;
+       int (*str2ent)(const char *instr, int instr_len, void *ent, char
*buffer, int buflen);
+       nss_status_t (*process_cstr)(const char *instr, int instr_len, struct
nss_groupsbymem *);
+       int numgids;
+};
+#endif /* HPUX */
+
 #define make_pwent_str(dest, src)                                      \
 {                                                                      \
   if((dest = get_static(buffer, buflen, strlen(src)+1)) == NULL)       \

Again, working on SVN revision 2248 (Samba 3.0.7 code)
Comment 1 Tim Potter 2004-09-08 20:37:28 UTC
Applying now.

When sending patches can you affix them to the bug as attachments instead of
inline in the comment?  It makes for a much easier and less error-prone patch
application process.
Comment 2 Tim Potter 2004-09-13 18:56:56 UTC
Can't be marked fixed until bug 1738 (DYNEXP problem) is also fixed.
Comment 3 Tim Potter 2004-09-30 19:48:45 UTC
Should be fixed as well.
Comment 4 Gerald (Jerry) Carter 2005-08-24 10:17:06 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.