Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendmsg fails with 'Invalid argument' in OpenBSD #21

Closed
ghost opened this issue May 2, 2012 · 5 comments
Closed

sendmsg fails with 'Invalid argument' in OpenBSD #21

ghost opened this issue May 2, 2012 · 5 comments
Assignees

Comments

@ghost
Copy link

ghost commented May 2, 2012

The following special handling of *BSD in authenticate.rb fails on OpenBSD with error 'Invalid argument'. We solved the problem by commenting out the special code and just calling @socket.write as on other systems.

if (RbConfig::CONFIG["target_os"] =~ /bsd/)
    @socket.sendmsg(0.chr, 0, nil, [:SOCKET, :SCM_CREDS, ""])
@mvidner
Copy link
Owner

mvidner commented May 11, 2012

Thanks for the report. I have tried to reproduce it on 5.1 with MarBSD and there it even fails with undefined method sendmsg' for #Socket:...`
I'll have a closer look.

@ghost ghost assigned mvidner May 11, 2012
@mvidner
Copy link
Owner

mvidner commented May 11, 2012

Ah, sendmsg is only available since ruby-1.9.2.

@ghost
Copy link
Author

ghost commented May 12, 2012

Sorry, I should have stated my Ruby version, I'm running 1.9.3 on the latest OpenBSD-snapshot (I can't remember the version number now but I can look it up on Monday if needed).
It seems to work without problems using the regular write-call as on the other platforms. I was in the middle of preparing a customer demo so I didn't have time to look deeper into it after I got it working.

Thanks,
Adde

On May 11, 2012, at 4:30 PM, Martin Vidner wrote:

Thanks for the report. I have tried to reproduce it on 5.1 with MarBSD and there it even fails with undefined method sendmsg' for #Socket:...`
I'll have a closer look.


Reply to this email directly or view it on GitHub:
#21 (comment)

@mvidner
Copy link
Owner

mvidner commented May 15, 2012

Fixed in commit beab496: use SCM_CREDS only on FreeBSD. It's still a hack, I'll consult on thee DBus mailing list for a better solution.

@mvidner mvidner closed this as completed May 15, 2012
@ghost
Copy link
Author

ghost commented May 17, 2012

Great, thanks a lot!

/Adde

On May 15, 2012, at 10:33 PM, Martin Vidner wrote:

Fixed in commit beab496: use SCM_CREDS only on FreeBSD. It's still a hack, I'll consult on thee DBus mailing list for a better solution.


Reply to this email directly or view it on GitHub:
#21 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant