Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
c8fca4ed
Commit
c8fca4ed
authored
Jul 19, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to use crontab without root user.
parent
be492279
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
component/dcron/buildout.cfg
component/dcron/buildout.cfg
+1
-1
component/dcron/dcron-4.4.noroot.no.globals.patch
component/dcron/dcron-4.4.noroot.no.globals.patch
+13
-5
No files found.
component/dcron/buildout.cfg
View file @
c8fca4ed
...
...
@@ -6,7 +6,7 @@ parts = dcron-output
[dcron-patch-nonroot]
recipe = hexagonit.recipe.download
md5sum =
2f5b22dc1cbe81060a9c28e6f5c06e8b
md5sum =
d5408ab682b65cc1eda40d588fcd7db8
url = ${:_profile_base_location_}/${:filename}
filename = dcron-4.4.noroot.no.globals.patch
download-only = true
...
...
component/dcron/dcron-4.4.noroot.no.globals.patch
View file @
c8fca4ed
#
Patch for making dcron usable without root user, as a local service
diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
--- dcron-4.4.org/chuser.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/chuser.c 201
1-04-01 11:19:19.000000000
+0200
+++ dcron-4.4/chuser.c 201
3-07-18 18:17:16.342147418
+0200
@@ -14,47 +14,6 @@
int
ChangeUser(const char *user, char *dochdir)
...
...
@@ -53,7 +52,16 @@ diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
--- dcron-4.4.org/crontab.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/crontab.c 2011-04-01 11:19:19.000000000 +0200
+++ dcron-4.4/crontab.c 2013-07-18 18:18:07.768535485 +0200
@@ -88,7 +88,7 @@
break;
case 'c':
/* getopt guarantees optarg != 0 here */
- if (*optarg != 0 && getuid() == geteuid()) {
+ if (*optarg != 0) {
CDir = optarg;
} else {
printlogf(0, "-c option: superuser only");
@@ -316,9 +316,6 @@
close(filedes[0]);
...
...
@@ -75,7 +83,7 @@ diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
ptr = PATH_VI;
diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
--- dcron-4.4.org/job.c 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/job.c 201
1-04-01 11:19:19.000000000
+0200
+++ dcron-4.4/job.c 201
3-07-18 18:17:16.342147418
+0200
@@ -62,14 +62,6 @@
* Change running state to the user in question
*/
...
...
@@ -108,7 +116,7 @@ diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
/*
diff -ru dcron-4.4.org/Makefile dcron-4.4/Makefile
--- dcron-4.4.org/Makefile 2010-01-18 16:27:31.000000000 +0100
+++ dcron-4.4/Makefile 201
1-04-01 11:19:35.000000000
+0200
+++ dcron-4.4/Makefile 201
3-07-18 18:17:16.342147418
+0200
@@ -3,7 +3,6 @@
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment