Permalink
Browse files

update for Go 1

  • Loading branch information...
1 parent de0a685 commit 92e59b86fdad61c2f83b1b2e64c8de5728e1f774 @bradfitz committed Mar 16, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 runas/runas.go
View
@@ -27,6 +27,7 @@ import (
"os/exec"
"os/user"
"path/filepath"
+ "strconv"
"syscall"
)
@@ -74,7 +75,9 @@ func User(username string) (*rpc.Client, error) {
if err != nil {
return nil, err
}
- return UidGid(u.Uid, u.Gid)
+ uid, _ := strconv.Atoi(u.Uid)
+ gid, _ := strconv.Atoi(u.Gid)
+ return UidGid(uid, gid)
}
// UidGid returns an rpc Client suitable for talking to Server

0 comments on commit 92e59b8

Please sign in to comment.