Summary: | [fixed in 0.9] Non-portable Linux credentials passing not guarded by #ifdef | ||
---|---|---|---|
Product: | Telepathy | Reporter: | jack fink <jackfink> |
Component: | gabble | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | tk |
Version: | unspecified | ||
Hardware: | PowerPC | ||
OS: | Mac OS X (All) | ||
URL: | http://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=shortlog;h=refs/heads/credentials | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 22970 |
Description
jack fink
2009-07-27 11:00:47 UTC
ok, after adding #include <sys/ucred.h> to lib/gibber/gibber-unix-transport.c, i get this: gibber-unix-transport.c: In function 'gibber_unix_transport_send_credentials': gibber-unix-transport.c:228: error: 'SCM_CREDENTIALS' undeclared (first use in this function) gibber-unix-transport.c:228: error: (Each undeclared identifier is reported only once gibber-unix-transport.c:228: error: for each function it appears in.) gibber-unix-transport.c:231: error: 'struct ucred' has no member named 'pid' gibber-unix-transport.c:232: error: 'struct ucred' has no member named 'uid' gibber-unix-transport.c:233: error: 'struct ucred' has no member named 'gid' gibber-unix-transport.c: In function 'gibber_unix_transport_read': gibber-unix-transport.c:273: error: 'SO_PASSCRED' undeclared (first use in this function) gibber-unix-transport.c:330: error: 'struct ucred' has no member named 'pid' gibber-unix-transport.c:331: error: 'struct ucred' has no member named 'uid' gibber-unix-transport.c:332: error: 'struct ucred' has no member named 'gid' make[4]: *** [gibber-unix-transport.lo] Error 1 ...seems like our struct ucred is pretty different :( We currently assume that all Unix platforms can pass credentials around just like Linux. I'm working on making this optional. http://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=shortlog;h=refs/heads/darwin should hopefully compile and work (I tried changing the check for __linux__ to always fail, and the tests passed, with the credentials ones disabled). It would be interesting to see whether "make check" works on Darwin - if not, please paste or attach the output. The code you added inhttp://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=commitdiff;h=e7a8069afccb1ed221c84f7e8e3b5bc478fbbedc could be a function in tubetestutil.py. In tests, we could use sys.platform and assert that Credentials is supported if the OS is Linux. exec_stream_tube_test() should be modified to not try to use Credentials if the OS is not Linux. *** Bug 23346 has been marked as a duplicate of this bug. *** I've renamed the branch to be more accurately named (capabilities rather than darwin, since this change is necessary but not sufficient to compile on Darwin) and redone the patch against the tests. ++ Thanks. Fixed in git, will be in 0.9.0. Not backporting to 0.8, at least for now, since this change isn't sufficient to compile on Darwin/BSD/etc. anyway. Just for the record: 0.7.21 compiles fine on NetBSD, only the 0.8 series introduced the compilation problem. So there probably _is_ a point in backporting it. I'm not sure it's worth the effort -- when's 0.9 due? (In reply to comment #9) > Just for the record: 0.7.21 compiles fine on NetBSD That would be because it was less featureful, and the non-portable code had not yet been introduced :-) Any further compilation-failure reports for git master would be welcome (note that asyncns.[ch] comes from a different upstream - http://0pointer.de/lennart/projects/libasyncns/ - so we'd prefer to fix any portability problems there by sending patches to Lennart, rather than unilaterally changing things ourselves). I'd prefer to wait til platform-independent bugfixing on 0.8.x has slowed down a bit (or at least until git master compiles on misc platforms without patching!) before backporting portability fixes to it. Was fixed in 0.9.0. The Windows-compatibility changes on Bug #24395 (an as-yet unmerged branch for 0.8, including a 0.8 backport of this patch) might help BSD/Darwin too, since they're mostly "don't assume everything is Linux". |
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.