/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: 2009-01-14 14:20:17 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090114142017-84t4kfw56bsftjlo
Fixes for sscanf usage:

* plugin-runner.c (main): Parse numbers correctly and portably using
                          an intermediate "intmax_t".  Cast "pid_t" to
                          "intmax_t" before passing it to "printf()".
* plugins.d/mandos-client.c (main): Parse numbers correctly and
                                    portably using an intermediate
                                    "intmax_t".  Bug fix: cast
                                    "AvahiIfIndex" to "intmax_t" and
                                    use "PRIdMAX" instead of using
                                    "PRIu16", and use "PRIu16" to
                                    format port number.
* plugins.d/splashy.c (main): Parse numbers correctly and portably
                              using an intermediate "intmax_t".
* plugins.d/usplash.c (main): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
      { .name = NULL }
81
81
    };
82
82
    
83
 
    error_t parse_opt (int key, char *arg, struct argp_state *state){
84
 
      switch (key){
 
83
    error_t parse_opt (int key, char *arg, struct argp_state *state) {
 
84
      switch (key) {
85
85
      case 'p':
86
86
        prefix = arg;
87
87
        break;
194
194
      const char *cryptsource = getenv("cryptsource");
195
195
      const char *crypttarget = getenv("crypttarget");
196
196
      const char *const prompt
197
 
        = "Enter passphrase to unlock the disk";      
 
197
        = "Enter passphrase to unlock the disk";
198
198
      if(cryptsource == NULL){
199
199
        if(crypttarget == NULL){
200
200
          fprintf(stderr, "%s: ", prompt);