Hi, On Sun, 13 Aug 2006, Corey Wright wrote: > when upgrading passwd (and similarly with login) from 4.0.3-31sarge5 to > 4.0.3-31sarge8, dpkg aborts with an error ("failed to rmdir/unlink > `//usr/bin/chage.dpkg-tmp': Operation not permitted"), returns an exit > status indicating an error, but dpkg lists the upgraded package as being > installed fine ("ii passwd 4.0.3-31sarge8 change and administer > password and group dat").
The situation has evolved since then. In most cases it fails and should thus not report the new version as installed. But there's one situation where it only emits a warning and continues as usual... that's when the setuid file should be removed during upgrade (i.e. it's no longer present in the newer version). Effectively this leaves the old file around when the setuid file should be removed from the package. For src/processarc.c: if (secure_unlink_statted(fnamevb.buf, &oldfs)) { warning(_("unable to securely remove old file '%.250s': %s"), namenode->name, strerror(errno)); } >From src/help.c: int secure_unlink_statted(const char *pathname, const struct stat *stab) { if (S_ISREG(stab->st_mode) ? (stab->st_mode & 07000) : !(S_ISLNK(stab->st_mode) || S_ISDIR(stab->st_mode) || S_ISFIFO(stab->st_mode) || S_ISSOCK(stab->st_mode))) { if (chmod(pathname, 0600)) return -1; } if (unlink(pathname)) return -1; return 0; } I'm not sure this is any better than the situation described in this bug report. Guillem, why not oshite() when the chmod()/unlink() fails with errno != ENOENT much like is done at the other places where secure_unlink is used? Cheers, -- Raphaƫl Hertzog Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/ My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/ -- To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org