blob: 3814353c266b7b80b4b8c5b0b6972424fb0b7d12 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package suid
import (
"flag"
)
func Run(environ []string) error {
var work WorkParameters
if err := work.ProcessArguments(flag.CommandLine, environ); err != nil {
return err
}
if work.remove {
return work.Remove()
}
if work.kill {
return work.Kill()
}
if err := work.Chown(); err != nil {
return err
}
return work.Exec()
}