Skip to content

Commit

Permalink
Fix darwin build. (Velocidex#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Sep 15, 2020
1 parent cb0eac1 commit aed6c3c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions bin/admin_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//+ build: !windows

package main

import (
"fmt"
"os"
"syscall"
)

func checkAdmin() {
if *artificat_command_collect_admin_flag && syscall.Geteuid() != 0 {
fmt.Println("Velociraptor requires administrator level access. Use a 'Run as administrator' command shell to launch the binary.")
os.Exit(-1)
}

}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ require (
www.velocidex.com/golang/go-prefetch v0.0.0-20200722101157-37e4751dd5ca
www.velocidex.com/golang/oleparse v0.0.0-20190327031422-34195d413196
www.velocidex.com/golang/regparser v0.0.0-20190625082115-b02dc43c2500
www.velocidex.com/golang/vfilter v0.0.0-20200911062452-cf0fe8a4de78
www.velocidex.com/golang/vfilter v0.0.0-20200915085043-06916b51053e
www.velocidex.com/golang/vtypes v0.0.0-20180924145839-b0d509f8925b
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -763,5 +763,7 @@ www.velocidex.com/golang/regparser v0.0.0-20190625082115-b02dc43c2500 h1:XqZddiA
www.velocidex.com/golang/regparser v0.0.0-20190625082115-b02dc43c2500/go.mod h1:DVzloLH8L+oF3zma1Jisaat5bGF+4VLggDcYlIp00ns=
www.velocidex.com/golang/vfilter v0.0.0-20200911062452-cf0fe8a4de78 h1:9M+BvRRVYm4TCpA4UVGI/bf5vBhsGHnzYklH2OgigtI=
www.velocidex.com/golang/vfilter v0.0.0-20200911062452-cf0fe8a4de78/go.mod h1:XlUeViBwZxeefhxbkxW2oGUVcB/oQfxtBgnxL9jLryg=
www.velocidex.com/golang/vfilter v0.0.0-20200915085043-06916b51053e h1:Q+HXl6tG+pUOwDpaxFvzVeP+twPJzmtyPyfXDY0q9Xw=
www.velocidex.com/golang/vfilter v0.0.0-20200915085043-06916b51053e/go.mod h1:XlUeViBwZxeefhxbkxW2oGUVcB/oQfxtBgnxL9jLryg=
www.velocidex.com/golang/vtypes v0.0.0-20180924145839-b0d509f8925b h1:z5v5o1dhtzaxvlWm6qSTYZ4OTr56Ol2JpM1Y5Wu9zQE=
www.velocidex.com/golang/vtypes v0.0.0-20180924145839-b0d509f8925b/go.mod h1:tXxIx8UJuI81Hoxcv0DTq2a1Pi1H6l1uCf4dhqUSUkw=

0 comments on commit aed6c3c

Please sign in to comment.