/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 plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2008-12-15 02:33:36 UTC
  • Revision ID: teddy@fukt.bsnet.se-20081215023336-x319cdr0ycvrzp33
* mandos (_datetime_to_dbus_struct): Renamed to "_datetime_to_dbus";
                                     return a dbus.String containing
                                     an ISO 8601 formatted date+time.
  (Client.__init__): Renamed keyword argument "stop_hook" to
                     "disabled_hook".  All callers changed.
  (Client.started): Renamed to "enabled"; all users changed.
  (Client.last_started): Renamed to "last_enabled"; all users changed.
  (Client.stop_hook): Renamed to "disabled_hook"; all users changed.
  (Client.stop_initiator_tag): Renamed to "disable_initiator_tag"; all
                               users changed.
  (Client.start): Renamed to "enable".  All callers changed.
  (Client.stop): Renamed to "disable".  All callers changed.
  (Client.GetAllProperties): Property "last_started" renamed to
                             "last_enabled" and "started" renamed to
                             "enabled".
  (Client.Start): Renamed to "Enable".
  (Client.Stop): Renamed to "Disable".

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Mandos plugin runner - Run Mandos plugins
4
4
 *
5
 
 * Copyright © 2008,2009 Teddy Hogeborn
6
 
 * Copyright © 2008,2009 Björn Påhlsson
 
5
 * Copyright © 2008 Teddy Hogeborn
 
6
 * Copyright © 2008 Björn Påhlsson
7
7
 * 
8
8
 * This program is free software: you can redistribute it and/or
9
9
 * modify it under the terms of the GNU General Public License as
309
309
  struct stat st;
310
310
  fd_set rfds_all;
311
311
  int ret, maxfd = 0;
312
 
  ssize_t sret;
313
312
  uid_t uid = 65534;
314
313
  gid_t gid = 65534;
315
314
  bool debug = false;
547
546
    char *org_line = NULL;
548
547
    char *p, *arg, *new_arg, *line;
549
548
    size_t size = 0;
 
549
    ssize_t sret;
550
550
    const char whitespace_delims[] = " \r\t\f\v\n";
551
551
    const char comment_delim[] = "#";
552
552
 
1019
1019
        proc->buffer_size += BUFFER_SIZE;
1020
1020
      }
1021
1021
      /* Read from the process */
1022
 
      sret = read(proc->fd, proc->buffer + proc->buffer_length,
1023
 
                  BUFFER_SIZE);
1024
 
      if(sret < 0){
 
1022
      ret = read(proc->fd, proc->buffer + proc->buffer_length,
 
1023
                 BUFFER_SIZE);
 
1024
      if(ret < 0){
1025
1025
        /* Read error from this process; ignore the error */
1026
1026
        proc = proc->next;
1027
1027
        continue;
1028
1028
      }
1029
 
      if(sret == 0){
 
1029
      if(ret == 0){
1030
1030
        /* got EOF */
1031
1031
        proc->eof = true;
1032
1032
      } else {
1033
 
        proc->buffer_length += (size_t) sret;
 
1033
        proc->buffer_length += (size_t) ret;
1034
1034
      }
1035
1035
    }
1036
1036
  }