/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: 2014-06-06 12:26:56 UTC
  • Revision ID: teddy@recompile.se-20140606122656-8x9ad8aqh7lpyneb
White space fix only.

* plugins.d/mandos-client.c (main): Indent unindented blank lines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
 
137
137
bool debug = false;
138
138
static const char mandos_protocol_version[] = "1";
139
 
const char * argp_program_version = "mandos-client " VERSION;
140
 
const char * argp_program_bug_address = "<mandos@recompile.se>";
 
139
const char *argp_program_version = "mandos-client " VERSION;
 
140
const char *argp_program_bug_address = "<mandos@recompile.se>";
141
141
static const char sys_class_net[] = "/sys/class/net";
142
142
char *connect_to = NULL;
143
143
const char *hookdir = HOOKDIR;
1715
1715
    
1716
1716
    /* Raise privileges */
1717
1717
    ret_errno = raise_privileges();
 
1718
    if(ret_errno != 0){
 
1719
      perror_plus("Failed to raise privileges");
 
1720
    }
 
1721
    
 
1722
#ifdef __linux__
 
1723
    int ret_linux;
1718
1724
    bool restore_loglevel = false;
1719
 
    if(ret_errno != 0){
1720
 
      perror_plus("Failed to raise privileges");
1721
 
    }
1722
 
#ifdef __linux__
1723
 
    int ret_linux;
1724
1725
    if(ret_errno == 0){
1725
1726
      /* Lower kernel loglevel to KERN_NOTICE to avoid KERN_INFO
1726
1727
         messages about the network interface to mess up the prompt */
1826
1827
    if(ret_errno != 0){
1827
1828
      perror_plus("Failed to raise privileges");
1828
1829
    }
 
1830
    
1829
1831
    int ret_setflags = ioctl(sd, SIOCSIFFLAGS, &network);
1830
1832
    ioctl_errno = errno;
1831
1833
    
2484
2486
  if(debug){
2485
2487
    fprintf_plus(stderr, "Starting Avahi loop search\n");
2486
2488
  }
2487
 
 
 
2489
  
2488
2490
  ret = avahi_loop_with_timeout(simple_poll,
2489
2491
                                (int)(retry_interval * 1000), &mc);
2490
2492
  if(debug){
2560
2562
        }
2561
2563
      }
2562
2564
    }
 
2565
    
2563
2566
    ret_errno = lower_privileges_permanently();
2564
2567
    if(ret_errno != 0){
2565
2568
      perror_plus("Failed to lower privileges permanently");
2593
2596
        free(fullname);
2594
2597
      }
2595
2598
    }
2596
 
 
 
2599
    
2597
2600
    /* need to clean even if 0 because man page doesn't specify */
2598
2601
    free(direntries);
2599
2602
    if(numentries == -1){