/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 plugins.d/plymouth.c

* debian/control (Standards-Version): Updated to "3.9.1".
* mandos-keygen: Use "set -e" as per Debian Policy section 10.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
      return 0;
197
197
    }
198
198
  }
199
 
  char exe_target[sizeof(plymouthd_path)];
 
199
  char exe_target[sizeof(plymouth_path)];
200
200
  char *exe_link;
201
201
  ret = asprintf(&exe_link, "/proc/%s/exe", proc_entry->d_name);
202
202
  if(ret == -1){
223
223
  
224
224
  ssize_t sret = readlink(exe_link, exe_target, sizeof(exe_target));
225
225
  free(exe_link);
226
 
  if((sret != (ssize_t)sizeof(plymouthd_path)-1) or
227
 
      (memcmp(plymouthd_path, exe_target,
228
 
              sizeof(plymouthd_path)-1) != 0)){
 
226
  if((sret != (ssize_t)sizeof(plymouth_path)-1) or
 
227
      (memcmp(plymouth_path, exe_target,
 
228
              sizeof(plymouth_path)-1) != 0)){
229
229
    return 0;
230
230
  }
231
231
  return 1;
245
245
  if(maxvalue == 0){
246
246
    struct dirent **direntries;
247
247
    ret = scandir("/proc", &direntries, is_plymouth, alphasort);
248
 
    if (ret == -1){
249
 
      error(0, errno, "scandir");
250
 
    }
251
 
    if (ret > 0){
252
 
      ret = sscanf(direntries[0]->d_name, "%" SCNuMAX, &maxvalue);
253
 
      if (ret < 0){
254
 
        error(0, errno, "sscanf");
255
 
      }
256
 
    }
 
248
    sscanf(direntries[0]->d_name, "%" SCNuMAX, &maxvalue);
257
249
  }
258
250
  pid_t pid;
259
251
  pid = (pid_t)maxvalue;