Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Small request for Neo 2.0.x build
Small request for Neo 2.0.x build
 
   NeoOffice Forum Index -> NeoOffice Development
View previous topic :: View next topic  
Author Message
berchca
Councilperson


Joined: Jan 15, 2005
Posts: 111

PostPosted: Mon Jun 19, 2006 4:36 pm    Post subject: Small request for Neo 2.0.x build

I think this is for Patrick or Ed:

I was wondering if it was possible to change the permissions for the: NeoOffice.app/Contents/share/config directory?

At the moment, NeoOffice has it set for 555, while OOo for Mac has it at 755. The sad result for me is I have to ship a rather complicated fix for Office Themer (a.k.a NeoIconer) to let the program get at the toolbar icons.

Any help would be appreciated,
Brett the James
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jun 19, 2006 4:55 pm    Post subject:

The reason that OOo is 755 is that OOo is a single-user install. In contrast, NeoOffice is a multi-user install. Consequently, I set the own to root and the permissions to read-only so that one user's NeoOffice process doesn't overwrite shared settings that causes NeoOffice to crash or get messed when another user on the same machine runs NeoOffice.

I very reluctant to make this folder writable by all. I assume that your installation already is running as admin since you are overwriting other read-only image files. So, I would suggest that you look my how my installer does in the same situation in the neojava/etc/postflight script (the script is also buried in the Contents/Resources/postflight file with the NeoOffice.pkg installer that I ship). In that script, a temporarily chmod a directory to be writable, do my copying, and then chmod the directory to read only again.

Patrick
Back to top
berchca
Councilperson


Joined: Jan 15, 2005
Posts: 111

PostPosted: Mon Jun 19, 2006 5:15 pm    Post subject:

Sadly, that technique wouldn't be trivial for me, as Office Themer needs access that directory every time it runs. That means I either need to password people every time (annoying) or add code to safely encrypt/store the password (which gets me into the security business, and that I don't want to be in.)

I guess for the moment, I'll just leave the fix in place, that way the only people putting themselves at risk are the people using Office Themer.

_brett
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jun 19, 2006 5:47 pm    Post subject:

berchca wrote:
Sadly, that technique wouldn't be trivial for me, as Office Themer needs access that directory every time it runs. That means I either need to password people every time (annoying) or add code to safely encrypt/store the password (which gets me into the security business, and that I don't want to be in.)


If you are worried about annoyance, the NeoOffice patch installer asks for the password as well every time so you always can blame me. Wink

Serious though, I forgot that you don't even need to do the chmod'ing if you use the pax command to unzip your contents. When run as root, pax while automatically handle the read-only directory issue.

Patrick
Back to top
berchca
Councilperson


Joined: Jan 15, 2005
Posts: 111

PostPosted: Mon Jun 19, 2006 6:35 pm    Post subject:

Yeah, it's really not going to do it. The first thing I do is make a local copy of the original image.zip file in that folder (which keeps it safe as long as the program is intact.) Then, whenever the program is run, it replaces the existing images.zip file.

But, as I said, I already have the fix, so I'll just keep telling people to use it (it just opens up the permissions on that directory without people having to know how to chmod or even where the Terminal is...)

Thanks,
brett
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Jun 19, 2006 11:24 pm    Post subject:

Also, don't rely on the permissions set by TeamOOo to be authoritative (or even correct). A couple of years ago there was a big to-do about locking down the permissions for one hierarchy in the app folder as a security measure on Unix-like platforms, and Ed's and Terry's and Kevin's OOo builds dutifully included these restrictive permissions. Once Team OOo took over building, the permissions were back to the old ones (world-writeable, IIRC) and even though I reported the bug, they never did fix it AFAIK....

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
jakeOSX
Ninja
Ninja


Joined: Aug 12, 2003
Posts: 1373

PostPosted: Tue Jun 20, 2006 4:38 am    Post subject:

personally, as a user, ask me for my password. i feel better when i get asked for my password, because it means that there is a level of security there, and i am making the choice to do something.

annoying? how many times is someone going to change their icons?
Back to top
berchca
Councilperson


Joined: Jan 15, 2005
Posts: 111

PostPosted: Tue Jun 20, 2006 6:57 am    Post subject:

jakeOSX wrote:

annoying? how many times is someone going to change their icons?


This is a development tool. If you were creating a bunch of icons, it might be something you would do several times an hour.

Also, there's no security risk in opening this directory up to Administrative Write privileges, none at all. The risk, apparently, is in crashing the program.

_brett
Back to top
toonetown
Keymaker


Joined: Apr 21, 2006
Posts: 95
Location: Utah, USA

PostPosted: Tue Jun 20, 2006 8:01 am    Post subject:

Why can't you just prompt for the admin password? As an end user, that is what I'm expecting to happen - not just for stuff to be changed under the scenes.

For example, you can do this:
Code:

osascript -e "do shell script \"./Wish\" with administrator privileges"


From within your application's MacOS directory - integrating that into your application itself is left as an exercise to the reader Wink (basically, just replace "./Wish" with whatever script you need to run as administrator)

Good luck! NeoThemer is looking really nice.
Back to top
toonetown
Keymaker


Joined: Apr 21, 2006
Posts: 95
Location: Utah, USA

PostPosted: Tue Jun 20, 2006 8:05 am    Post subject:

And if you are "REALLY" worried about typing in your password every time, you can do this:

Code:

osascript -e "do shell script \"./Wish\" with administrator privileges password \"XXXXXX\""


using your OWN administrator password....

But you might not want to distribute the application with that password in it. Wink
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Development All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.