()
| 529 | } |
| 530 | |
| 531 | func getDBusSystemSocket() (string, error) { |
| 532 | logrus.Debug("Resolving path to the D-Bus system socket") |
| 533 | |
| 534 | address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS") |
| 535 | if address == "" { |
| 536 | address = "unix:path=/var/run/dbus/system_bus_socket" |
| 537 | } |
| 538 | |
| 539 | addressSplit := strings.Split(address, "=") |
| 540 | if len(addressSplit) != 2 { |
| 541 | return "", errors.New("failed to get the path to the D-Bus system socket") |
| 542 | } |
| 543 | |
| 544 | path := addressSplit[1] |
| 545 | pathEvaled, err := filepath.EvalSymlinks(path) |
| 546 | if err != nil { |
| 547 | logrus.Debugf("Resolving path to the D-Bus system socket: failed to evaluate symbolic links in %s: %s", |
| 548 | path, |
| 549 | err) |
| 550 | return "", errors.New("failed to resolve the path to the D-Bus system socket") |
| 551 | } |
| 552 | |
| 553 | return pathEvaled, nil |
| 554 | } |
| 555 | |
| 556 | func getEnterCommand(container string) string { |
| 557 | var enterCommand string |
no outgoing calls
no test coverage detected
searching dependent graphs…