From 287a53532dd87e91e1bb11d44358a43f0793eb37 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 10 Feb 2022 22:49:55 +0400 Subject: [PATCH] Renamed dwu, dwuid to u, uid. --- cmd/dwelling-upload/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/dwelling-upload/main.go b/cmd/dwelling-upload/main.go index 3a5200e..4be4037 100644 --- a/cmd/dwelling-upload/main.go +++ b/cmd/dwelling-upload/main.go @@ -20,18 +20,18 @@ var configPath *string = flag.String("conf", "config.yaml", "path to configurati var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout") func substituteUser(username string) error { - dwu, err := user.Lookup(username) + u, err := user.Lookup(username) if err != nil { return err } - dwuid, err := strconv.Atoi(dwu.Uid) + uid, err := strconv.Atoi(u.Uid) if err != nil { return err } - if os.Getuid() != dwuid { - if err := syscall.Setuid(dwuid); err != nil { + if os.Getuid() != uid { + if err := syscall.Setuid(uid); err != nil { return err } }