Problems with openpkg rc --eval all env

2008-03-09 Thread Steffen Weinreich

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!

I'm using

~eval `openpkg rc --eval all env`

to setup the paths for a openpkg instance in the system login script. 
This works fine except that the directory which is created under /tmp 
could not be deleteted since the owner of the dir is the management user 
and therefore the calling user is not able to delete the directory. Any 
idea how to fix this behaviour?


cheerio
~   Steve
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH086aQftxpMD/nVkRAgysAKDRf5Z+i2kL0ArpzlFtiqbMi2TDlgCfUUhD
pmTyiZMmdXsbJTV2XMmnOlY=
=0Kk+
-END PGP SIGNATURE-


__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Problems with openpkg rc --eval all env

2008-03-09 Thread Ralf S. Engelschall
On Sun, Mar 09, 2008, Steffen Weinreich wrote:

 ~eval `openpkg rc --eval all env`

 to setup the paths for a openpkg instance in the system login script. This
 works fine except that the directory which is created under /tmp could not
 be deleteted since the owner of the dir is the management user and
 therefore the calling user is not able to delete the directory. Any idea
 how to fix this behaviour?

You could use:

$ eval `openpkg --keep-privileges rc --eval all env`

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Problems with openpkg rc --eval all env

2008-03-09 Thread Olivier Kaloudoff

Hi!


Hello Steffen,


I'm using

~eval `openpkg rc --eval all env`

to setup the paths for a openpkg instance in the system login script. This 
works fine except that the directory which is created under /tmp could not be 
deleteted since the owner of the dir is the management user and therefore the 
calling user is not able to delete the directory. Any idea how to fix this 
behaviour?


I would suggest that you create the corresponding sudo entry in 
/etc/sudoers and use /usr/bin/sudo the_command_acting_in_tmp .


But ... Why is your application not cleaning the temporary files in /tmp 
.. that would be the good question to ask, IMHO.



Olivier
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Problems with openpkg rc --eval all env

2008-03-09 Thread Steffen Weinreich

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Olivier Kaloudoff schrieb:
| I would suggest that you create the corresponding sudo entry in 
/etc/sudoers and use /usr/bin/sudo the_command_acting_in_tmp .
The command dont need no special privileges. It outputs a shell sniptlet 
to set ENV-vars for the openpkg instance.

|
| But ... Why is your application not cleaning the temporary files in 
/tmp .. that would be the good question to ask, IMHO.

Well, the output of  openpkg rc --eval all env results in  something like

. /tmp/rc-20080309163846-95357/rc.tmp; rm -rf 
/tmp/rc-20080309163846-95357 2/dev/null || true


which infact tries to delete the Temp Dir but due to the SUID stuff in 
the 'openpkg' command the temp dir is owned by the Openpkg Mgmt user.


But as rse pointed out a openpkg --keep-privileges does the trick. 
Thanks, rse


cheerio
~   Steve
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1AW8QftxpMD/nVkRAnoBAKCJ+ciCtu3NTQS2eZCRqeGdyVCizgCdHesd
ysqvd+nZJmjOEsS+C0biGnA=
=k/b/
-END PGP SIGNATURE-

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org