My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 186: Drop privileges ... change UID/GID
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  r000ns...@gmail.com
Closed:  Oct 2009


 
Reported by superdup...@trash-mail.com, Aug 28, 2009
Hi,

I'm using PyICQt for a while and was always missing a small feature:
Dropping privileges after start-up.

Sometimes it is convenient to start an application as root, for example
to open a logfile as root or to create a pid-file as root and then
drop the privileges. This small feature is still missing in PyICQt.

The attached patch should solve this gap. It introduces to new options:

python PyICQt.py --user=nobody --group=1234

What do you think about this small fix and bringing it upstream?

cheers
Stefan
main.py.patch
2.1 KB   View   Download
Aug 28, 2009
Project Member #1 r000ns...@gmail.com
You can create separate user for PyICQt and give to it permissions for access to
logfile and to pidfile. For example, init script in Debian looks as:
...
PIDDIR=/var/run/pyicqt
PIDFILE=$PIDDIR/$NAME.pid
USER=pyicqt
GROUP=pyicqt
..
if test ! -e $PIDDIR; then
	mkdir $PIDDIR
	chown $USER:$GROUP $PIDDIR
fi
..
start-stop-daemon --start $SSD_OPTS --startas "$DAEMON" --chuid "$USER" -- $OPTIONS
...
Transport never shouldn't be ran as root. Init scripts like this isn't shipped with
PyICQt but such configuration (separate user and group) are suggested
...
Sep 15, 2009
#2 mathemonkey
Moreover, I have ubuntu-based server that ships their own version of pyicq.
There is proper pyicqt user and logrotation script in that package.
Sep 24, 2009
#3 superdup...@trash-mail.com
Yeah your right (both of you). No need for a patch.

hmm I'm new to Google code ... how can I close this bug?
Oct 3, 2009
Project Member #4 r000ns...@gmail.com
#3: Don't worry about it
Status: WontFix
Owner: r000nster

Powered by Google Project Hosting