op_* PNDs just pointing to op_* scripts?


hmc

Active Member
Joined
Dec 19, 2011
Messages
787
Location
Bavaria, Germany
HI guys,


a question:


I started to investigate how op_startupmanager works.


I found its PND at



Code:
[I]/usr/pandora/apps/op_startupmanager.pnd[/I]





I dissected it and found that all it does is launching





Code:
[I]/usr/pandora/scripts/op_startupmanager.sh[/I]


What is the reason that there is this PND?


Only to generate a .desktop file, which starts the shell script?


Wouldn't it have been easier and more straight-forward to sinply generate a fixed .desktop file for the fixed shell script?


Or have I missed something?


Thanks,


Daniel
 
Just an idea:


Is a PND required so that Minimenu sees the item?


Or is Minimenu aware of .desktop files, too?


Daniel
 
well up untill the most recent update mini menu did not use .desktop files but now it can access those too so maybe thats why they were placed in PND's to begin with :)
 
Good to know!


So for my current vnstat project I can use a .desktop file instead of a PND for vnstat statistics display?...


Daniel
 
Last edited by a moderator:
One thing I have noticed is that scripts called from one of these PNDs seem to have admin rights if called via the PND... I discovered this when I was creating a launcher to toggle wifi... (before HF6) if I set the launcher to run the script I had to enter my password. If I set it to launch the PND application I could just click the launcher and it would just work.


- Neelix
 
Neelix,


this sounds like a serious security hole, a simple way to create "Pandora viruses"!


Probalbym a bug in the pnd library?


Isn't the normal way to perform admin actions from a PND run script to use gksudo?


Daniel
 
Yes, and pnds shouldn't run as root out of the box.


But maybe he ran it shortly after running it with gksu or sudo.


Those save rootaccess for a while.
 
but only for commands run with gksudo in front, if I am not mistaken?



Code:
gksudo command1

gksudo command2

command3


command 1 asks for root password,


command 2 is executed as root without asking for a password (if command 1 did not let the root access rights time out),


command 3 is executed as a normal user...


or am I mistaken?
 
or am I mistaken?
You are correct. Mostly.


The PND runs the op_wifi script with sudo so it technically would require a password, but it is in the sudoers file as not requiring a password. When neelix tried to just run the script, I bet he didn't run it with sudo, so it wouldn't work.


There's no bug or security hole, it is behaving exactly as it is supposed to.
 
or am I mistaken?
You are correct. Mostly.


The PND runs the op_wifi script with sudo so it technically would require a password, but it is in the sudoers file as not requiring a password. When neelix tried to just run the script, I bet he didn't run it with sudo, so it wouldn't work.


There's no bug or security hole, it is behaving exactly as it is supposed to.

not exactly... running the script directly (with sudo) requested a password unless I had recently entered one, so the fact that the script is in the sudoers list wasn't being recognized when being launched directly - launching the the PND did not require a password regardless of whether I had recently entered a sudo password or not.


If I hadn't launched the script with sudo it would just have failed rather than request a password, as there is no call to sudo within the script itself.


That being said, having confirmed that the script itself is definitely listed in the sudoers file (or at least in the current version of it in git) I think its time to abandon this line of thought... its become obvious to me that the oddity is that my XFCE launcher seemingly ignored the sudoers file and required a password, rather than with the PND version working without one.


Please ignore my ramblings and carry on, my apologies for the sidetrack.


- Neelix
 
Back
Top