mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
build(deps): bump github.com/godbus/dbus/v5 from 5.2.0 to 5.2.2
Bumps [github.com/godbus/dbus/v5](https://github.com/godbus/dbus) from 5.2.0 to 5.2.2. - [Release notes](https://github.com/godbus/dbus/releases) - [Commits](https://github.com/godbus/dbus/compare/v5.2.0...v5.2.2) --- updated-dependencies: - dependency-name: github.com/godbus/dbus/v5 dependency-version: 5.2.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
@@ -8,7 +8,7 @@ require (
|
||||
github.com/coreos/go-systemd/v22 v22.6.0
|
||||
github.com/cyphar/filepath-securejoin v0.6.1
|
||||
github.com/docker/go-units v0.5.0
|
||||
github.com/godbus/dbus/v5 v5.2.0
|
||||
github.com/godbus/dbus/v5 v5.2.2
|
||||
github.com/moby/sys/capability v0.4.0
|
||||
github.com/moby/sys/mountinfo v0.7.2
|
||||
github.com/moby/sys/user v0.4.0
|
||||
|
||||
@@ -20,8 +20,8 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
|
||||
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
|
||||
github.com/godbus/dbus/v5 v5.2.0 h1:3WexO+U+yg9T70v9FdHr9kCxYlazaAXUhx2VMkbfax8=
|
||||
github.com/godbus/dbus/v5 v5.2.0/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
|
||||
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
|
||||
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
# See https://cirrus-ci.org/guide/FreeBSD/
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-2
|
||||
image_family: freebsd-14-3
|
||||
|
||||
task:
|
||||
name: Test on FreeBSD
|
||||
install_script: pkg install -y go122 dbus
|
||||
install_script: pkg install -y go125 dbus
|
||||
test_script: |
|
||||
/usr/local/etc/rc.d/dbus onestart && \
|
||||
eval `dbus-launch --sh-syntax` && \
|
||||
go122 test -v ./...
|
||||
go125 test -v ./...
|
||||
|
||||
+8
-2
@@ -1,7 +1,13 @@
|
||||
# For documentation, see https://golangci-lint.run/usage/configuration/
|
||||
version: "2"
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- gofumpt
|
||||
- unconvert
|
||||
- unparam
|
||||
exclusions:
|
||||
presets:
|
||||
- std-error-handling
|
||||
|
||||
formatters:
|
||||
enable:
|
||||
- gofumpt
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ func (conn *Conn) Auth(methods []Auth) error {
|
||||
methods = getDefaultAuthMethods(uid)
|
||||
}
|
||||
in := bufio.NewReader(conn.transport)
|
||||
err := conn.transport.SendNullByte()
|
||||
err := conn.SendNullByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package dbus
|
||||
|
||||
|
||||
+2
-15
@@ -7,7 +7,6 @@ import (
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"os"
|
||||
"os/user"
|
||||
)
|
||||
|
||||
// AuthCookieSha1 returns an Auth that authenticates as the given user with the
|
||||
@@ -102,21 +101,9 @@ func (a authCookieSha1) generateChallenge() []byte {
|
||||
return enc
|
||||
}
|
||||
|
||||
// Get returns the home directory of the current user, which is usually the
|
||||
// value of HOME environment variable. In case it is not set or empty, os/user
|
||||
// package is used.
|
||||
//
|
||||
// If linking statically with cgo enabled against glibc, make sure the
|
||||
// osusergo build tag is used.
|
||||
//
|
||||
// If needing to do nss lookups, do not disable cgo or set osusergo.
|
||||
func getHomeDir() string {
|
||||
homeDir := os.Getenv("HOME")
|
||||
if homeDir != "" {
|
||||
return homeDir
|
||||
}
|
||||
if u, err := user.Current(); err == nil {
|
||||
return u.HomeDir
|
||||
if dir, err := os.UserHomeDir(); err == nil {
|
||||
return dir
|
||||
}
|
||||
return "/"
|
||||
}
|
||||
|
||||
+6
-4
@@ -445,7 +445,8 @@ func (conn *Conn) handleSignal(sequence Sequence, msg *Message) {
|
||||
// sender is optional for signals.
|
||||
sender, _ := msg.Headers[FieldSender].value.(string)
|
||||
if iface == "org.freedesktop.DBus" && sender == "org.freedesktop.DBus" {
|
||||
if member == "NameLost" {
|
||||
switch member {
|
||||
case "NameLost":
|
||||
// If we lost the name on the bus, remove it from our
|
||||
// tracking list.
|
||||
name, ok := msg.Body[0].(string)
|
||||
@@ -453,7 +454,7 @@ func (conn *Conn) handleSignal(sequence Sequence, msg *Message) {
|
||||
panic("Unable to read the lost name")
|
||||
}
|
||||
conn.names.loseName(name)
|
||||
} else if member == "NameAcquired" {
|
||||
case "NameAcquired":
|
||||
// If we acquired the name on the bus, add it to our
|
||||
// tracking list.
|
||||
name, ok := msg.Body[0].(string)
|
||||
@@ -512,9 +513,10 @@ func isEncodingError(err error) bool {
|
||||
}
|
||||
|
||||
func (conn *Conn) handleSendError(msg *Message, err error) {
|
||||
if msg.Type == TypeMethodCall {
|
||||
switch msg.Type {
|
||||
case TypeMethodCall:
|
||||
conn.calls.handleSendError(msg, err)
|
||||
} else if msg.Type == TypeMethodReply {
|
||||
case TypeMethodReply:
|
||||
if isEncodingError(err) {
|
||||
// Make sure that the caller gets some kind of error response if
|
||||
// the application code tried to respond, but the resulting message
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !darwin
|
||||
// +build !darwin
|
||||
|
||||
package dbus
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !windows && !solaris && !darwin
|
||||
// +build !windows,!solaris,!darwin
|
||||
|
||||
package dbus
|
||||
|
||||
|
||||
+3
-2
@@ -291,9 +291,10 @@ func sigByteSize(sig string) int {
|
||||
i := 1
|
||||
depth := 1
|
||||
for i < len(sig[offset:]) && depth != 0 {
|
||||
if sig[offset+i] == '(' {
|
||||
switch sig[offset+i] {
|
||||
case '(':
|
||||
depth++
|
||||
} else if sig[offset+i] == ')' {
|
||||
case ')':
|
||||
depth--
|
||||
}
|
||||
i++
|
||||
|
||||
+13
-11
@@ -89,9 +89,10 @@ func getSignature(t reflect.Type, depth *depthCounter) (sig string) {
|
||||
}
|
||||
return "s"
|
||||
case reflect.Struct:
|
||||
if t == variantType {
|
||||
switch t {
|
||||
case variantType:
|
||||
return "v"
|
||||
} else if t == signatureType {
|
||||
case signatureType:
|
||||
return "g"
|
||||
}
|
||||
var s string
|
||||
@@ -183,26 +184,26 @@ func (cnt *depthCounter) Valid() bool {
|
||||
return cnt.arrayDepth <= 32 && cnt.structDepth <= 32 && cnt.dictEntryDepth <= 32
|
||||
}
|
||||
|
||||
func (cnt *depthCounter) EnterArray() *depthCounter {
|
||||
func (cnt depthCounter) EnterArray() *depthCounter {
|
||||
cnt.arrayDepth++
|
||||
return cnt
|
||||
return &cnt
|
||||
}
|
||||
|
||||
func (cnt *depthCounter) EnterStruct() *depthCounter {
|
||||
func (cnt depthCounter) EnterStruct() *depthCounter {
|
||||
cnt.structDepth++
|
||||
return cnt
|
||||
return &cnt
|
||||
}
|
||||
|
||||
func (cnt *depthCounter) EnterDictEntry() *depthCounter {
|
||||
func (cnt depthCounter) EnterDictEntry() *depthCounter {
|
||||
cnt.dictEntryDepth++
|
||||
return cnt
|
||||
return &cnt
|
||||
}
|
||||
|
||||
// Try to read a single type from this string. If it was successful, err is nil
|
||||
// and rem is the remaining unparsed part. Otherwise, err is a non-nil
|
||||
// SignatureError and rem is "". depth is the current recursion depth which may
|
||||
// not be greater than 64 and should be given as 0 on the first call.
|
||||
func validSingle(s string, depth *depthCounter) (err error, rem string) {
|
||||
func validSingle(s string, depth *depthCounter) (err error, rem string) { //nolint:staticcheck // Ignore "ST1008: error should be returned as the last argument".
|
||||
if s == "" {
|
||||
return SignatureError{Sig: s, Reason: "empty signature"}, ""
|
||||
}
|
||||
@@ -258,9 +259,10 @@ func validSingle(s string, depth *depthCounter) (err error, rem string) {
|
||||
func findMatching(s string, left, right rune) int {
|
||||
n := 0
|
||||
for i, v := range s {
|
||||
if v == left {
|
||||
switch v {
|
||||
case left:
|
||||
n++
|
||||
} else if v == right {
|
||||
case right:
|
||||
n--
|
||||
}
|
||||
if n == 0 {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package dbus
|
||||
|
||||
|
||||
+7
-8
@@ -1,5 +1,4 @@
|
||||
//go:build !windows && !solaris
|
||||
// +build !windows,!solaris
|
||||
|
||||
package dbus
|
||||
|
||||
@@ -142,16 +141,16 @@ func (t *unixTransport) ReadMessage() (*Message, error) {
|
||||
}
|
||||
|
||||
msg := &Message{
|
||||
Type: t.rdr.msghead.Type,
|
||||
Flags: t.rdr.msghead.Flags,
|
||||
serial: t.rdr.msghead.Serial,
|
||||
Type: t.rdr.Type,
|
||||
Flags: t.rdr.Flags,
|
||||
serial: t.rdr.Serial,
|
||||
}
|
||||
// Length of header fields (without alignment).
|
||||
hlen := t.rdr.msghead.HeaderLen
|
||||
hlen := t.rdr.HeaderLen
|
||||
if hlen%8 != 0 {
|
||||
hlen += 8 - (hlen % 8)
|
||||
}
|
||||
if hlen+t.rdr.msghead.BodyLen+16 > 1<<27 {
|
||||
if hlen+t.rdr.BodyLen+16 > 1<<27 {
|
||||
return nil, InvalidMessageError("message is too long")
|
||||
}
|
||||
|
||||
@@ -175,7 +174,7 @@ func (t *unixTransport) ReadMessage() (*Message, error) {
|
||||
var unixfds uint32
|
||||
for _, v := range t.rdr.headers {
|
||||
if v.Field == byte(FieldUnixFDs) {
|
||||
unixfds, _ = v.Variant.value.(uint32)
|
||||
unixfds, _ = v.value.(uint32)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,7 +271,7 @@ func (t *unixTransport) SendMessage(msg *Message) error {
|
||||
return err
|
||||
}
|
||||
oob := syscall.UnixRights(fds...)
|
||||
n, oobn, err := t.UnixConn.WriteMsgUnix(buf.Bytes(), oob, nil)
|
||||
n, oobn, err := t.WriteMsgUnix(buf.Bytes(), oob, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import (
|
||||
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)
|
||||
_, oobn, err := t.WriteMsgUnix([]byte{0}, b, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+4
-4
@@ -292,12 +292,12 @@ func (n stringNode) Value(sig Signature) (any, error) {
|
||||
if n.val != nil {
|
||||
return n.val, nil
|
||||
}
|
||||
switch {
|
||||
case sig.str == "g":
|
||||
switch sig.str {
|
||||
case "g":
|
||||
return Signature{n.str}, nil
|
||||
case sig.str == "o":
|
||||
case "o":
|
||||
return ObjectPath(n.str), nil
|
||||
case sig.str == "s":
|
||||
case "s":
|
||||
return n.str, nil
|
||||
default:
|
||||
return nil, varTypeError{n.str, sig}
|
||||
|
||||
Vendored
+1
-1
@@ -49,7 +49,7 @@ github.com/cyphar/filepath-securejoin/pathrs-lite/procfs
|
||||
# github.com/docker/go-units v0.5.0
|
||||
## explicit
|
||||
github.com/docker/go-units
|
||||
# github.com/godbus/dbus/v5 v5.2.0
|
||||
# github.com/godbus/dbus/v5 v5.2.2
|
||||
## explicit; go 1.20
|
||||
github.com/godbus/dbus/v5
|
||||
# github.com/moby/sys/capability v0.4.0
|
||||
|
||||
Reference in New Issue
Block a user