--- dpkg-1.10.28/debian/changelog.orig 2006-08-13 03:56:24.000000000 -0500 +++ dpkg-1.10.28/debian/changelog 2006-08-13 03:58:01.000000000 -0500 @@ -1,3 +1,9 @@ +dpkg (1.10.28-0vserver1) stable; urgency=low + + * do not chmod before unlinking a sticky or set-id file + + -- Corey Wright Sun, 13 Aug 2006 03:51:49 -0500 + dpkg (1.10.28) unstable; urgency=low The "Awh, yeah? Ripper!" Release. --- dpkg-1.10.28/main/help.c.orig 2004-11-10 21:16:33.000000000 -0600 +++ dpkg-1.10.28/main/help.c 2006-08-13 03:47:36.000000000 -0500 @@ -440,10 +440,10 @@ int chmodsafe_unlink(const char *pathnam struct stat stab; if (lstat(pathname,&stab)) return -1; - if (S_ISREG(stab.st_mode) ? (stab.st_mode & 07000) : - !(S_ISLNK(stab.st_mode) || S_ISDIR(stab.st_mode) || + if (!(S_ISREG(stab.st_mode) || + S_ISLNK(stab.st_mode) || S_ISDIR(stab.st_mode) || S_ISFIFO(stab.st_mode) || S_ISSOCK(stab.st_mode))) { - /* We chmod it if it is 1. a sticky or set-id file, or 2. an unrecognised + /* We chmod it if it is an unrecognised * object (ie, not a file, link, directory, fifo or socket */ if (chmod(pathname,0600)) return -1;