/[gentoo-x86]/sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch
Gentoo

Contents of /sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Aug 21 02:32:01 2012 UTC (2 years, 4 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Remove old; fix building when e2fsprogs is not installed (by using linux-headers instead), closes bug #432128.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

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
18 - if (ioctl(fd, EXT2_IOC_GETFLAGS, &old_flags)) {
19 + if (ioctl(fd, FS_IOC_GETFLAGS, &old_flags)) {
20 if ((errno == ENOTTY) /* Inappropriate ioctl for device */
21 || (errno == ENOSYS)) /* Function not implemented */
22 errno = EOPNOTSUPP;
23 @@ -98,7 +98,7 @@ static int ext2fs_chflags(const char *na
24
25 new_flags = (old_flags | set) & ~clear;
26 if (new_flags != old_flags)
27 - retval = ioctl(fd, EXT2_IOC_SETFLAGS, &new_flags);
28 + retval = ioctl(fd, FS_IOC_SETFLAGS, &new_flags);
29
30 if (close(fd))
31 retval = -1;
32 @@ -233,7 +233,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h
33 */
34
35 #ifdef USE_APPEND_FL
36 - ext2fs_chflags(PRIVATE_PREFIX, EXT2_APPEND_FL, 0);
37 + ext2fs_chflags(PRIVATE_PREFIX, FS_APPEND_FL, 0);
38 #endif /* USE_APPEND_FL */
39
40 userdir = malloc(strlen(PRIVATE_PREFIX) + strlen(user) + 2);
41 @@ -260,7 +260,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h
42 } else {
43 /* Don't let the append-only flag get inherited
44 * from the parent directory. */
45 - if (ext2fs_chflags(userdir, 0, EXT2_APPEND_FL) &&
46 + if (ext2fs_chflags(userdir, 0, FS_APPEND_FL) &&
47 errno != EOPNOTSUPP)
48 goto out;
49 #endif /* HAVE_APPEND_FL */

  ViewVC Help
Powered by ViewVC 1.1.20