You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
732 B

Index: src/github.com/godbus/dbus/transport_unixcred_linux.go
--- src/github.com/godbus/dbus/transport_unixcred_linux.go.orig 2014-07-06 14:44:14.000000000 +0200
+++ src/github.com/godbus/dbus/transport_unixcred_linux.go 2014-07-06 20:08:08.697040949 +0200
@@ -2,21 +2,7 @@
package dbus
-import (
- "io"
- "os"
- "syscall"
-)
-
func (t *unixTransport) SendNullByte() error {
- ucred := &syscall.Ucred{Pid: int32(os.Getpid()), Uid: uint32(os.Getuid()), Gid: uint32(os.Getgid())}
- b := syscall.UnixCredentials(ucred)
- _, oobn, err := t.UnixConn.WriteMsgUnix([]byte{0}, b, nil)
- if err != nil {
- return err
- }
- if oobn != len(b) {
- return io.ErrShortWrite
- }
- return nil
+ _, err := t.Write([]byte{0})
+ return err
}