Giter VIP home page Giter VIP logo

polkit-fakesudo's Introduction

What is this?

A very very stupid fake sudo,using polkit pkexec to grant permissions.It can partly replace sudo in most common scenarios.

Why this is created

Both sudo and polkit are able to grant permissions to process,and sadly they are both volunrable,and installing both is equivalent to doubling the probability of security problems.As we can see, many CVEs of Linux desktop are related to both of them.Meanwhile,having two tools with the same functions on one computer sounds not satisfying.Polkit has better intergration with desktop environments(in particular,gnome) and allows a finer control of centralized system policy.But there are still some scripts depending on sudo.So it's a good idea to write some wrappers to make polkit have sudo functionalities,just like xwayland and pipewire-pulse.

Installation guide

On Arch Linux you can simply get it from AUR,like :

yay -S polkit-fakesudo

By the way,yay and paru can both use this sudo as real one:)

If you are using other distributions,you can manually place sudo in /usr/bin/ ,and help1 and help2 in /usr/share/polkit-fakesudo , but you'd better do it with your package manager.

Remember that in some cases this fake sudo cannot fully simulate the behavior of real sudo (which means,when you run some apps depending on sudo ,they may run into problems)and may contain severe bugs that hasn't been found!

You are also advised to check which packages depend on sudo with your package manager (maybe also try to figure out why and how).

How to contribute

Just send PR to this repo.Any kind of contribution is welcomed.If you can write a better implementation with Polkit's ABI and reproduce sudo's ABI,I'm sure that the whole community will be greatly thankful to you!Maybe you can write in rust to get us more excited.

polkit-fakesudo's People

Contributors

aleksanaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.