Requesting Superuser
BCS
BCS at pathlink.com
Mon Oct 1 16:07:02 PDT 2007
Jesse Phillips wrote:
> On Mon, 01 Oct 2007 15:33:18 -0700, BCS wrote:
>
>
>>Jesse Phillips wrote:
>>
>>>As a Linux programmer it can be important to have a program run with
>>>superuser privileges. I am trying to figure out the best way to either
>>>become a super user by asking for a password, or simply checking if it
>>>is run as a superuser.
>>>
>>>I have been looking at how to do this in C and found information on
>>>suser () which seems to be for FreeBSD.
>>>http://www.gsp.com/cgi-bin/man.cgi?section=9&topic=suser
>>>
>>>I was also reading some stuff on secure programming which said not to
>>>use system() because it invokes the shell, that's fine but is it really
>>>a problem?
>>>http://www.onlamp.com/pub/a/onlamp/excerpt/PUIS3_chap16/index1.html
>>>
>>>Any good links or search queries would be great.
>>>
>>>Thanks,
>>>Jesse Phillips
>>
>>
>>Are you looking for D specific stuff? Under Unix I would expect that
>>superuser related stuff will be the same as under C. As such I expect
>>that this NG wouldn't have any specific expertices in that. You might
>>get lucky and find someone who knowns (these guys have quite a range of
>>knowledge) but here is not the first place I'd look.
>
>
> Well, I was hoping for something D specific, but didn't think there would
> be. Phobos has a std.linux package but the docs don't say anything about
> what is in it, I guess I could look at the source.
failing anything else, figure out how to do it it C and then declare the
needed function declarations. In my experience POSIX stuff is easy to
translate.
More information about the Digitalmars-d-learn
mailing list