Skip to content

Commit

Permalink
incus-user: Fix bad path
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Oct 9, 2023
1 parent cd9b76c commit af3d6e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/incus-user/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func serverSetupUser(uid uint32) error {
revert.Add(func() { _ = os.RemoveAll(userPath) })

// Generate certificate.
err = localtls.FindOrGenCert(internalUtil.VarPath("users", userPath, "client.crt"), internalUtil.VarPath("users", userPath, "client.key"), true, false)
err = localtls.FindOrGenCert(filepath.Join(userPath, "client.crt"), filepath.Join(userPath, "client.key"), true, false)

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / Code tests

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, dir)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, btrfs)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, lvm)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, zfs)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, ceph)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, random)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, dir)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, btrfs)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, lvm)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, zfs)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, ceph)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, random)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (stable, cluster, dir)

undefined: filepath

Check failure on line 171 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (stable, standalone, dir)

undefined: filepath
if err != nil {
return fmt.Errorf("Failed to generate user certificate: %w", err)
}
Expand Down Expand Up @@ -219,7 +219,7 @@ func serverSetupUser(uid uint32) error {
}

// Parse the certificate.
x509Cert, err := localtls.ReadCert(internalUtil.VarPath("users", userPath, "client.crt"))
x509Cert, err := localtls.ReadCert(filepath.Join(userPath, "client.crt"))

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / Code tests

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, dir)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, btrfs)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, lvm)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, zfs)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, ceph)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, cluster, random)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, dir)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, btrfs)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, lvm)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, zfs)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, ceph)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (1.20.x, standalone, random)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (stable, cluster, dir)

undefined: filepath

Check failure on line 222 in cmd/incus-user/server.go

View workflow job for this annotation

GitHub Actions / System tests (stable, standalone, dir)

undefined: filepath
if err != nil {
return fmt.Errorf("Unable to read user certificate: %w", err)
}
Expand Down

0 comments on commit af3d6e9

Please sign in to comment.