/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/askpass-fifo.c

  • Committer: Teddy Hogeborn
  • Date: 2021-01-31 21:40:15 UTC
  • Revision ID: teddy@recompile.se-20210131214015-yz7ogk2mqfdfflo6
Work around Debian bug #981302

* plugin-runner.c (main): If the /dev/fd symlink is missing, create
  it.
* plugins.d/mandos-client.c (main): - '' -

Reported-By: Eero Häkkinen <+debian-bts-2021@eero.xn--hkkinen-5wa.fi>
Suggested-by: Eero Häkkinen <+debian-bts-2021@eero.xn--hkkinen-5wa.fi>
Thanks: Eero Häkkinen for bug report and analysis

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Askpass-FIFO - Read a password from a FIFO and output it
4
4
 * 
5
 
 * Copyright © 2008-2017 Teddy Hogeborn
6
 
 * Copyright © 2008-2017 Björn Påhlsson
 
5
 * Copyright © 2008-2019 Teddy Hogeborn
 
6
 * Copyright © 2008-2019 Björn Påhlsson
7
7
 * 
8
8
 * This file is part of Mandos.
9
9
 * 
65
65
    fprintf(stderr, ": ");
66
66
    fprintf(stderr, "%s\n", strerror(errnum));
67
67
    error(status, errno, "vasprintf while printing error");
 
68
    if(status){
 
69
      __builtin_unreachable();
 
70
    }
68
71
    return;
69
72
  }
70
73
  fprintf(stderr, "Mandos plugin ");
71
74
  error(status, errnum, "%s", text);
 
75
  if(status){
 
76
    __builtin_unreachable();
 
77
  }
72
78
  free(text);
73
79
}
74
80
 
90
96
    case ENOTDIR:
91
97
    case ELOOP:
92
98
      error_plus(EX_OSFILE, errno, "mkfifo");
 
99
      __builtin_unreachable();
93
100
    case ENAMETOOLONG:
94
101
    case ENOSPC:
95
102
    case EROFS:
96
103
    default:
97
104
      error_plus(EX_OSERR, errno, "mkfifo");
 
105
      __builtin_unreachable();
98
106
    case ENOENT:
99
107
      /* no "/lib/cryptsetup"? */
100
108
      error_plus(EX_UNAVAILABLE, errno, "mkfifo");
 
109
      __builtin_unreachable();
101
110
    case EEXIST:
102
111
      break;                    /* not an error */
103
112
    }