Summary: | Can not build on Solaris pam | ||
---|---|---|---|
Product: | ConsoleKit | Reporter: | Halton Huo <halton.huo> |
Component: | Daemon | Assignee: | william.jon.mccann |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | high | CC: | brian.cameron |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Solaris | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | patch for bug #18173 |
Description
Halton Huo
2008-10-22 01:36:07 UTC
I compared pam headers between Solaris and Ubuntu, I found some differences: 1. Solaris does not ship some headers like: security/_pam_macros.h On Ubuntu: mrbld@yonex:$ ls /usr/include/security/*pam* pam_appl.h _pam_compat.h pam_filter.h pam_misc.h pam_modutil.h pam_client.h pam_ext.h _pam_macros.h pam_modules.h _pam_types.h On Solaris: $ls /usr/include/security/ auditd.h pam_appl.h pkcs11f.h pkcs11t.h cryptoki.h pam_modules.h pkcs11.h 2. For the same headers pam_appl.h and pam_modules.h, their content are not same between the two systems. I'd say to support Solaris, these difference must be considered. Brian already has a patch on http://pkgbuild.svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/patches/ConsoleKit-03-pam.diff I'll work out a patch based on trunk later. Created attachment 19811 [details] [review] patch for bug #18173 This patch is a little different with Brian's. Let's me explain the whole patch one by one. 1. pam-ck-connector/Makefile.am (same with Brian's) Solaris does not have libpam_misc, so only build test_pam under linux 2. +#include <limits.h> This is to get macro PATH_MAX from system. I think it is better than +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif On ubuntu, PATH_MAX=4096, on Solaris, PATH_MAX=1024 3. +#include <security/pam_appl.h> This is to include declaration of pam_handle_t, to resolve error like: "/usr/include/security/pam_modules.h", line 38: syntax error before or at: * "/usr/include/security/pam_modules.h", line 45: syntax error before or at: * 4.-#include <security/_pam_macros.h> Solaris does not have this file, I remove it, no more error, seems no use here. 5. +#ifndef PAM_EXTERN ... part Solaris PAM_EXTERN marco in pam_modules.h, while Ubuntu has, I just copy the logic from Ubuntu. 6. getpwnam_r part (same with Brian's) getpwnam_r() have difference behavior between Solaris and Ubuntu. I've tested this patch on my OpenSolaris 2008.11 and Ubuntu-intrepid box. Both build OK. BTW, test-pam is avail on Ubuntu, I give a quick test on it, result is GO. Sorry for the long delay. Thanks for the patch! Committed to master. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.