[Techtalk] wrapping unix commands

Conor Daly c.daly at met.ie
Fri Apr 8 20:23:40 EST 2005

On Thu, Apr 07, 2005 at 03:44:42PM -0400 or thereabouts, overhaul wrote:
> Hello!
> I'm in a bit of a pinch.   I have limited C knowledge but have been told 
> it's quite simple to write a C wrapper around unix commands.   I have a 
> need now to create a few wrappers for commands that kernel will not 
> allow any non-root user to run ... such as pciconf.

Why is it necessary to write a C wrapper?  Most programming languages can
manage system calls and I don't think a C program will be considered in any
way special from the kernel's point of view.  If you want to run root-only
programs, look into sudo.  There's a wealth of control over users, groups,
programs, timeouts, passwords and all in there.  Fro example, you can allow
a specific user to run a single command with specific arguments within x
minutes of inputting their password from a specific host.  Or you can allow
a specific group to run a specific set of commands with any arguments
without a password....

Conor Daly,                   Please avoid sending me 
Met Eireann, Glasnevin Hill,  Word or PowerPoint attachments.
Dublin 9, Ireland             http://www.fsf.org/philosophy/no-word-attachments.html
Ph +3531 8064276 Fax +3531 8064247

This e-mail and any files transmitted with it are confidential 
and intended solely for the addressee. If you have received
this email in error please notify the sender.
This e-mail message has also been scanned for the
presence of computer viruses.

More information about the Techtalk mailing list