File: accept_empty_var.patch

package info (click to toggle)
cron 3.0pl1-197
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,816 kB
  • sloc: ansic: 54,879; xml: 1,600; perl: 733; sh: 463; makefile: 446; python: 43
file content (37 lines) | stat: -rw-r--r-- 990 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Georges Khaznadar <georgesk@debian.org>
Date: Sun, 27 Oct 2024 16:53:53 +0100
Subject: accept_empty_var

===================================================================
---
 crontab.5 | 2 +-
 env.c     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/crontab.5 b/crontab.5
index b3f3d15..aa68e44 100644
--- a/crontab.5
+++ b/crontab.5
@@ -52,7 +52,7 @@ The
 .I value
 string may be placed in quotes (single or double, but matching) to preserve
 leading or trailing blanks.  To define an empty variable, quotes
-.B must
+can
 be used.
 .PP
 The
diff --git a/env.c b/env.c
index a03bfac..3905b02 100644
--- a/env.c
+++ b/env.c
@@ -231,7 +231,8 @@ load_env(envstr, f)
 			abort();
 		}
 	}
-	if (state != FINI && !(state == VALUE && !quotechar)) {
+	if (state != FINI && !(state == VALUE && !quotechar)
+		&& !(state == EQ2 && !quotechar)) {
 		Debug(DPARS, ("load_env, not an env var, state = %d\n", state))
 		fseek(f, filepos, 0);
 		Set_LineNum(fileline);