1 diff -rc checkinstall-orig/installwatch/installwatch.c checkinstall/installwatch/installwatch.c
2 *** checkinstall-orig/installwatch/installwatch.c 2009-03-12 13:40:24.000000000 +0100
3 --- checkinstall/installwatch/installwatch.c 2009-03-27 22:42:19.000000000 +0100
7 static int (*true_setxattr)(const char *,const char *,const void *,
9 static int (*true_removexattr)(const char *,const char *);
10 + static ssize_t (*true_getxattr)(const char *,const char *,const void *,size_t);
11 + static ssize_t (*true_lgetxattr)(const char *,const char *,const void *,size_t);
18 true_unlink = dlsym(libc_handle, "unlink");
19 true_utime = dlsym(libc_handle, "utime");
20 true_setxattr = dlsym(libc_handle, "setxattr");
21 + true_getxattr = dlsym(libc_handle, "getxattr");
22 + true_lgetxattr = dlsym(libc_handle, "lgetxattr");
23 true_utimes = dlsym(libc_handle, "utimes");
24 true_access = dlsym(libc_handle, "access");
32 + int getxattr (const char *pathname, const char *name,
33 + const void *value, size_t size)
45 + debug(2,"getxattr(%s,%s)\n",pathname,name);
48 + /* We were asked to work in "real" mode */
49 + if( !(__instw.gstatus & INSTW_INITIALIZED) ||
50 + !(__instw.gstatus & INSTW_OKWRAP) ) {
51 + result=true_getxattr(pathname,name,value,size);
56 + instw_setpath(&instw,pathname);
57 + instw_getstatus(&instw,&status);
60 + instw_print(&instw);
63 + if(status&INSTW_TRANSLATED) {
64 + result=true_getxattr(instw.translpath,name,value,size);
66 + result=true_getxattr(instw.path,name,value,size);
69 + instw_delete(&instw);
74 + int lgetxattr (const char *pathname, const char *name,
75 + const void *value, size_t size)
87 + debug(2,"lgetxattr(%s,%s)\n",pathname,name);
90 + /* We were asked to work in "real" mode */
91 + if( !(__instw.gstatus & INSTW_INITIALIZED) ||
92 + !(__instw.gstatus & INSTW_OKWRAP) ) {
93 + result=true_lgetxattr(pathname,name,value,size);
98 + instw_setpath(&instw,pathname);
99 + instw_getstatus(&instw,&status);
102 + instw_print(&instw);
105 + if(status&INSTW_TRANSLATED) {
106 + result=true_lgetxattr(instw.translpath,name,value,size);
108 + result=true_lgetxattr(instw.path,name,value,size);
111 + instw_delete(&instw);
116 #if(GLIBC_MINOR >= 1)
118 int creat64(const char *pathname, __mode_t mode) {
125 + int __open_2(const char *pathname, int flags, ...) {
130 + debug(2,"__open_2(%s,%d,mode)\n",pathname,flags);
133 + va_start(ap, flags);
134 + mode = va_arg(ap, mode_t);
137 + /* The open() function in Glibc 2.9 is an always-inline
138 + function that may call __open_2(), so it's important that
139 + we handle it. I don't know what __open_2() is supposed to
140 + do, but redirecting it to open() seems to work fine. */
142 + return open(pathname,flags,mode);
145 + int __open64_2(const char *pathname, int flags, ...) {
150 + debug(2,"__open64_2(%s,%d,mode)\n",pathname,flags);
153 + va_start(ap, flags);
154 + mode = va_arg(ap, mode_t);
157 + return open64(pathname,flags,mode);
160 struct dirent64 *readdir64(DIR *dir) {
161 struct dirent64 *result;