Rsudoas - A sudo replacement

Hi everyone, so I just published my first Rust program and I am looking for feedback and advice from experienced Rust developers! :slight_smile:

Here's my program:

It's a replacement for sudo (it's actually a re-implementation of the replacement) and as such the code needs to be high quality and secure. The code base is quite small, only around 1k LoC.

This is the first project I did in Rust too, so some of the code might be more "naive" than other code in the same source, please let me know if you spot any such inconsistencies.

Thank you in advance!

Could definitely be improved by some tests, especially for the config file parsing.

It is also generally considered best practice to add comments to every unsafe block and explain why they are safe.

1 Like

For sure! I had that planned down the line. I rarely get time to work on this so getting it to a functional state was a priority, everything else could be added later on :slight_smile:

I see, has anybody documented these kind of guidelines? Can you give me an example for inspiration?

Thanks for the review by the way!

Here are the guidelines for std.

There are also some clipply lints.

2 Likes

Thanks for the links, those are very useful :slight_smile:

@mdHMUpeyf8yluPfXI Happy forum anniversary by the way! (I saw a :cake: icon after your username)