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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
81529ee5
Commit
81529ee5
authored
May 06, 2024
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/dcron: version up 4.5->4.6
parent
13d4b415
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
31 deletions
+53
-31
component/dcron/buildout.cfg
component/dcron/buildout.cfg
+4
-3
component/dcron/noroot-no-globals.patch
component/dcron/noroot-no-globals.patch
+35
-28
component/dcron/support_old_gcc.patch
component/dcron/support_old_gcc.patch
+14
-0
No files found.
component/dcron/buildout.cfg
View file @
81529ee5
...
...
@@ -8,12 +8,13 @@ parts = dcron-output
[dcron]
recipe = slapos.recipe.cmmi
shared = false
url = http
://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz
md5sum =
078833f3281f96944fc30392b1888326
url = http
s://github.com/ptchinster/dcron/archive/refs/tags/v4.6.zip
md5sum =
d5bd12863547daf499187bc9b4e863a8
configure-command = true
patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/noroot-no-globals.patch#623379916f48bd8292a28057c8bd30f7
${:_profile_base_location_}/noroot-no-globals.patch#cd8d0f6d1d2ee133d6341d1515832c0d
${:_profile_base_location_}/support_old_gcc.patch#4dc8c81b1d94474c3c15e0db7b5b60de
patch-options = -p1
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
...
...
component/dcron/noroot-no-globals.patch
View file @
81529ee5
--- dcron-4.5/chuser.c
+++ dcron-4.5/chuser.c
@@ -14,6 +14,7 @@
diff --git a/chuser.c b/chuser.c
index 0d79dbc..ccc3acc 100644
--- a/chuser.c
+++ b/chuser.c
@@ -11,6 +11,7 @@
Prototype int ChangeUser(const char *user, char *dochdir);
+#if 0
int
ChangeUser(const char *user, char *dochdir)
{
+#if 0
struct passwd *pas;
/*
@@ -57,5 +58,8 @@
@@ -57,5 +58,7 @@
ChangeUser(const char *user, char *dochdir)
}
}
return(pas->pw_uid);
+#else
+ return getpwnam(user);
+#endif
}
+#endif
--- dcron-4.5/crontab.c
+++ dcron-4.5/crontab.c
@@ -88,7 +88,7 @@
diff --git a/crontab.c b/crontab.c
index b29e0d2..06df70f 100644
--- a/crontab.c
+++ b/crontab.c
@@ -88,7 +88,7 @@
main(int ac, char **av)
break;
case 'c':
/* getopt guarantees optarg != 0 here */
...
...
@@ -27,8 +30,8 @@
+ if (*optarg != 0) {
CDir = optarg;
} else {
printlogf(0, "-c option: superuser only");
@@ -31
6,9 +316,6 @@
printlogf(0, "-c option: superuser only
\n
");
@@ -31
8,9 +318,6 @@
GetReplaceStream(const char *user, const char *file)
close(filedes[0]);
...
...
@@ -38,7 +41,7 @@
fd = open(file, O_RDONLY);
if (fd < 0) {
printlogf(0, "unable to open %s: %s", file, strerror(errno));
@@ -34
4,8 +341,6 @@
@@ -34
6,8 +343,6 @@
EditFile(const char *user, const char *file)
const char *ptr;
char visual[SMALL_BUFFER];
...
...
@@ -47,9 +50,11 @@
if ((ptr = getenv("EDITOR")) == NULL || strlen(ptr) >= sizeof(visual))
if ((ptr = getenv("VISUAL")) == NULL || strlen(ptr) >= sizeof(visual))
ptr = PATH_VI;
--- dcron-4.5/job.c
+++ dcron-4.5/job.c
@@ -62,14 +62,6 @@
diff --git a/job.c b/job.c
index b5e02de..79650c2 100644
--- a/job.c
+++ b/job.c
@@ -63,14 +63,6 @@
RunJob(CronFile *file, CronLine *line)
* Change running state to the user in question
*/
...
...
@@ -64,7 +69,7 @@
/* from this point we are unpriviledged */
if (DebugOpt)
@@ -29
5,14 +287,6 @@
@@ -29
6,14 +288,6 @@
EndJob(CronFile *file, CronLine *line, int exit_status)
* by the mailing and we already verified the mail file.
*/
...
...
@@ -79,9 +84,11 @@
/* from this point we are unpriviledged */
/*
--- dcron-4.5/Makefile
+++ dcron-4.5/Makefile
@@ -3,7 +3,6 @@
diff --git a/Makefile b/Makefile
index 547febc..13829e6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@
VERSION = 4.5
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
PREFIX = /usr/local
...
...
@@ -89,7 +96,7 @@
SCRONTABS = /etc/cron.d
CRONTABS = /var/spool/cron/crontabs
CRONSTAMPS = /var/spool/cron/cronstamps
@@ -20,10 +19,10 @@
@@ -20,10 +19,10 @@
MANDIR = $(PREFIX)/share/man
SHELL = /bin/sh
...
...
@@ -101,9 +108,9 @@
+INSTALL_DATA = $(INSTALL) -D -m0644
+INSTALL_DIR = $(INSTALL) -d -m0755
CFLAGS ?= -O2
CFLAGS += -Wall -W
strict-prototypes -Wno-missing-field-initializers
SRCS = main.c subs.c database.c job.c concat.c chuser.c
@@ -4
5,7 +44,6 @@
CFLAGS += -Wall -W
extra -Wstrict-prototypes -Wno-missing-field-initializers -Wfloat-equal -fstack-protector-all -Wformat-security -Wformat=2 -fPIE
CFLAGS += -Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,-z,relro -Wl,-z,now -Wl,-z,nodlopen -Wl,-z,-pie
@@ -4
7,7 +46,6 @@
all: $(PROTOS) crond crontab ;
echo "SBINDIR = $(SBINDIR)" >> config
echo "BINDIR = $(BINDIR)" >> config
echo "MANDIR = $(MANDIR)" >> config
...
...
@@ -111,7 +118,7 @@
echo "SCRONTABS = $(SCRONTABS)" >> config
echo "CRONTABS = $(CRONTABS)" >> config
echo "CRONSTAMPS = $(CRONSTAMPS)" >> config
@@ -6
3,13 +61,10 @@
@@ -6
5,13 +63,10 @@
crontab: $(TABOBJS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
install:
...
...
component/dcron/support_old_gcc.patch
0 → 100644
View file @
81529ee5
diff --git a/main.c b/main.c
diff --git a/main.c b/main.c
index dcf3f23..3eb6332 100644
--- a/main.c
+++ b/main.c
@@ -130,7 +130,7 @@
main(int ac, char **av)
case 'd':
DebugOpt = 1;
LogLevel = LOG_DEBUG;
- [[fallthrough]]; //fall through to include f too
+ __attribute__((fallthrough)); //fall through to include f too
case 'f':
ForegroundOpt = 1;
break;
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