/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: 2020-12-06 12:02:04 UTC
  • mto: This revision was merged to the branch mainline in revision 404.
  • Revision ID: teddy@recompile.se-20201206120204-pkx839mdn2x2v2m7
Minor code cleanup

* dracut-module/password-agent.c
  (test_send_password_to_socket_EMSGSIZE): Replace a free()/malloc()
  pair with single realloc() call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                                   struct stat, fstat(), close(),
48
48
                                   setgid(), setuid(), S_ISREG(),
49
49
                                   faccessat() pipe2(), fork(),
50
 
                                   _exit(), dup2(), fexecve(), read(),
51
 
                                   lstat(), symlink() */
 
50
                                   _exit(), dup2(), fexecve(), read()
 
51
                                */
52
52
#include <fcntl.h>              /* fcntl(), F_GETFD, F_SETFD,
53
53
                                   FD_CLOEXEC, openat(), scandirat(),
54
54
                                   pipe2() */
858
858
      }
859
859
      close(plugindir_fd);
860
860
    }
861
 
 
862
 
    /* Work around Debian bug #981302
863
 
       <https://bugs.debian.org/981302> */
864
 
    if(lstat("/dev/fd", &st) != 0 and errno == ENOENT){
865
 
      ret = symlink("/proc/self/fd", "/dev/fd");
866
 
      if(ret == -1){
867
 
        error(0, errno, "Failed to create /dev/fd symlink");
868
 
      }
869
 
    }
870
861
  }
871
862
  
872
863
  /* Lower permissions */