Git Product home page Git Product logo

ele's Introduction

ele

ele spawns elevated processes. To make this work, there are two pieces:

ele

ele is a command line application. You can call it the way you might expect:

$ ele id
uid=0(root) gid=0(root) groups=0(root)

At least for non-interactive applications.

For applications that need access to the terminal (like a shell), use -i:

$ ele --interactive bash
root@localhost:~/dev/rust/ele#

eled

This is the daemon that actually spawns the processes. Currently, it has to be running (you can archieve this with a systemd unit) to be able to react to requests; dbus activation is a work in progress.

Why?

sudo and su spawn elevated processes without needing a long-running system-wide daemon. They also handle the terminal way better.

So why use ele?

ele doesn't need to be setuid root to work. Instead, there's a daemon running as root (eled) which spawns the elevated processes and passes over the file descriptors of the applications. Authentication is done via polkit, dbus is used as the transport. This design is inspired by su on LineageOS.

Why is this any better? Isn't this just more complicated?

su and sudo being setuid means that the authentication prompt itself is running as root. This makes them (a bit) vulnerable against attacks because the environment can't really be controlled. See CVE-2023-6246 for a recent vulnerability in this fashion.

sudo-rs is an improvement because it's (hopefully) not affected by such memory corruption shenanigans, but still, setuid itself poses some risk.

polkit provides fine-grained access control and many setuid binaries can probably be replaced with a combination of client and daemon, connected via dbus and polkit. Interestingly, pkexec just uses polkit for authentication -- the binary itself is setuid.

(Please don't use it, though, as this is currently just a proof of concept.)

ele's People

Contributors

ytvwld avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.