pam_mktemp-1.1.1-e2fsprogs-libs.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Index: pam_mktemp-1.1.1/pam_mktemp.c
  2. ===================================================================
  3. --- pam_mktemp-1.1.1.orig/pam_mktemp.c
  4. +++ pam_mktemp-1.1.1/pam_mktemp.c
  5. @@ -55,7 +55,7 @@
  6. */
  7. # include <fcntl.h>
  8. # include <sys/ioctl.h>
  9. -# include <ext2fs/ext2_fs.h>
  10. +# include <linux/fs.h>
  11. #else
  12. # undef USE_APPEND_FL
  13. #endif /* HAVE_APPEND_FL */
  14. @@ -88,7 +88,7 @@ static int ext2fs_chflags(const char *na
  15. if ((fd = open(name, O_RDONLY)) < 0)
  16. return -1;
  17. - if (ioctl(fd, EXT2_IOC_GETFLAGS, &old_flags)) {
  18. + if (ioctl(fd, FS_IOC_GETFLAGS, &old_flags)) {
  19. if ((errno == ENOTTY) /* Inappropriate ioctl for device */
  20. || (errno == ENOSYS)) /* Function not implemented */
  21. errno = EOPNOTSUPP;
  22. @@ -98,7 +98,7 @@ static int ext2fs_chflags(const char *na
  23. new_flags = (old_flags | set) & ~clear;
  24. if (new_flags != old_flags)
  25. - retval = ioctl(fd, EXT2_IOC_SETFLAGS, &new_flags);
  26. + retval = ioctl(fd, FS_IOC_SETFLAGS, &new_flags);
  27. if (close(fd))
  28. retval = -1;
  29. @@ -233,7 +233,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h
  30. */
  31. #ifdef USE_APPEND_FL
  32. - ext2fs_chflags(PRIVATE_PREFIX, EXT2_APPEND_FL, 0);
  33. + ext2fs_chflags(PRIVATE_PREFIX, FS_APPEND_FL, 0);
  34. #endif /* USE_APPEND_FL */
  35. userdir = malloc(strlen(PRIVATE_PREFIX) + strlen(user) + 2);
  36. @@ -260,7 +260,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h
  37. } else {
  38. /* Don't let the append-only flag get inherited
  39. * from the parent directory. */
  40. - if (ext2fs_chflags(userdir, 0, EXT2_APPEND_FL) &&
  41. + if (ext2fs_chflags(userdir, 0, FS_APPEND_FL) &&
  42. errno != EOPNOTSUPP)
  43. goto out;
  44. #endif /* HAVE_APPEND_FL */