/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/splashy.c

  • Committer: Teddy Hogeborn
  • Date: 2017-08-20 14:14:14 UTC
  • Revision ID: teddy@recompile.se-20170820141414-m034xuebg7ccaeui
Add some more restrictions to the systemd service file.

* mandos.service ([Service]/ProtectKernelTunables): New; set to "yes".
  ([Service]/ProtectControlGroups): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Splashy - Read a password from splashy and output it
4
4
 * 
5
 
 * Copyright © 2008-2011 Teddy Hogeborn
6
 
 * Copyright © 2008-2011 Björn Påhlsson
 
5
 * Copyright © 2008-2017 Teddy Hogeborn
 
6
 * Copyright © 2008-2017 Björn Påhlsson
7
7
 * 
8
8
 * This program is free software: you can redistribute it and/or
9
9
 * modify it under the terms of the GNU General Public License as
19
19
 * along with this program.  If not, see
20
20
 * <http://www.gnu.org/licenses/>.
21
21
 * 
22
 
 * Contact the authors at <mandos@fukt.bsnet.se>.
 
22
 * Contact the authors at <mandos@recompile.se>.
23
23
 */
24
24
 
25
25
#define _GNU_SOURCE             /* TEMP_FAILURE_RETRY(), asprintf() */
61
61
int signal_received;
62
62
 
63
63
/* Function to use when printing errors */
 
64
__attribute__((format (gnu_printf, 3, 4)))
64
65
void error_plus(int status, int errnum, const char *formatstring,
65
66
                ...){
66
67
  va_list ap;
69
70
  
70
71
  va_start(ap, formatstring);
71
72
  ret = vasprintf(&text, formatstring, ap);
72
 
  if (ret == -1){
 
73
  if(ret == -1){
73
74
    fprintf(stderr, "Mandos plugin %s: ",
74
75
            program_invocation_short_name);
75
76
    vfprintf(stderr, formatstring, ap);