/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: 2013-10-05 19:34:40 UTC
  • Revision ID: teddy@recompile.se-20131005193440-ldh85msvzxzmwhgr
* debian/control (Build-Depends): Depend on debhelper 8.9.7 for using
  "override-*-arch" and "override-*-indep" targets in debian/rules.
* debian/rules: Completely rewritten to use features from debhelper v7.
* plugins.d/mandos-client.c (fprintf_plus): Cast return value to
  return type; this fixes a warning since TEMP_FAILURE_RETRY seems to
  return a long int, not whatever type its inner expresson returns.
* plugins.d/password-prompt.c (fprintf_plus): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Password-prompt - Read a password from the terminal and print it
4
4
 * 
5
 
 * Copyright © 2008-2011 Teddy Hogeborn
6
 
 * Copyright © 2008-2011 Björn Påhlsson
 
5
 * Copyright © 2008-2012 Teddy Hogeborn
 
6
 * Copyright © 2008-2012 Björn Påhlsson
7
7
 * 
8
8
 * This program is free software: you can redistribute it and/or
9
9
 * modify it under the terms of the GNU General Public License as
79
79
  
80
80
  TEMP_FAILURE_RETRY(fprintf(stream, "Mandos plugin %s: ",
81
81
                             program_invocation_short_name));
82
 
  return TEMP_FAILURE_RETRY(vfprintf(stream, format, ap));
 
82
  return (int)TEMP_FAILURE_RETRY(vfprintf(stream, format, ap));
83
83
}
84
84
 
85
85
/* Function to use when printing errors */
124
124
    int ret;
125
125
    int cl_fd;
126
126
    {
127
 
      uintmax_t maxvalue;
 
127
      uintmax_t proc_id;
128
128
      char *tmp;
129
129
      errno = 0;
130
 
      maxvalue = strtoumax(proc_entry->d_name, &tmp, 10);
 
130
      proc_id = strtoumax(proc_entry->d_name, &tmp, 10);
131
131
      
132
132
      if(errno != 0 or *tmp != '\0'
133
 
         or maxvalue != (uintmax_t)((pid_t)maxvalue)){
 
133
         or proc_id != (uintmax_t)((pid_t)proc_id)){
134
134
        return 0;
135
135
      }
136
136
    }
514
514
        switch(e){
515
515
        case EBADF:
516
516
          status = EX_UNAVAILABLE;
 
517
          break;
517
518
        case EIO:
518
519
        case EINVAL:
519
520
        default: