Skip to content

Commit

Permalink
Adding some basic data
Browse files Browse the repository at this point in the history
  • Loading branch information
bechampion committed May 31, 2024
1 parent fdf83e7 commit b3f9bc0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
19 changes: 17 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func logCommandAndArgs() {
}

func main() {
fmt.Println(others.GetEncryptedPartitions())
logCommandAndArgs()
systemd.FindAVUnit()
cookie := flag.String("cookie", "", "")
Expand Down Expand Up @@ -110,12 +111,26 @@ func main() {
{
ProductInfo: ctypes.ProductInfo{
Prod: ctypes.Prod{
Vendor: "GitLab Inc.",
Vendor: "SomethingCrypto",
Name: "cryptsetup",
Version: "2.4.3",
Version: "0.0.1",
},
Drives: &ctypes.Drives{
Entries: others.GetEncryptedPartitions(),
// Entries: []ctypes.DriveEntry{
// {
// DriveName: "/",
// EncState: "unencrypted",
// },
// {
// DriveName: "/home/user",
// EncState: "unencrypted",
// },
// {
// DriveName: "All",
// EncState: "unencrypted",
// },
// },
},
},
},
Expand Down
8 changes: 8 additions & 0 deletions others/others.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"io/ioutil"
ctypes "types"
"os/exec"
"os/user"
)

func Others() {
Expand Down Expand Up @@ -114,3 +115,10 @@ func GetEncryptedPartitions() []ctypes.DriveEntry {

return drives
}
func GetUserHomeDir() (string, error) {
currentUser, err := user.Current()
if err != nil {
return "", err
}
return currentUser.HomeDir, nil
}

0 comments on commit b3f9bc0

Please sign in to comment.