[Bug 909189] Re: Request for new upstream version 1.2 upgrade.

Julian Taylor jtaylor.debian at googlemail.com
Sat Jan 14 14:59:42 UTC 2012


I still don't like it, there are race conditions between opening files and making them root only all over the place.
also you create tempfiles with user permissions but which are then used by root.
sudo mktemp will create files with proper permissions.

For the crontab updating I would not go to the filesystem at all, instead I would pipe in the new result via stdin:
(sudo crontab -l; echo "some new cron") | sudo crontab -

or the equivalent with python subprocess (w/o sudo)
import subprocess
curcron = subprocess.check_output(["crontab", "-l"])
# on non-debian systems you might get 3 lines of headers out of crontab -l
strip_headers(curcron)
updatecron = subprocess.Popen(["crontab", "-"], stdin = subprocess.PIPE)
updatecron.communicate(curcron+"1 0 * * * echo\n")

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/909189

Title:
  Request for new upstream version 1.2 upgrade.

Status in “wakeup” package in Ubuntu:
  Fix Committed

Bug description:
  Adds some important features (user-defined hot text items/commands),
  as well as some important bug fixes.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wakeup/+bug/909189/+subscriptions



More information about the Ubuntu-sponsors mailing list