-u is not required for own username, causes an error if unprivileged.
Bug #1407756 reported by
Jim
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-crontab |
Fix Released
|
High
|
Martin Owens |
Bug Description
It is unnecessary to send the -u flag when running as the current user.
Lines 240 and 277 are both sending the -u flag if self.user returns something truthy.
If you change it so that -u is not set when self._user == True it will work as the local user, even if they don't have root privileges for cron.
I tested this on OSX 10.9.5, and RHEL6.
Related branches
To post a comment you must log in.
The lines are 233 and 270 in the most recent release. I can't actually get the error on Ubuntu but I confirmed it on Gentoo and CentOS.