Hey Stuart,

Thanks for the info.  I have a pending pull request in with go-serial
to no-op on OpenBSD, somewhat like the freebsd code does:

https://github.com/jacobsa/go-serial/pull/42/files

As for dbus, I discussed with the beehive author, and his suggestion
was to disable dbus and serial hives for the time being so it will
build on OpenBSD and other hives will be available.  He's done that,
and I've tested it for build.

Works "as expected" with those two hives disabled for BSD.

Thanks again,
Jonathon

On Thu, May 9, 2019 at 2:41 AM Stuart Henderson <s...@spacehopper.org> wrote:
>
> Just looking at the ucred bits (I'm not sure about go-serial/openinternal) ..
>
> This relates to a mechanism for fetching information about the process
> other side of a unix socket connection. Most common Unix-like OS can give
> some information about this (usually at least user/group credentials,
> sometimes also pretty information including PID), the mechanisms are
> slightly different (various names are used for the relevant sockopt, and
> the structures vary, though for basic credentials they're close enough that
> C programs handling this often just use #defines for the names).
>
> It seems that getting this to work would need changes to add wider OS
> support for socket credentials to the go "sys" package (go.dbus is
> currently using "syscall" but it seems this is frozen for development), and
> go.dbus would need changes to use it.
>
> --
> Sent from a phone, apologies for poor formatting.
>
> On 9 May 2019 05:16:26 J Sisson <sisso...@gmail.com> wrote:
>
> > Hey Ports,
> >
> >
> > With go-1.12.4 in OpenBSD-CURRENT/amd64, I'm running across some
> > undefined symbols, and wanted to see if this is expected/known
> > behavior:
> >
> >
> > test$ git clone https://github.com/muesli/beehive.git
> > test$ cd beehive
> > test$ gmake
> > <snip>
> > # github.com/guelfey/go.dbus
> > ../go/pkg/mod/github.com/guelfey/go.dbus@v0.0.0-20131113121618-f6a3a2366cc3/transport_unixcred.go:12:12:
> > undefined: syscall.Ucred
> > ../go/pkg/mod/github.com/guelfey/go.dbus@v0.0.0-20131113121618-f6a3a2366cc3/transport_unixcred.go:13:7:
> > undefined: syscall.UnixCredentials
> > # github.com/jacobsa/go-serial/serial
> > ../go/pkg/mod/github.com/jacobsa/go-serial@v0.0.0-20180131005756-15cf729a72d4/serial/serial.go:165:9:
> > undefined: openInternal
> > gmake: *** [Makefile:20: build] Error 2
> > test$
> >
> >
> > Are these linuxisms in the go packages?  They appear to be to my untrained 
> > eye:
> >
> >
> > test$ pwd
> > /usr/local/go/src/syscall
> > test$ egrep 'UnixCredentials|UCred' *
> > creds_test.go:                  oob := syscall.UnixCredentials(&ucred)
> > creds_test.go:          oob := syscall.UnixCredentials(&ucred)
> > creds_test.go:          newUcred, err := 
> > syscall.ParseUnixCredentials(&scm[0])
> > creds_test.go:                  t.Fatalf("ParseUnixCredentials: %v", err)
> > creds_test.go:                  t.Fatalf("ParseUnixCredentials = %+v,
> > want %+v", newUcred, ucred)
> > sockcmsg_linux.go:// UnixCredentials encodes credentials into a socket
> > control message
> > sockcmsg_linux.go:func UnixCredentials(ucred *Ucred) []byte {
> > sockcmsg_linux.go:// ParseUnixCredentials decodes a socket control
> > message that contains
> > sockcmsg_linux.go:func ParseUnixCredentials(m *SocketControlMessage)
> > (*Ucred, error) {
> >
> >
> >
> >
> > Regards,
> > Jonathon
>
>
>


-- 
"In the real world, Scully would almost always be right and Mulder
would almost always be wrong." -Carpetsmoker

"the biggest proof of intelligent life out there is... they've not
contacted us."
-EvilBagel

"The doctors in a mental institution were thinking of releasing a
certain schizophrenic patient. They decided to give him a test under a
lie detector. One of the questions they asked him was, "Are you
Napoleon?" He replied, "No." The machine showed that he was lying."

Reply via email to