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

  • Committer: Teddy Hogeborn
  • Date: 2017-08-20 16:20:54 UTC
  • Revision ID: teddy@recompile.se-20170820162054-jwig602syxx2k4l0
Alter copyright notices slightly.  Actual license is unchanged!

This alters all copyright notices to use the Free Software
Foundation's recommendations for license notices; from
<https://www.gnu.org/licenses/gpl-howto.html>:

  For programs that are more than one file, it is better to replace
  “this program” with the name of the program, and begin the statement
  with a line saying “This file is part of NAME”.

* DBUS-API: Use program name "Mandos" explicitly in license notice.
* debian/copyright: - '' -
* initramfs-unpack: - '' -
* legalnotice.xml: - '' -
* mandos: - '' -
* mandos-ctl: - '' -
* mandos-keygen: - '' -
* mandos-monitor: - '' -
* plugin-helpers/mandos-client-iprouteadddel.c: - '' -
* plugin-runner.c: - '' -
* plugins.d/askpass-fifo.c: - '' -
* plugins.d/mandos-client.c: - '' -
* plugins.d/password-prompt.c: - '' -
* plugins.d/plymouth.c: - '' -
* plugins.d/splashy.c: - '' -
* plugins.d/usplash.c: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
317
317
  return 0;
318
318
}
319
319
 
320
 
char **getargv(pid_t pid){
 
320
const char * const * getargv(pid_t pid){
321
321
  int cl_fd;
322
322
  char *cmdline_filename;
323
323
  ssize_t sret;
384
384
    return NULL;
385
385
  }
386
386
  argz_extract(cmdline, cmdline_len, argv); /* Create argv */
387
 
  return argv;
 
387
  return (const char * const *)argv;
388
388
}
389
389
 
390
390
int main(__attribute__((unused))int argc,
465
465
  }
466
466
  kill_and_wait(plymouth_command_pid);
467
467
  
468
 
  char **plymouthd_argv = NULL;
 
468
  const char * const *plymouthd_argv;
469
469
  pid_t pid = get_pid();
470
470
  if(pid == 0){
471
471
    error_plus(0, 0, "plymouthd pid not found");
 
472
    plymouthd_argv = plymouthd_default_argv;
472
473
  } else {
473
474
    plymouthd_argv = getargv(pid);
474
475
  }
477
478
                       { plymouth_path, "quit", NULL },
478
479
                       false, false);
479
480
  if(not bret){
480
 
    if(plymouthd_argv != NULL){
481
 
      free(*plymouthd_argv);
482
 
      free(plymouthd_argv);
483
 
    }
484
481
    exit(EXIT_FAILURE);
485
482
  }
486
 
  bret = exec_and_wait(NULL, plymouthd_path,
487
 
                       (plymouthd_argv != NULL)
488
 
                       ? (const char * const *)plymouthd_argv
489
 
                       : plymouthd_default_argv,
 
483
  bret = exec_and_wait(NULL, plymouthd_path, plymouthd_argv,
490
484
                       false, true);
491
 
  if(plymouthd_argv != NULL){
492
 
    free(*plymouthd_argv);
493
 
    free(plymouthd_argv);
494
 
  }
495
485
  if(not bret){
496
486
    exit(EXIT_FAILURE);
497
487
  }