[Mono-dev] setuid application

Jonathan Pryor jonpryor at vt.edu
Mon Mar 2 14:08:14 EST 2009


On Mon, 2009-03-02 at 12:00 -0500, Gladish, Jacob wrote:
> Before proceeding with my current plan, I wanted to get any feedback
> from anyone who may have explored building a mono app that has setuid.
> My application is mostly managed code, with a few p/invoke calls, but
> it's been pretty platform agnostic thus far. I need to have setuid
> privileges on my app, and the best way I have come up with so far is
> to have a small native app that acts as a host that has setuid on it.
> I certainly don't want to change the permissions on /usr/bin/mono.
> Does anyone have any other suggestions?

If you need a native app anyway (which makes sense, for the reasons you
specified) then it might make sense to embed the mono library and start
your managed code using the embedding API:

	http://www.go-mono.com/docs/index.aspx?tlink=root:/embed

There are several examples as well:

	http://anonsvn.mono-project.com/viewvc/trunk/mono/samples/embed/

 - Jon




More information about the Mono-devel-list mailing list