/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/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2015-07-20 00:06:05 UTC
  • Revision ID: teddy@recompile.se-20150720000605-244crrgqx254i3bs
Don't use TEMP_FAILURE_RETRY around close().

* plugin-runner.c: Don't use TEMP_FAILURE_RETRY around close().
* plugins.d/mandos-client.c: - '' -
* plugins.d/usplash.c: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
      return false;
306
306
    }
307
307
    
308
 
    ret = (int)TEMP_FAILURE_RETRY(close(fd));
 
308
    ret = close(fd);
309
309
    if(ret == -1){
310
310
      perror_plus("close");
311
311
    }
931
931
      perror_plus("dup2(devnull, STDIN_FILENO)");
932
932
      _exit(EX_OSERR);
933
933
    }
934
 
    ret = (int)TEMP_FAILURE_RETRY(close(devnull));
 
934
    ret = close(devnull);
935
935
    if(ret == -1){
936
936
      perror_plus("close");
937
937
      _exit(EX_OSERR);
956
956
      perror_plus("openat");
957
957
      _exit(EX_UNAVAILABLE);
958
958
    }
959
 
    TEMP_FAILURE_RETRY(close(helperdir_fd));
 
959
    close(helperdir_fd);
960
960
#ifdef __GNUC__
961
961
#pragma GCC diagnostic push
962
962
#pragma GCC diagnostic ignored "-Wcast-qual"
1466
1466
    free(decrypted_buffer);
1467
1467
    free(buffer);
1468
1468
    if(tcp_sd >= 0){
1469
 
      ret = (int)TEMP_FAILURE_RETRY(close(tcp_sd));
 
1469
      ret = close(tcp_sd);
1470
1470
    }
1471
1471
    if(ret == -1){
1472
1472
      if(e == 0){
2011
2011
        perror_plus("openat");
2012
2012
        _exit(EXIT_FAILURE);
2013
2013
      }
2014
 
      if((int)TEMP_FAILURE_RETRY(close(hookdir_fd)) == -1){
 
2014
      if(close(hookdir_fd) == -1){
2015
2015
        perror_plus("close");
2016
2016
        _exit(EXIT_FAILURE);
2017
2017
      }
2020
2020
        perror_plus("dup2(devnull, STDIN_FILENO)");
2021
2021
        _exit(EX_OSERR);
2022
2022
      }
2023
 
      ret = (int)TEMP_FAILURE_RETRY(close(devnull));
 
2023
      ret = close(devnull);
2024
2024
      if(ret == -1){
2025
2025
        perror_plus("close");
2026
2026
        _exit(EX_OSERR);
2075
2075
    free(direntry);
2076
2076
  }
2077
2077
  free(direntries);
2078
 
  if((int)TEMP_FAILURE_RETRY(close(hookdir_fd)) == -1){
 
2078
  if(close(hookdir_fd) == -1){
2079
2079
    perror_plus("close");
2080
2080
  } else {
2081
2081
    hookdir_fd = -1;
2121
2121
    }
2122
2122
    
2123
2123
    if(quit_now){
2124
 
      ret = (int)TEMP_FAILURE_RETRY(close(sd));
 
2124
      ret = close(sd);
2125
2125
      if(ret == -1){
2126
2126
        perror_plus("close");
2127
2127
      }
2177
2177
    }
2178
2178
    
2179
2179
    /* Close the socket */
2180
 
    ret = (int)TEMP_FAILURE_RETRY(close(sd));
 
2180
    ret = close(sd);
2181
2181
    if(ret == -1){
2182
2182
      perror_plus("close");
2183
2183
    }
2265
2265
    }
2266
2266
    
2267
2267
    /* Close the socket */
2268
 
    int ret = (int)TEMP_FAILURE_RETRY(close(sd));
 
2268
    int ret = close(sd);
2269
2269
    if(ret == -1){
2270
2270
      perror_plus("close");
2271
2271
    }
2522
2522
              }
2523
2523
            }
2524
2524
          }
2525
 
          TEMP_FAILURE_RETRY(close(seckey_fd));
 
2525
          close(seckey_fd);
2526
2526
        }
2527
2527
      }
2528
2528
      
2543
2543
              }
2544
2544
            }
2545
2545
          }
2546
 
          TEMP_FAILURE_RETRY(close(pubkey_fd));
 
2546
          close(pubkey_fd);
2547
2547
        }
2548
2548
      }
2549
2549
      
2564
2564
              }
2565
2565
            }
2566
2566
          }
2567
 
          TEMP_FAILURE_RETRY(close(dhparams_fd));
 
2567
          close(dhparams_fd);
2568
2568
        }
2569
2569
      }
2570
2570
      
3083
3083
          perror_plus("rmdir");
3084
3084
        }
3085
3085
      }
3086
 
      TEMP_FAILURE_RETRY(close(tempdir_fd));
 
3086
      close(tempdir_fd);
3087
3087
    }
3088
3088
  }
3089
3089