/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 plugin-runner.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:
72
72
const char *argp_program_version = "plugin-runner 1.0";
73
73
const char *argp_program_bug_address = "<mandos@fukt.bsnet.se>";
74
74
 
75
 
struct plugin;
76
 
 
77
75
typedef struct plugin{
78
76
  char *name;                   /* can be NULL or any plugin name */
79
77
  char **argv;
208
206
 * Descriptor Flags".
209
207
 * *Note File Descriptor Flags:(libc)Descriptor Flags.
210
208
 */
211
 
static int set_cloexec_flag(int fd)
212
 
{
 
209
static int set_cloexec_flag(int fd){
213
210
  int ret = fcntl(fd, F_GETFD, 0);
214
211
  /* If reading the flags failed, return error indication now. */
215
212
  if(ret < 0){
222
219
 
223
220
/* Mark processes as completed when they exit, and save their exit
224
221
   status. */
225
 
void handle_sigchld(__attribute__((unused)) int sig){
 
222
static void handle_sigchld(__attribute__((unused)) int sig){
226
223
  while(true){
227
224
    plugin *proc = plugin_list;
228
225
    int status;
253
250
}
254
251
 
255
252
/* Prints out a password to stdout */
256
 
bool print_out_password(const char *buffer, size_t length){
 
253
static bool print_out_password(const char *buffer, size_t length){
257
254
  ssize_t ret;
258
255
  for(size_t written = 0; written < length; written += (size_t)ret){
259
256
    ret = TEMP_FAILURE_RETRY(write(STDOUT_FILENO, buffer + written,