Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

sudo is almost 150k lines of code, has been developed since about 1980, and works (and is used!) on a wide array of systems.

Are you going to rewrite all of that in $other_language_than_c? How many hours of work do you think this will take to rewrite?

This is the real issue.



> sudo is almost 150k lines of code

I'd argue that's (at least part of) the problem. More code = more surface area for bugs, and sudo has a lot of code.


It is, but that code wasn't added for the craic and does solve real use-cases that you can't just ignore for a full-featured drop-in s/sudo/.../-type replacement.

(also, 150k lines of code is a little bit misleading, since not all code is for all platforms, sudo has a plugin architecture I believe, etc.)


Translating that one to one would take 10 developers at 100loc / day less than half a year.

Surely that can‘t be that much in the name of security, no?


I think that is a very optimistic estimate considering it's pretty difficult security-sensitive code which integrates with quite a number of system components in complex ways across a large number of different platforms (this particular bug was introduced for HP-UX compatibility for example).

But you're welcome to try of course. But if it was that easy I bet someone would have done so already. This is the classic "zomg look at how complex it is, let's just rewrite it from scratch!" and then you discover that the complexity is there because it solves a long list of edge cases.

> Surely that can‘t be that much in the name of security, no?

Meh; in reality, almost no one was affected by this particular bug, and even if they were, you needed system/shell access to be affected. Like many sudo security problems in reality they're often actually not that big of a deal. Of course, it could be improved, but there's a long list of other things that are more impactful.


> But you're welcome to try of course

Ah yes, the classic "do it yourself then" comeback argument. Thing is, I am a single developer with rent to pay and a family to feed. In all honesty, I would have little to gain when rewriting sudo / mission critical software in a secure language.

What I was going for is that gigantic companies with tens of thousands of people and manpower use tools like sudo / brew / sqlite / <security dependant tool x> every day. They are the ones who would benefit the most by rewriting critical software in something else than C, and they seem to be getting on that track for internal software.

But for open source stuff, no one cares and that's criminal in my mind.


If you care about it, then you should put in the work; that's kind of how this open source thing works. That how pretty much any volunteer effort works. No one can "force" anyone to do anything, nor should they, and this includes using sudo. If you don't like sudo for whatever reason: then don't use it. If you think there "should" be a replacement: then write it.

Who are you or I to determine where others – including "gigantic companies with tens of thousands of people and manpower" – should spend their time and money?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: