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

  • Committer: Teddy Hogeborn
  • Date: 2008-09-21 12:04:02 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080921120402-mgd2jl8xo634jw18
* Makefile: Put the init script before avahi-daemon.

* debian/mandos.prerm: Bug fix: stop mandos, not ssh.

* debian/rules (install-indep): Put the init script before
                                avahi-daemon.

* init.d/mandos: Require "avahi-daemon".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  -*- coding: utf-8 -*- */
2
2
/*
3
 
 * Password-prompt - Read a password from the terminal and print it
4
 
 * 
5
 
 * Copyright © 2008,2009 Teddy Hogeborn
6
 
 * Copyright © 2008,2009 Björn Påhlsson
 
3
 * Passprompt - Read a password from the terminal and print it
 
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) {
 
83
      /* Get the INPUT argument from `argp_parse', which we know is a
 
84
         pointer to our plugin list pointer. */
84
85
      switch (key) {
85
86
      case 'p':
86
87
        prefix = arg;
98
99
      }
99
100
      return 0;
100
101
    }
101
 
    
 
102
  
102
103
    struct argp argp = { .options = options, .parser = parse_opt,
103
104
                         .args_doc = "",
104
105
                         .doc = "Mandos password-prompt -- Read and"
109
110
      return EXIT_FAILURE;
110
111
    }
111
112
  }
112
 
  
 
113
    
113
114
  if (debug){
114
115
    fprintf(stderr, "Starting %s\n", argv[0]);
115
116
  }
248
249
      fprintf(stderr, "getline() returned 0, retrying.\n");
249
250
    }
250
251
  }
251
 
  
 
252
 
252
253
  free(buffer);
253
254
  
254
255
  if (debug){