/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/password-prompt.c

  • Committer: Teddy Hogeborn
  • Date: 2008-09-19 00:00:51 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080919000051-tgm5erxuj0zhs867
* debian/mandos-client.README.Debian: Document "eth0" default and how
                                      to change it.

* debian/mandos-client.postrm (update_initramfs): Use "type" instead
                                                  of "which".

* plugin-runner.c (handle_sigchld, print_out_password): Declared
                                                        static.

* plugin-runner.xml (SYNOPSIS, OPTIONS): Changed "VAR" to "ENV" in the
                                         "--global-env" option to be
                                         consistent with the
                                         "--env-for" option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  -*- coding: utf-8 -*- */
2
2
/*
3
3
 * Passprompt - Read a password from the terminal and print it
4
 
 * 
5
 
 * Copyright © 2008,2009 Teddy Hogeborn
6
 
 * Copyright © 2008,2009 Björn Påhlsson
 
4
 *
 
5
 * Copyright © 2007-2008 Teddy Hogeborn & Björn Påhlsson
7
6
 * 
8
7
 * This program is free software: you can redistribute it and/or
9
8
 * modify it under the terms of the GNU General Public License as
53
52
 
54
53
volatile bool quit_now = false;
55
54
bool debug = false;
56
 
const char *argp_program_version = "password-prompt " VERSION;
 
55
const char *argp_program_version = "password-prompt 1.0";
57
56
const char *argp_program_bug_address = "<mandos@fukt.bsnet.se>";
58
57
 
59
58
static void termination_handler(__attribute__((unused))int signum){
79
78
        .doc = "Debug mode", .group = 3 },
80
79
      { .name = NULL }
81
80
    };
82
 
    
 
81
  
83
82
    error_t parse_opt (int key, char *arg, struct argp_state *state) {
84
83
      /* Get the INPUT argument from `argp_parse', which we know is a
85
84
         pointer to our plugin list pointer. */
100
99
      }
101
100
      return 0;
102
101
    }
103
 
    
 
102
  
104
103
    struct argp argp = { .options = options, .parser = parse_opt,
105
104
                         .args_doc = "",
106
105
                         .doc = "Mandos password-prompt -- Read and"
111
110
      return EXIT_FAILURE;
112
111
    }
113
112
  }
114
 
  
 
113
    
115
114
  if (debug){
116
115
    fprintf(stderr, "Starting %s\n", argv[0]);
117
116
  }
250
249
      fprintf(stderr, "getline() returned 0, retrying.\n");
251
250
    }
252
251
  }
253
 
  
 
252
 
254
253
  free(buffer);
255
254
  
256
255
  if (debug){