/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: 2017-02-21 21:42:08 UTC
  • Revision ID: teddy@recompile.se-20170221214208-09wu1p4l2hjhqfoj
Use "read -r" in shell scripts to avoid backslash escapes

* initramfs-tools-hook: Use "read -r" to read filenames from network
  hook given the "files" argument.
* initramfs-tools-script: Use "read -e" when parsing
  "/conf/conf.d/cryptroot".
* mandos-keygen (keygen): Use "read -r" when reading passphrase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1079
1079
    bool match = false;
1080
1080
    {
1081
1081
      char *interface = NULL;
1082
 
      while((interface=argz_next(mc->interfaces, mc->interfaces_size,
1083
 
                                 interface))){
 
1082
      while((interface = argz_next(mc->interfaces,
 
1083
                                   mc->interfaces_size,
 
1084
                                   interface))){
1084
1085
        if(if_nametoindex(interface) == (unsigned int)if_index){
1085
1086
          match = true;
1086
1087
          break;
1493
1494
  return retval;
1494
1495
}
1495
1496
 
1496
 
__attribute__((nonnull))
1497
1497
static void resolve_callback(AvahiSServiceResolver *r,
1498
1498
                             AvahiIfIndex interface,
1499
1499
                             AvahiProtocol proto,
2196
2196
  
2197
2197
  /* Sleep checking until interface is running.
2198
2198
     Check every 0.25s, up to total time of delay */
2199
 
  for(int i=0; i < delay * 4; i++){
 
2199
  for(int i = 0; i < delay * 4; i++){
2200
2200
    if(interface_is_running(interface)){
2201
2201
      break;
2202
2202
    }
3023
3023
      /* Take down the network interfaces which were brought up */
3024
3024
      {
3025
3025
        char *interface = NULL;
3026
 
        while((interface=argz_next(interfaces_to_take_down,
3027
 
                                   interfaces_to_take_down_size,
3028
 
                                   interface))){
 
3026
        while((interface = argz_next(interfaces_to_take_down,
 
3027
                                     interfaces_to_take_down_size,
 
3028
                                     interface))){
3029
3029
          ret = take_down_interface(interface);
3030
3030
          if(ret != 0){
3031
3031
            errno = ret;