Giter Club home page Giter Club logo

opendoas's Introduction

OpenDoas: a portable version of OpenBSD's doas command

doas is a minimal replacement for the venerable sudo. It was initially written by Ted Unangst of the OpenBSD project to provide 95% of the features of sudo with a fraction of the codebase.

Building and installation discouragements

There are a few steps you have to carefully consider before building and installing opendoas:

  • There are less eyes on random doas ports, just because sudo had a vulnerability does not mean random doas ports are more secure if they are not reviewed or pam is configured incorrectly.
  • If you want to use pam; You have to configure pam and failing to do so correctly might leave a big open door.
  • Use the configure script.
  • Use the default make target.
  • If you really want to install a setuid binary that depends on pam being correctly configured, use the make install target to install the software.

About the port

This is not an official port/project from OpenBSD!

As much as possible I've attempted to stick to doas as tedu desired it. As things stand it's essentially just code lifted from OpenBSD with PAM or shadow based authentication glommed on to it.

Compatibility functions in libopenbsd come from openbsd directly (strtonum.c, reallocarray.c, strlcpy.c, strlcat.c), from openssh (readpassphrase.c) or from sudo (closefrom.c).

The PAM and shadow authentication code does not come from the OpenBSD project.

pam configuration

I will not ship pam configuration files, they are distribution specific and its simply not safe or productive to ship and install those files.

If you want to use opendoas on your system and there is no package that ships with a working pam configuration file, then you have to write and test it yourself.

A good starting point is probably the distribution maintained /etc/pam.d/sudo file.

Persist/Timestamp/Timeout

The persist feature is disabled by default and can be enabled with the configure flag --with-timestamp.

This feature is new and potentially dangerous, in the original doas, a kernel API is used to set and clear timeouts. This API is openbsd specific and no similar API is available on other operating systems.

As a workaround, the persist feature is implemented using timestamp files similar to sudo.

See the comment block in timestamp.c for an in-depth description on how timestamps are created and checked to be as safe as possible.

opendoas's People

Contributors

bentley avatar duncaen avatar escondida avatar gleydsonsoares avatar hogand avatar ischwarze avatar marcespie avatar nholstein avatar nicm avatar phikal avatar qbe avatar sebastianbenoit avatar snimmagadda avatar

Watchers

 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.