07/30/2010 3:06 AM
post61156
|
Make shutdown (or whatever) owned by root, set permissions to 0700, and
start the shell in your terminal as user nobody.
He will not be able to execute shutdown.
Can generalize for other user not just root and can restrict by group if
you need multiple users being able to execute.
--
Mate
-----Original Message-----
From: Praveen VS [mailto:community-noreply@qnx.com]
Sent: July 30, 2010 3:37 PM
To: photon-graphics
Subject: Re: Terminal WIdget
Sorry, Its working, we had made small mistake wrt argument passing.
Just need your inputs wrt restricting some commands on this shell, may
be to use group related apis right?
----- Original Message -----
From: "Praveen VS" <praveen@spacomp.com>
To: <post61040@community.qnx.com>
Sent: Friday, July 30, 2010 11:38 AM
Subject: Re: Terminal WIdget
> Thanks Misha,
> Using PtTerminal or PtTty we have to do terminal include inside the
> photon application.We have tried with the sample code given in the
> following link
>
>
http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
>
> We are able to print some strings on PtTty Widget using
> PtTerminalPuts(), but no able to
> get keyboard input and execute as command on PtTty Widget. ( as we
> normally do on shell)
>
> Our requirement is
>
> 1) We need keyboard input support to PtTerminal or PtTty.
> 2) Need to execute command and print the output on same
PtTerminal
> or PtTty Widget.
> 3) We need to restrict certain command like shutdown from these
> widget.
>
> Can we get some details or example code where we can able to do above
> requirements.
> Regards
> Praveen
>
> ----- Original Message -----
> From: "Misha Nefedov" <community-noreply@qnx.com>
> To: "photon-graphics" <post61040@community.qnx.com>
> Sent: Thursday, July 29, 2010 7:42 PM
> Subject: Re: Terminal WIdget
>
>
>> Take a look at these docs:
>> http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
>> look for "Setting PtTty resources" -- it explains what steps should
be
>> taken to get your app working. Also it tells why it may not work in
PhAB.
>>
>>
>>
>> _______________________________________________
>>
>> Photon microGUI
>> http://community.qnx.com/sf/go/post61040
>>
>>
>
_______________________________________________
Photon microGUI
http://community.qnx.com/sf/go/post61154
|
|
|