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

* README (The Plugin System): Removed redundant text about options and
                              files for the plugins, this is now
                              documented in the manuals for the
                              plugins.

* plugins.d/mandos-client.c (main): Remove comment which was copied
                                    from another program by mistake.
                                    Use "sscanf" instead of "strtol"
                                    to parse numbers; this uses the
                                    correct type instead of casting.
                                    Don't report errors when removing
                                    temporary directory if directory
                                    is already gone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  -*- coding: utf-8 -*- */
2
2
/*
3
 
 * Passprompt - Read a password from usplash and output it
 
3
 * Usplash - Read a password from usplash and output it
4
4
 * 
5
5
 * Copyright © 2008,2009 Teddy Hogeborn
6
6
 * Copyright © 2008,2009 Björn Påhlsson
193
193
        struct stat exe_stat;
194
194
        ret = lstat(exe_link, &exe_stat);
195
195
        if(ret == -1){
 
196
          if(errno == ENOENT){
 
197
            free(exe_link);
 
198
            continue;
 
199
          }
196
200
          perror("lstat");
197
201
          free(exe_link);
198
202
          free(prompt);
208
212
        
209
213
        sret = readlink(exe_link, exe_target, sizeof(exe_target));
210
214
        free(exe_link);
211
 
        if(sret == -1){
212
 
          continue;
213
 
        }
214
215
      }
215
216
      if((sret == ((ssize_t)sizeof(exe_target)-1))
216
217
         and (memcmp(usplash_name, exe_target,