summaryrefslogtreecommitdiff
path: root/sed
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2021-08-31 08:53:23 -0400
committerClint Adams <clint@debian.org>2021-08-31 08:53:23 -0400
commitc50de48f2ed0b9476c3389fd07a85a5e8be798e2 (patch)
tree80f254d789336981f5ea660741739f70d46589d5 /sed
parent637a2e292881341dde845545517b0ed3d3ccfc94 (diff)
New upstream version 4.8
Diffstat (limited to 'sed')
-rw-r--r--sed/compile.c2
-rw-r--r--sed/debug.c2
-rw-r--r--sed/execute.c2
-rw-r--r--sed/local.mk2
-rw-r--r--sed/mbcs.c2
-rw-r--r--sed/regexp.c2
-rw-r--r--sed/sed.c21
-rw-r--r--sed/sed.h2
-rw-r--r--sed/utils.c4
-rw-r--r--sed/utils.h2
10 files changed, 29 insertions, 12 deletions
diff --git a/sed/compile.c b/sed/compile.c
index ca58371..8321d68 100644
--- a/sed/compile.c
+++ b/sed/compile.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sed/debug.c b/sed/debug.c
index 9ec37b6..181f87d 100644
--- a/sed/debug.c
+++ b/sed/debug.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 2018 Free Software Foundation, Inc.
+ Copyright (C) 2018-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sed/execute.c b/sed/execute.c
index b39bab4..c5f07cc 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sed/local.mk b/sed/local.mk
index 5ccaaf4..24788cd 100644
--- a/sed/local.mk
+++ b/sed/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2018 Free Software Foundation, Inc.
+# Copyright (C) 2016-2020 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/sed/mbcs.c b/sed/mbcs.c
index c94b219..3fdd483 100644
--- a/sed/mbcs.c
+++ b/sed/mbcs.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 2003-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sed/regexp.c b/sed/regexp.c
index 4ac06d6..9764ef3 100644
--- a/sed/regexp.c
+++ b/sed/regexp.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1999-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sed/sed.c b/sed/sed.c
index e588c56..f75e4b6 100644
--- a/sed/sed.c
+++ b/sed/sed.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
#include "progname.h"
#include "version.h"
#include "xalloc.h"
+#include <selinux/selinux.h>
#include "version-etc.h"
@@ -116,7 +117,6 @@ cancel_cleanup (void)
G_file_to_unlink = NULL;
}
-static void usage (int);
static void
contact (int errmsg)
{
@@ -130,6 +130,22 @@ General help using GNU software: <https://www.gnu.org/gethelp/>.\n"));
fprintf (out, _("E-mail bug reports to: <%s>.\n"), PACKAGE_BUGREPORT);
}
+static void
+selinux_support (void)
+{
+ putchar ('\n');
+#if HAVE_SELINUX_SELINUX_H
+ puts (_("This sed program was built with SELinux support."));
+ if (is_selinux_enabled ())
+ puts (_("SELinux is enabled on this system."));
+ else
+ puts (_("SELinux is disabled on this system."));
+#else
+ puts (_("This sed program was built without SELinux support."));
+#endif
+ putchar ('\n');
+}
+
_Noreturn static void
usage (int status)
{
@@ -344,6 +360,7 @@ main (int argc, char **argv)
case 'v':
version_etc (stdout, program_name, PACKAGE_NAME, Version,
AUTHORS, (char *) NULL);
+ selinux_support ();
contact (false);
ck_fclose (NULL);
exit (EXIT_SUCCESS);
diff --git a/sed/sed.h b/sed/sed.h
index cb28736..1c8e83a 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sed/utils.c b/sed/utils.c
index 6f847cd..9576dd1 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -1,5 +1,5 @@
/* Functions from hack's utils library.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -181,7 +181,7 @@ ck_mkstemp (char **p_filename, const char *tmpdir,
/* The ownership might change, so omit some permissions at first
so unauthorized users cannot nip in before the file is ready.
mkstemp forces O_BINARY on cygwin, so use mkostemp instead. */
- mode_t save_umask = umask (0700);
+ mode_t save_umask = umask (0077);
int fd = mkostemp (template, 0);
umask (save_umask);
if (fd == -1)
diff --git a/sed/utils.h b/sed/utils.h
index 810ac9f..47a029e 100644
--- a/sed/utils.h
+++ b/sed/utils.h
@@ -1,5 +1,5 @@
/* Functions from hack's utils library.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by