Initial implementation of arca, a LUKS volume manager.
Go CLI using cobra with mount, unmount, status, and init subcommands. Unlocks via udisks2 D-Bus (passphrase/keyfile) or cryptsetup (FIDO2/TPM2) with ordered method fallback. Includes NixOS-specific LD_LIBRARY_PATH injection for systemd cryptsetup token plugins. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
40
vendor/github.com/godbus/dbus/v5/conn_unix.go
generated
vendored
Normal file
40
vendor/github.com/godbus/dbus/v5/conn_unix.go
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
//go:build !windows && !solaris && !darwin
|
||||
|
||||
package dbus
|
||||
|
||||
import (
|
||||
"net"
|
||||
"os"
|
||||
)
|
||||
|
||||
const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket"
|
||||
|
||||
func getSystemBusPlatformAddress() string {
|
||||
address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS")
|
||||
if address != "" {
|
||||
return address
|
||||
}
|
||||
return defaultSystemBusAddress
|
||||
}
|
||||
|
||||
// DialUnix establishes a new private connection to the message bus specified by UnixConn.
|
||||
func DialUnix(conn *net.UnixConn, opts ...ConnOption) (*Conn, error) {
|
||||
tr := newUnixTransportFromConn(conn)
|
||||
return newConn(tr, opts...)
|
||||
}
|
||||
|
||||
func ConnectUnix(uconn *net.UnixConn, opts ...ConnOption) (*Conn, error) {
|
||||
conn, err := DialUnix(uconn, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = conn.Auth(conn.auth); err != nil {
|
||||
_ = conn.Close()
|
||||
return nil, err
|
||||
}
|
||||
if err = conn.Hello(); err != nil {
|
||||
_ = conn.Close()
|
||||
return nil, err
|
||||
}
|
||||
return conn, nil
|
||||
}
|
||||
Reference in New Issue
Block a user