| Summary: | dbus fixes for Interix | ||
|---|---|---|---|
| Product: | Gentoo/Alt | Reporter: | Greg Turner <gmturner007> |
| Component: | Prefix Support | Assignee: | Markus Duft (RETIRED) <mduft> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Interix | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Don't coredump for sigpipe writing "credentials" byte
Don't do UNIX FD passing on Interix Support the absurd interix pseudo-root uid 197108 Patches to the dbus ebuild which merge the above patches and so some other work |
||
|
Description
Greg Turner
2010-01-14 02:46:30 UTC
Created attachment 216441 [details, diff]
Don't coredump for sigpipe writing "credentials" byte
Kinda superfluous, since the same problem is redundantly worked around by another patch -- but nevertheless, theoretically speaking, this patch is required because Interix is apparently less forgiving of writes to recently closed pipes than "real" UNICES.
Created attachment 216442 [details, diff]
Don't do UNIX FD passing on Interix
Interix has the #defines for passing FD's over AF_UNIX sockets -- but it doesn't work (at least, I can't make it work). So these patches prevent these code-paths from being activated on Interix.
Created attachment 216443 [details, diff]
Support the absurd interix pseudo-root uid 197108
Support the brilliant innovation of Interix that the root uid is 197108 instead of zero.
Created attachment 216444 [details, diff]
Patches to the dbus ebuild which merge the above patches and so some other work
Aside from applying the above patches, this patch to the dbus-1.3.0-r1 ebuild also defines _REENTRANT (which provides some API's dbus expects), hacks the config.h files generated by configure, and changes --with-dbus-user=messagebus to --with-dbus-user=Administrator on Interix.
Comment on attachment 216443 [details, diff]
Support the absurd interix pseudo-root uid 197108
This also fakes the credentials passing (I stole the code from dbus-win32) and uses an enormous buffer for filenames, fixing some nasty stack corruption problems.
Hey, this is really good news :) i'll look bringing this into the tree(s). just one thing: is it possible to keep root _and_ Administrator in that config files, so that i don't have to make the patch conditional? the rest of the patches seems like they could be applied on all platforms... (In reply to comment #6) > Hey, this is really good news :) i'll look bringing this into the tree(s). just > one thing: is it possible to keep root _and_ Administrator in that config > files, so that i don't have to make the patch conditional? I don't know enough about the dbus script language to answer. So... perhaps. > the rest of the > patches seems like they could be applied on all platforms... I think the big filename buffer is clearly interix-specific. Although I think I read that OSX users suffer from this too. Also the SIGPIPE patch is of sufficiently dubious merit that it should not go in on all arches -- perhaps it should be dropped entirely. (In reply to comment #7) > (In reply to comment #6) > > Hey, this is really good news :) i'll look bringing this into the tree(s). just > > one thing: is it possible to keep root _and_ Administrator in that config > > files, so that i don't have to make the patch conditional? It is worth noting that not everybody has "Administrator" here -- some will have "Domain Admin," I think (?), and others may have renamed the Administrator account to something else. To get a really reliable answer, I guess we should be doing "whoami" and some "sed" magic? Is it ever valid for someone to be emerging as non-root on Interix? (In reply to comment #8) [snip] > It is worth noting that not everybody has "Administrator" here -- some will > have "Domain Admin," I think (?), and others may have renamed the Administrator > account to something else. To get a really reliable answer, I guess we should > be doing "whoami" and some "sed" magic? Is it ever valid for someone to be > emerging as non-root on Interix? > mhm, right - i guess i'll be ending asking portage, which user is the "portage-root-user", and be using that as dbus root too... i know it's not perfect, as even a normale user can install prefix/dbus, but isn't this required just for the system busses? (In reply to comment #9) > (In reply to comment #8) > [snip] > > It is worth noting that not everybody has "Administrator" here -- some will > > have "Domain Admin," I think (?), and others may have renamed the Administrator > > account to something else. To get a really reliable answer, I guess we should > > be doing "whoami" and some "sed" magic? Is it ever valid for someone to be > > emerging as non-root on Interix? > > > mhm, right - i guess i'll be ending asking portage, which user is the > "portage-root-user", and be using that as dbus root too... i know it's not > perfect, as even a normale user can install prefix/dbus, but isn't this > required just for the system busses? I dunno. I think so, but I only ever use the session bus in real life. I probably patched it in order to make the test suite get further. i just committed this. i refactored a little, as you might see in the ebuild. it now at least compiles (here on interix 5.2). could you give it a try? (In reply to comment #11) > i just committed this. i refactored a little, as you might see in the ebuild. > it now at least compiles (here on interix 5.2). could you give it a try? Seems to work :) |