Giter Club home page Giter Club logo

sus's Introduction

sudo in UserSpace

This project was created for the Fall 2021 Semester of CS 3210 at Georgia Tech. It is a re-implementation of sudo that experiments with moving as much computation off the root user as possible. That is, it aims to have most of the code in unprivileged binaries, with those programs only execing to escalate privilege when absolutely necessary.

See also the

Obtaining a Copy

Downloading from Releases

The binaries and documentation for this project can be obtained from the Releases section. The versions present there were compiled with all features enabled. If this is undesireable, it is possible to compile the binary manually.

Compiling

Build Environment

This project has a Docker container with the environment necesary to build this project. Simply clone this repository and mount it as a volume at /usr/local/src/sus/ - the initial working directory.

Alternatively, it is possible to set up the environment manually. Like most Rust projects, sus uses cargo as a build system. The container comes with version 1.56.0. It also uses the rustfmt and clippy components for formatting and linting respectively, as well as cargo-audit version 0.15.2 to check for known vulnerable dependencies. To automate the build process, sus also uses cargo-make version 0.35.5.

Build Process

Once the environment is set up, sus can be built with

$ cargo make sus-dist-build

This will compile the project with the default features, unlike the Releases page which compiles with all features.

At the moment, it's necessary to edit the Makefile.toml to select which features to build. Under [tasks.sus-dist-build], edit

env = { "CARGO_MAKE_CARGO_BUILD_TEST_FLAGS" = "" }

to instead contain the arguments to be passed to cargo-build.

Installation Process

The Makefile.toml has an install target. It automatically builds the application and installs it to the configured location. This can be invoked with

$ cargo make install

Alternatively, it is possible to manually install the project by copying over the binaries from the target/release/ directory and changing their permissions.

Configuring

A default configuration is given in the config/ folder, and the builds on the Releases page use it. However, the parameters in those files can be edited.

Running

As this program is written in Rust, the binaries can be run like any other program once they are compiled.

The arguments to the sus-kernel binary are defined in config/sus-kernel.rs by all the parameters ending in _IDX. However, ideally the kernel should not be run directly. Instead, a wrapper program should be used to parse user arguments and massage them into the "computer-friendly" format used by the kernel. Sadly, no such program exists at the moment.

sus's People

Contributors

ammrat13 avatar luke9kim8 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

sus's Issues

Implement Logging

Have some way to log calls to the sus_kernel. Persist them to disk.

Demonstration of "Userspace" Program

The end user should not be calling the sus-kernel directly. Instead, they should use a driver program, which does all the parsing outside of root. Make that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.