diff options
Diffstat (limited to 'sed')
-rw-r--r-- | sed/compile.c | 2 | ||||
-rw-r--r-- | sed/debug.c | 2 | ||||
-rw-r--r-- | sed/execute.c | 2 | ||||
-rw-r--r-- | sed/local.mk | 2 | ||||
-rw-r--r-- | sed/mbcs.c | 2 | ||||
-rw-r--r-- | sed/regexp.c | 2 | ||||
-rw-r--r-- | sed/sed.c | 21 | ||||
-rw-r--r-- | sed/sed.h | 2 | ||||
-rw-r--r-- | sed/utils.c | 4 | ||||
-rw-r--r-- | sed/utils.h | 2 |
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 @@ -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 @@ -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); @@ -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 |