/mandos/release

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

« back to all changes in this revision

Viewing changes to dracut-module/password-agent.c

  • Committer: teddy at recompile
  • Date: 2020-03-14 03:22:36 UTC
  • mto: This revision was merged to the branch mainline in revision 396.
  • Revision ID: teddy@recompile.se-20200314032236-ea0oko1tlyuzyzye
dracut-module/password-agent.c: Skip flaky test on non-AMD64

It is difficult to find a suitable buffer size large enough to
predictably make send() fail with EMSGSIZE on a PF_LOCAL socket, while
still being small enough to reliably malloc() twice on any platform
and in any environment.  The existing size was experimentally
determined on AMD64; skip the test for all other platforms.

* dracut-module/password-agent.c
  (test_send_password_to_socket_EMSGSIZE): Skip this test on non-AMD64
  platforms.

Closes: 953799
Reported-by: Michael Biebl <biebl@debian.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Mandos password agent - Simple password agent to run Mandos client
4
4
 *
5
 
 * Copyright © 2019-2020 Teddy Hogeborn
6
 
 * Copyright © 2019-2020 Björn Påhlsson
 
5
 * Copyright © 2019 Teddy Hogeborn
 
6
 * Copyright © 2019 Björn Påhlsson
7
7
 * 
8
8
 * This file is part of Mandos.
9
9
 * 
1193
1193
  bool *const password_is_read = task.password_is_read;
1194
1194
 
1195
1195
  /* We use the GLib "Key-value file parser" functions to parse the
1196
 
     question file.  See <https://systemd.io/PASSWORD_AGENTS/> for
1197
 
     specification of contents */
 
1196
     question file.  See <https://www.freedesktop.org/wiki/Software
 
1197
     /systemd/PasswordAgents/> for specification of contents */
1198
1198
  __attribute__((nonnull))
1199
1199
    void cleanup_g_key_file(GKeyFile **key_file){
1200
1200
    if(*key_file != NULL){
1490
1490
         not. You may but don't have to include a final NUL byte in
1491
1491
         your message.
1492
1492
 
1493
 
         — <https://systemd.io/PASSWORD_AGENTS/> (Tue, 15 Sep 2020
1494
 
         14:24:20 GMT)
 
1493
         — <https://www.freedesktop.org/wiki/Software/systemd/
 
1494
         PasswordAgents/> (Wed 08 Oct 2014 02:14:28 AM UTC)
1495
1495
      */
1496
1496
      send_buffer[0] = '+';     /* Prefix with "+" */
1497
1497
      /* Always add an extra NUL */